:root {
  /* 表面与文本 */
  --bg: #f4f6fb;
  --surface: #ffffff;
  --card: #ffffff;
  --border: #e7eaf1;
  --border-strong: #d6dbe6;
  --text: #151b27;
  --text-2: #3b4456;
  --muted: #717b8e;
  /* 品牌与主色 */
  --primary: #4f6bff;
  --primary-d: #3a53e0;
  --primary-l: #eef1ff;
  --primary-ghost: rgba(79,107,255,.10);
  --accent: #7c5cff;
  /* 语义色 */
  --green: #18a558;   --green-l: #e7f8ef;
  --amber: #e08a0c;   --amber-l: #fdf3e3;
  --red:   #e5484d;   --red-l:   #fdeeee;
  /* 圆角 */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  /* 阴影分级 */
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 1px 3px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 36px rgba(16,24,40,.12);
  --shadow-nav: 0 1px 0 rgba(16,24,40,.04), 0 6px 24px rgba(16,24,40,.06);
  --ring: 0 0 0 3px rgba(79,107,255,.22);
  --ease: cubic-bezier(.22,.61,.36,1);
}
/* ===== 暗色模式 ===== */
[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #151b24;
  --card: #171d28;
  --border: #263041;
  --border-strong: #33405a;
  --text: #e7eaf2;
  --text-2: #c3cad8;
  --muted: #8a93a6;
  --primary: #6d85ff;
  --primary-d: #8a9dff;
  --primary-l: #1d2542;
  --primary-ghost: rgba(109,133,255,.16);
  --accent: #9b82ff;
  --green: #2ec27a;   --green-l: #10271c;
  --amber: #f0a93a;   --amber-l: #2a2110;
  --red:   #f06066;   --red-l:   #2c1518;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 3px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.55);
  --shadow-nav: 0 1px 0 rgba(0,0,0,.5), 0 6px 24px rgba(0,0,0,.4);
  --ring: 0 0 0 3px rgba(109,133,255,.3);
}

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

/* ---- 顶部导航（分组下拉） ---- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.5) blur(12px);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-nav);
}
.topbar .brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 15px; letter-spacing: -.01em; color: var(--text);
  white-space: nowrap;
}
.topbar .brand .dot {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; box-shadow: 0 4px 12px rgba(79,107,255,.35);
}
.topbar .brand-name { line-height: 1.2; font-size: 14.5px; }

.topnav { display: flex; align-items: stretch; gap: 2px; height: 100%; margin-left: 8px; }
.nav-item { position: relative; display: flex; align-items: stretch; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; font-family: inherit; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  padding: 0 12px; border-radius: var(--radius-sm); height: 38px; margin: auto 0;
  transition: background .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
}
.nav-trigger:hover { background: var(--primary-ghost); color: var(--primary); }
.nav-item.active .nav-trigger { background: var(--primary-ghost); color: var(--primary); }
.nav-trigger .caret { font-size: 9px; opacity: .7; transition: transform .18s var(--ease); }
.nav-item.open .nav-trigger .caret { transform: rotate(180deg); }

.nav-menu {
  position: absolute; top: calc(100% - 6px); left: 0;
  min-width: 236px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
  z-index: 120;
}
.nav-item.open .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
@media (min-width: 821px) { .nav-item:hover .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); } }
.nav-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.nav-menu a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav-menu a.active { background: var(--primary-ghost); color: var(--primary); font-weight: 600; }
.nav-menu .nav-ic { font-size: 15px; width: 18px; text-align: center; flex: 0 0 auto; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---- 公开站顶栏导航（4 个公共模板共用）：分组 + 分隔线 ---- */
.pub-nav {
  display: flex; align-items: center; gap: 0;
  margin-left: 14px; font-size: 14px; line-height: 1;
}
.pub-nav-pages,
.pub-nav-lang {
  display: flex; align-items: center; gap: 14px;
}
.pub-nav-pages { padding-right: 16px; }
.pub-nav-lang {
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.pub-nav a {
  color: var(--text-secondary);
  padding: 6px 4px;
  border-radius: 6px;
  transition: color .15s var(--ease), background .15s var(--ease);
  white-space: nowrap;
}
.pub-nav a:hover { color: var(--primary); background: var(--primary-ghost); text-decoration: none; }
.pub-nav a.active { color: var(--primary); font-weight: 700; }
.pub-nav-lang a { font-size: 13px; color: var(--muted); padding: 4px 8px; }
.pub-nav-lang a.active { color: var(--primary); background: var(--primary-ghost); font-weight: 600; }
@media (max-width: 820px) {
  .pub-nav {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }
  .pub-nav-pages,
  .pub-nav-lang {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .pub-nav-lang { margin-top: 6px; padding-top: 8px; }
  .pub-nav-pages { padding-right: 0; padding-bottom: 6px; }
  .pub-nav a, .pub-nav-lang a { padding: 10px 12px; font-size: 14px; }
}
.theme-toggle {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); cursor: pointer; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s var(--ease);
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-ghost); }
.role-badge {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  background: var(--primary-ghost); color: var(--primary); font-size: 12px; font-weight: 600;
}
.logout { color: var(--red); font-size: 13px; font-weight: 600; padding: 7px 11px; border-radius: 10px; transition: background .15s; }
.logout:hover { background: var(--red-l); text-decoration: none; }
.hamburger { display: none; border: none; background: none; cursor: pointer; font-size: 21px; color: var(--text); padding: 5px 8px; border-radius: 9px; }
.hamburger:hover { background: var(--bg); }
.backdrop { display: none; position: fixed; inset: 0; background: rgba(10,14,22,.42); z-index: 90; backdrop-filter: blur(1px); }

/* ---- 容器 ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 30px 32px; width: 100%; box-sizing: border-box; }

/* ---- 页头 ---- */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.page-head h1 {
  font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -.02em;
}
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---- 卡片 ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.card h3 {
  margin: 0 0 16px; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
}

/* ---- 网格 ---- */
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--primary); color: #fff; border: 1px solid transparent;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .15s var(--ease), box-shadow .15s var(--ease), transform .12s var(--ease), border-color .15s var(--ease);
  text-decoration: none;
}
.btn:hover { background: var(--primary-d); color: #fff; box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.ghost { background: var(--primary-ghost); color: var(--primary); box-shadow: none; }
.btn.ghost:hover { background: var(--primary-l); color: var(--primary-d); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.amber { background: var(--amber); color: #fff; }
.btn.amber:hover { background: #cf7d0a; color: #fff; box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.loading { opacity: .7; pointer-events: none; }

/* ---- 输入 ---- */
input[type=text], input[type=url], textarea, select {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; outline: none;
  background: var(--surface); color: var(--text);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: var(--ring);
}
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 7px; font-weight: 500; }

/* ---- 表格 ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
th {
  color: var(--muted); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em;
  background: #fafbfd;
}
tbody tr { transition: background .1s; }
tbody tr:hover { background: #f8faff; }
tr:last-child td { border-bottom: none; }

/* ---- 徽章 ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge-pending  { background: var(--amber-l);  color: var(--amber); }
.badge-running  { background: var(--primary-l); color: var(--primary); }
.badge-success  { background: var(--green-l);  color: var(--green); }
.badge-partial  { background: #fef9e7;          color: #9a7000; }
.badge-failed   { background: var(--red-l);     color: var(--red); }

/* ---- 指标卡片 ---- */
.metric {
  background: #fafbfd; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  transition: box-shadow .15s;
}
.metric:hover { box-shadow: var(--shadow-hover); }
.metric .num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.metric .lbl { color: var(--muted); font-size: 12px; margin-top: 6px; }
.metric .src {
  display: inline-block; margin-top: 8px;
  font-size: 11px; color: var(--muted);
  background: #f0f2f7; padding: 2px 8px; border-radius: 999px;
}

/* ---- 截图 ---- */
.shot {
  width: 100%; max-width: 720px;
  border: 1px solid var(--border); border-radius: var(--radius);
  display: block;
}

/* ---- 杂项 ---- */
.tag {
  display: inline-block; background: var(--primary-l); color: var(--primary);
  padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 500;
}
.note {
  background: #fafbfd; border-left: 3px solid var(--primary);
  padding: 10px 14px; color: var(--muted); font-size: 13px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 8px 0;
}
.empty { color: var(--muted); text-align: center; padding: 48px 0; }
.content-box {
  white-space: pre-wrap; max-height: 360px; overflow: auto;
  background: #fafbfd; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; font-size: 13px; line-height: 1.7;
}

/* ---- 标题链接 ---- */
.title-link { color: var(--text); font-weight: 600; }
.title-link:hover { color: var(--primary); }

/* ---- 平台徽章（任务列表标题前） ---- */
.plat-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #6d8bff);
  vertical-align: middle;
  white-space: nowrap;
}

/* ---- 行内操作 ---- */
.col-ops { width: 1%; white-space: nowrap; }
.row-ops { display: inline-flex; gap: 6px; align-items: center; }
.icon-btn {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }
.icon-btn.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-l); }
.btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--primary); background: var(--primary); color: #fff;
  cursor: pointer; text-decoration: none; transition: all .15s;
}
.btn-sm:hover { background: var(--primary-d); border-color: var(--primary-d); text-decoration: none; }
.btn-sm.danger { border-color: var(--red); background: var(--red); color: #fff; }
.btn-sm.danger:hover { background: #c93a3f; border-color: #c93a3f; }
.btn-sm.ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-sm.ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---- 项目卡片 ---- */
.project-card {
  display: block; text-decoration: none; color: inherit;
  transition: all .2s;
}
.project-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
.project-card .pname { font-weight: 700; font-size: 16px; }
.project-card .pdesc { margin: 8px 0 16px; min-height: 40px; font-size: 13px; color: var(--muted); }
.project-card .pstats { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.project-card .card-link { display: block; text-decoration: none; color: inherit; }
.project-card .card-link:hover { text-decoration: none; }

/* ---- 分隔线 ---- */
.divider { display: inline-block; width: 1px; height: 20px; background: var(--border); margin: 0 2px; vertical-align: middle; }

/* ---- 视图切换 ---- */
.view-switch {
  display: inline-flex; gap: 2px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 2px;
}
.btn-switch {
  border: none; background: transparent; color: var(--muted);
  width: 32px; height: 32px; border-radius: 6px;
  cursor: pointer; font-size: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-switch:hover { color: var(--text); }
.btn-switch.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(20,30,50,.1); }

/* ---- 详情页清理后样式 ---- */
.url-clip {
  max-width: 320px; display: inline-block; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
  color: var(--muted); font-weight: 500;
}
.url-clip:hover { color: var(--primary); }
.head-actions { display: flex; gap: 8px; align-items: center; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-head h3 { margin: 0; }

/* 项目互动数据汇总（紧凑一行） */
.summary-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 24px;
}
.summary-bar .sb-item {
  display: flex; align-items: center; gap: 12px;
  flex: 1; min-width: 0;
}
.summary-bar .sb-ic {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.summary-bar .sb-txt { display: flex; flex-direction: column; line-height: 1.2; }
.summary-bar .sb-txt b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.summary-bar .sb-txt span { font-size: 12px; color: var(--muted); margin-top: 2px; }
.summary-bar .sb-sep { width: 1px; height: 36px; background: var(--border); flex: 0 0 auto; }
@media (max-width: 720px) {
  .summary-bar { flex-wrap: wrap; }
  .summary-bar .sb-sep { display: none; }
  .summary-bar .sb-item { flex: 1 1 45%; }
}

/* 新建项目表单：名称宽、描述窄、按钮贴右，避免文字换行 */
.new-project-form {
  display: flex; align-items: flex-end; gap: 14px;
}
.new-project-form .npf-name { flex: 0 0 180px; }
.new-project-form .npf-desc { flex: 1 1 auto; }
.new-project-form .npf-btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 720px) {
  .new-project-form { flex-wrap: wrap; }
  .new-project-form .npf-name, .new-project-form .npf-desc { flex: 1 1 100%; }
}

/* 项目卡片互动数据 */
.project-card .pmetrics {
  display: flex; gap: 8px; margin-top: 14px;
}
.project-card .pmetrics .pm {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 10px 6px; background: #fafbfd;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -.01em;
}
.project-card .pmetrics .pm i { font-style: normal; font-size: 15px; }
.project-card .pmetrics .pm em {
  font-style: normal; font-size: 11px; font-weight: 500; color: var(--muted);
}

/* 键值对 */
.kv { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: none; }
.kv > span { color: var(--muted); font-size: 13px; min-width: 64px; }
.kv > b { font-weight: 600; }

/* ---- 数据变化日志 ---- */
.delta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.delta-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fafbfd; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px;
}
.delta-chip .d-ic { font-size: 15px; }
.delta-chip .d-lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.delta-chip .d-val { font-size: 15px; font-weight: 800; }
.d-up { color: var(--green); font-weight: 800; }
.d-down { color: var(--red); font-weight: 800; }
.d-flat { color: var(--muted); font-weight: 700; }

.spark-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .spark-wrap { grid-template-columns: 1fr; } }
.spark-block {
  background: #fafbfd; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.spark-title { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.spark { width: 100%; height: 56px; display: block; }

.delta-cell { white-space: nowrap; }
.delta-cell .d-up, .delta-cell .d-down, .delta-cell .d-flat { margin: 0 1px; }

/* 评论区 */
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px; margin-left: 4px;
  background: var(--primary-l); color: var(--primary);
  border-radius: 999px; font-size: 12px; font-weight: 700;
  vertical-align: middle;
}
.comment-list { display: flex; flex-direction: column; gap: 2px; max-height: 460px; overflow: auto; }
.comment {
  display: flex; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.avatar {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.c-body { flex: 1; min-width: 0; }
.c-top { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.c-name { font-weight: 700; font-size: 13px; color: var(--text); }
.c-like { color: var(--muted); font-size: 12px; }
.c-text {
  font-size: 13px; line-height: 1.7; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
/* 评论折叠：默认仅显示最后 3 条，其余隐藏，点击「更多」展开 */
.comment-list:not(.expanded) .c-hidden { display: none; }
.c-more { align-self: flex-start; margin-top: 10px; }

/* ---- AI 全面总结卡片 ---- */
.ai-summary-card { border: 1px solid var(--border); }
.ai-sum-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.ai-sum-head h3 { margin: 0; font-size: 16px; color: var(--text); }
.ai-meta { font-size: 12px; color: var(--muted); }
.ai-loading {
  padding: 22px 0; text-align: center; color: var(--primary);
  font-size: 14px; animation: aiPulse 1.2s ease-in-out infinite;
}
@keyframes aiPulse { 0%,100%{opacity:.55} 50%{opacity:1} }
.ai-error {
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: #fff4f4; border: 1px solid #ffd0d0; color: #c0392b;
  font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
.ai-summary-content { font-size: 14px; line-height: 1.8; color: var(--text); }
.ai-summary-content h2 { font-size: 19px; margin: 18px 0 8px; color: var(--text); }
.ai-summary-content h3 { font-size: 16px; margin: 16px 0 6px; color: var(--primary); }
.ai-summary-content h4 { font-size: 14px; margin: 12px 0 4px; color: var(--text); font-weight: 700; }
.ai-summary-content p { margin: 6px 0; }
.ai-summary-content ul, .ai-summary-content ol { margin: 6px 0; padding-left: 22px; }
.ai-summary-content li { margin: 3px 0; }
.ai-summary-content blockquote {
  margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--primary-l);
  background: var(--primary-l); color: var(--muted); border-radius: var(--radius-sm);
}
.ai-summary-content strong { color: var(--text); font-weight: 700; }

/* ---- 设置页 ---- */
.settings-card { max-width: 720px; }
.settings-card h2 { margin: 0 0 4px; }
.settings-card .muted { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.set-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.set-row > label {
  flex: 0 0 110px; font-weight: 600; color: var(--text); padding-top: 8px;
}
.set-row .grow { flex: 1 1 auto; min-width: 0; }
.set-row input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; background: #fff; color: var(--text);
}
.set-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.hint code, .set-tip code { background: #f3f5fa; padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 13px;
  transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }
.set-actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.btn-ghost { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.ai-status { font-size: 13px; font-weight: 600; transition: none; }
.ai-status.ok { color: var(--green); animation: statusFlash 1.2s ease-out; }
.ai-status.err { color: var(--red); animation: statusShake 0.4s ease-out; }
@keyframes statusFlash {
  0% { background: rgba(22,163,74,0.15); border-radius: 4px; padding: 2px 6px; }
  100% { background: transparent; }
}
@keyframes statusShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.btn-sm:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.status-ok { color: var(--green); font-weight: 600; }
.status-off { color: var(--amber); font-weight: 600; }
.warn { color: var(--amber); font-weight: 600; }
.risk-note {
  margin: 10px 0 4px; padding: 10px 14px; border-radius: 8px;
  background: #fff7e6; border: 1px solid #f3d9a6; color: #8a5a00;
  font-size: 13px; line-height: 1.6;
}
.risk-note b { color: #b9770e; }
.set-tip {
  margin-top: 18px; padding: 12px 14px; background: var(--primary-l);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text);
}
.set-tip b { color: var(--primary-d); }
.set-hr { border: none; border-top: 1px solid var(--border); margin: 24px 0 18px; }

/* ---- 接口配置：行 / 开关 ---- */
.iface-row {
  display: flex; gap: 16px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.iface-row > label {
  flex: 0 0 160px; font-weight: 600; color: var(--text); padding-top: 2px;
}
.iface-row .grow { flex: 1 1 auto; min-width: 0; }
.iface-row .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.iface-row input[type="text"], .iface-row input[type="number"], .iface-row select {
  width: 100%; max-width: 320px; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; background: #fff; color: var(--text);
}
.iface-row input:focus, .iface-row select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }

/* toggle 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0; background: #cdd3df;
  transition: .2s; border-radius: 999px;
}
.slider:before {
  position: absolute; content: ""; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; transition: .2s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(20px); }
.switch input:focus + .slider { box-shadow: 0 0 0 3px var(--primary-l); }

.iface-status { font-size: 13px; font-weight: 600; }
.iface-status.ok { color: var(--green); }
.iface-status.err { color: var(--red); }
.fw-textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; line-height: 1.65;
  font-family: inherit; resize: vertical; color: var(--text);
}
.fw-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }

/* ---- 采集说明内嵌的「数据变化」区块 ---- */
.change-inline {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--border);
}

/* ---- 项目资料库卡片 ---- */
.file-card .card-head,
.news-card .card-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.file-card .card-head h3,
.news-card .card-head h3 { margin: 0; }

.file-upload-area {
  border: 2px dashed var(--border); border-radius: var(--r); padding: 28px 16px;
  text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
  margin-bottom: 14px;
}
.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: var(--primary); background: var(--primary-l);
}
.file-upload-hint {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted); font-size: 14px;
}
.file-upload-icon { font-size: 32px; }

.file-list { display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--bg); border-radius: var(--r); border: 1px solid var(--border);
}
.file-icon { font-size: 18px; flex-shrink: 0; }
.file-name { flex: 1; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 11px; color: var(--muted); white-space: nowrap; }
.file-del { flex-shrink: 0; }

/* ---- 全网报道监控卡片 ---- */
.news-keywords-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.news-keywords-bar label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.news-keywords-bar input[type="text"] { flex: 1; min-width: 220px; font-size: 13px; }

.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item {
  display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r);
  border: 1px solid var(--border); background: var(--bg);
  transition: opacity .3s;
}
.news-unkept { opacity: .45; }
.news-body { flex: 1; min-width: 0; }
.news-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-title a { color: var(--primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; display: inline-block; }
.news-title a:hover { text-decoration: underline; }
.news-kw-badge {
  font-size: 11px; background: var(--primary-l); color: var(--primary);
  padding: 1px 8px; border-radius: 10px; white-space: nowrap;
}
.news-meta { font-size: 11px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.news-has-content { color: var(--green); }
.news-no-content { color: var(--amber); }
.news-snippet { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.news-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.news-actions.row { flex-direction: row; align-items: center; gap: 8px; }

.news-ai-score-badge {
  font-size: 11px; padding: 1px 8px; border-radius: 10px; white-space: nowrap;
  background: #f3f4f6; color: #6b7280;
}
.news-ai-score-badge.high { background: #dcfce7; color: #16a34a; font-weight: 600; }
.news-ai-score-badge.mid { background: #fef3c7; color: #d97706; font-weight: 600; }
.news-ai-score-badge.low { background: #fee2e2; color: #dc2626; font-weight: 600; }

/* ---- 报道监控：候选区 / 待采集区 ---- */
.news-sub { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.news-sub-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--text);
}
.news-sub-head .ai-status { font-weight: 400; }
.news-sub-head b { color: var(--primary); }
.cand-item { border-left: 3px solid var(--primary-l); }
.cand-item .news-kw-badge.high { background: #dcfce7; color: #16a34a; font-weight: 600; }
.sel-item { border-left: 3px solid var(--green); background: var(--green-l, #f0fdf4); }

/* ---- AI 总结：简版 + 更多展开 ---- */
.ai-short {
  font-size: 14px; line-height: 1.75; color: var(--text);
  margin: 0 0 4px;
}
.ai-detail {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.ai-more { margin-top: 8px; }

/* ---- 站点修复规则管理 ---- */
.rule-form-row {
  display: flex; gap: 10px; margin-bottom: 8px; align-items: flex-end;
}
.rule-fg {
  display: flex; flex-direction: column; gap: 3px; flex: 1;
}
.rule-fg label {
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.rule-fg input, .rule-fg select {
  font-size: 13px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--card); color: var(--text);
  outline: none;
}
.rule-fg input:focus, .rule-fg select:focus {
  border-color: var(--primary);
}

.rule-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.rule-table th {
  text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.rule-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.rule-table tr:last-child td { border-bottom: none; }
.rule-table tr:hover td { background: var(--bg); }
.rule-disabled td { opacity: 0.45; }

/* 规则分组 + 折叠 */
.rule-group { margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.rule-group-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; user-select: none;
  background: var(--bg); transition: background .1s;
}
.rule-group-header:hover { background: var(--primary-l); }
.rule-group-header .group-icon { font-size: 16px; }
.rule-group-header .group-domain { font-weight: 700; font-size: 14px; flex: 1; }
.rule-group-header .group-count { font-size: 12px; color: var(--muted); }
.rule-group-header .group-toggle { font-size: 13px; color: var(--muted); transition: transform .2s; }
.rule-group-header .group-toggle.open { transform: rotate(90deg); }
.rule-group-body { display: none; overflow-x: auto; }
.rule-group-body.open { display: block; }
.rule-group-body .rule-table { margin: 0; }
.rule-group-body .rule-table td:first-child { padding-left: 20px; }

/* 分页控件 */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; padding: 8px 0; flex-wrap: wrap;
}
.pagination .page-btn {
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--card); cursor: pointer; font-size: 13px; color: var(--text); min-width: 34px; text-align: center;
}
.pagination .page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination .page-btn:disabled { opacity: 0.4; cursor: default; }
.pagination .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .page-info { font-size: 13px; color: var(--muted); padding: 0 8px; }

/* ---- AI 采集规则分析 ---- */
.ai-analyze-card { border: 1px solid var(--primary-l); background: linear-gradient(135deg, #f8faff 0%, #eef1ff 100%); }
.ai-analyze-card h2 { color: var(--primary-d); }
.ai-nl-row { margin-bottom: 4px; }
.ai-describe {
  width: 100%; font-size: 14px; padding: 12px 14px;
  border: 2px solid var(--primary-l); border-radius: 10px;
  background: var(--card); color: var(--text); outline: none;
  resize: vertical; min-height: 100px; line-height: 1.6;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ai-describe:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb, 99, 102, 241), 0.12);
}
.ai-describe::placeholder { color: var(--muted); opacity: 0.7; font-size: 13px; }
.ai-analyze-url-row { display: flex; gap: 8px; align-items: flex-start; }
.ai-analyze-url-row input[type="url"] {
  flex: 1; font-size: 14px; padding: 9px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); outline: none;
}
.ai-analyze-url-row input[type="url"]:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l);
}
.ai-analyze-hint {
  width: 100%; font-size: 13px; padding: 8px 12px; margin-top: 8px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); outline: none; resize: vertical;
}
.ai-analyze-hint:focus { border-color: var(--primary); }
.ai-result { margin-top: 16px; display: none; }
.ai-result.active { display: block; }
.ai-result-inner {
  background: var(--card); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 16px;
}
.ai-result-inner h4 {
  margin: 0 0 12px; font-size: 15px; color: var(--primary-d);
}
.ai-result-inner h4 small { font-weight: 400; color: var(--muted); font-size: 12px; }
.ai-result-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px;
}
.ai-result-item {
  background: var(--bg); border-radius: 6px; padding: 10px 12px;
}
.ai-result-item .ai-r-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; margin-bottom: 3px; }
.ai-result-item .ai-r-val { font-family: "SF Mono","Fira Code","Consolas",monospace; font-size: 13px; color: var(--primary-d); word-break: break-all; }
.ai-result-item .ai-r-val.null { color: var(--muted); font-style: italic; }
.ai-metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.ai-metric-item {
  background: var(--bg); border-radius: 6px; padding: 8px 10px; text-align: center;
}
.ai-metric-item .ai-m-num { font-size: 18px; font-weight: 700; color: var(--primary-d); }
.ai-metric-item .ai-m-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ai-result-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ai-skill-notes { flex: 1; min-width: 180px; }
.ai-skill-notes input {
  width: 100%; font-size: 13px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 6px; outline: none;
}
.ai-skill-notes input:focus { border-color: var(--primary); }

/* ---- 候选式结果卡片 ---- */
.cand-group { margin-bottom: 18px; }
.cand-title {
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.cand-title small { font-weight: 400; color: var(--muted); font-size: 12px; }
.cand-title .cand-count { margin-left: auto; color: var(--muted); font-weight: 400; }
.cand-list { display: flex; flex-direction: column; gap: 8px; }
.cand-card {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg); border: 2px solid var(--border); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; transition: all 0.15s ease;
}
.cand-card:hover { border-color: var(--primary); background: var(--primary-l); }
.cand-card.selected { border-color: var(--primary); background: var(--primary-l); box-shadow: 0 2px 8px rgba(var(--primary-rgb, 99,102,241),0.2); }
.cand-card.empty {
  cursor: default; color: var(--muted); font-style: italic; justify-content: center;
  border-style: dashed; background: transparent;
}
.cand-card.empty:hover { border-color: var(--border); background: transparent; }
.cand-radio {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border);
  flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; transition: all 0.15s;
}
.cand-card.selected .cand-radio { background: var(--primary); border-color: var(--primary); }
.cand-card.selected .cand-radio::after { content: "✓"; }
.cand-body { flex: 1; min-width: 0; }
.cand-text {
  font-size: 14px; line-height: 1.5; color: var(--text);
  max-height: 4.2em; overflow: hidden; word-break: break-word;
}
.cand-meta { display: flex; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.cand-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
  background: var(--primary-l); color: var(--primary-d); font-weight: 600;
}
.cand-tag.metric { background: #fff4e5; color: #b9770b; }
.cand-tag.site { background: #e8f4ff; color: #2563eb; }
.cand-conf { font-size: 11px; color: var(--muted); }
.cand-conf.high { color: #16a34a; font-weight: 600; }
.cand-preview { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.cand-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.cand-tip { font-size: 12px; color: var(--muted); margin:-4px 0 10px; }

/* 每个字段的「自然语言重新匹配」面板 */
.cand-rematch { margin-top: 8px; }
.cand-rematch-toggle {
  background: none; border: 1px dashed var(--border); color: var(--muted);
  font-size: 12px; padding: 4px 10px; border-radius: 6px; cursor: pointer;
}
.cand-rematch-toggle:hover { border-color: var(--primary); color: var(--primary); }
.cand-rematch-panel { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.cand-rematch-input {
  flex: 1; min-width: 220px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; background: var(--bg); color: var(--text);
}
.cand-rematch-input:focus { outline: none; border-color: var(--primary); }
.cand-rematch-status { font-size: 12px; color: var(--muted); }
.cand-rematch-status.ok { color: #16a34a; }
.cand-rematch-status.err { color: #dc2626; }
.cand-card.rematch-card { border-style: dashed; }
.cand-card.rematch-card.selected { border-style: solid; }

/* 空值选项：页面无此字段 */
.cand-card.null-card { border-style: dashed; border-color: var(--amber); background: var(--amber-l); cursor: pointer; }
.cand-card.null-card:hover { border-color: var(--red); background: var(--red-l); }
.cand-card.null-card.selected { border-color: var(--red); background: var(--red-l); }

/* PIN 解锁层 */
.pin-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
}
.pin-box {
  background: var(--card); border-radius: var(--radius);
  padding: 32px 36px; box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  max-width: 400px; width: 90%; text-align: center;
}
.pin-box h3 { margin: 0 0 8px; font-size: 18px; }

/* ---- 各平台 Cookie 管理 ---- */
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover { background: #148f4e; border-color: #148f4e; color: #fff; }
.btn-sm.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-sm.green:hover { background: #148f4e; border-color: #148f4e; color: #fff; }
.btn.purple { background: #7c4dff; border-color: #7c4dff; color: #fff; }
.btn.purple:hover { background: #6a3de8; border-color: #6a3de8; color: #fff; }

.ai-short { line-height: 1.5; }
.ai-meta { font-size: 13px; }
.ai-chip { background: var(--bg-soft); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; }
.ai-chip b { color: var(--text); font-weight: 700; }
.inp { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); font-size: 14px; box-sizing: border-box; }
.inp:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

.cookie-toolbar { display: flex; gap: 10px; margin: 6px 0 12px; flex-wrap: wrap; }
.cookie-toolbar select { max-width: 220px; }
.cookie-editor textarea {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.5; resize: vertical;
}
.cookie-note-row { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.cookie-note-row input[type=text] { flex: 1; min-width: 160px; }
.cookie-note-row .chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.cookie-note-row .chk input { width: auto; }

.cookie-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.cookie-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; background: var(--bg-soft);
}
.cookie-item-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cookie-item-head .spacer { flex: 1; }
.cookie-item-head .btn-sm { padding: 4px 10px; font-size: 12px; }

.cookie-analyze-result {
  margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-soft); overflow: hidden;
}
.cookie-analyze-result .ca-head { padding: 10px 12px; font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--border); background: var(--card); }
.cookie-analyze-result .ca-body {
  margin: 0; padding: 12px; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; color: var(--text);
}

/* ---- 报表/周报中心共享样式（P2-1 / P2-2） ---- */
.report-pre {
  background: #fafafa; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; white-space: pre-wrap; word-break: break-word;
  max-height: 420px; overflow: auto; font-size: 13px; color: var(--text);
}
.report-list a {
  display: block; padding: 6px 8px; border-radius: 6px;
  color: var(--link, #1a73e8); cursor: pointer;
}
.report-list a:hover { background: #f0f0f0; }
.chart-wrap { width: 100%; max-height: 320px; }
.wecom-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wecom-row .inp { flex: 1 1 320px; }
.wecom-row .muted { font-size: 13px; }
.wecom-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
.wecom-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.wecom-grid .inp { width: 100%; }

/* 推送模板编辑器（P2-4） */
.tpl-vars { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.tpl-chip {
  background: #eef2ff; color: #3b48d6; border: 1px solid #d6ddff; border-radius: 6px;
  padding: 3px 8px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer; user-select: none;
}
.tpl-chip:hover { background: #e0e7ff; }
.tpl-area {
  width: 100%; min-height: 168px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.55; padding: 10px 12px; box-sizing: border-box;
}
.tpl-samples { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* 运营报表 - 调度 tab 磁贴与网格 */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0 0; }
.stat-tile { background: linear-gradient(135deg, #fff 0%, #f7f9ff 100%); border: 1px solid var(--border); border-radius: 10px; padding: 16px 14px; text-align: center; }
.stat-tile .stat-num { font-size: 22px; font-weight: 700; color: #4f6bff; line-height: 1.2; word-break: break-all; }
.stat-tile .stat-label { font-size: 12px; color: var(--muted); margin-top: 6px; }
.sched-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.sched-grid .card { margin: 0; }
.sched-grid .card h3 { margin: 0 0 8px; font-size: 15px; }
.sched-grid .sched-action .btn { padding: 8px 16px; }
.scroll-y { max-height: 220px; overflow-y: auto; }
.cron-hint-pre { background: #1e1e1e; color: #d4d4d4; padding: 10px 12px; border-radius: 8px; overflow: auto; font-size: 12.5px; margin: 0; line-height: 1.6; max-height: 180px; }
.sched-grid .report-list a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; color: var(--text); font-size: 13px; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.sched-grid .report-list a:last-child { border-bottom: none; }
.sched-grid .report-list a:hover { background: #f4f6ff; }
.sched-grid .report-list .tag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.sched-grid .report-list .tag.purple { background: #ede9ff; color: #6b3df5; }
.sched-grid .report-list .tag.green { background: #e3f5e8; color: #1aab5e; }
@media (max-width: 820px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .sched-grid { grid-template-columns: 1fr; }
  .scroll-y { max-height: 260px; }
}

/* ---- 聚合页 tab 切换 ---- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin: 14px 0 18px; flex-wrap: wrap; }
.tab {
  background: none; border: none; padding: 9px 16px; cursor: pointer;
  font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent;
  font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab-pane { animation: tabfade .18s ease; display: none; }
.tab-pane.active { display: block; }
@keyframes tabfade { from { opacity: .35; } to { opacity: 1; } }

/* ---- 三栏导航 tab 切换器（header 内） ---- */
.tabbar { display: flex; gap: 6px; margin-left: 12px; align-items: center; }
.tab-btn {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border, #d8dde6);
  background: transparent; color: var(--text, #222);
  padding: 6px 14px; border-radius: 20px; font-size: 13px; cursor: pointer;
  white-space: nowrap; transition: all .15s var(--ease, ease);
}
.tab-btn:hover { border-color: var(--primary, #2b7); color: var(--primary, #2b7); }
.tab-btn.active { background: var(--primary, #2b7); border-color: var(--primary, #2b7); color: #fff; font-weight: 600; }
/* 桌面端：激活的 pane 内 nav-item 横向排布（覆盖默认 display:block） */
.topnav .tab-pane.active { display: flex; align-items: stretch; gap: 2px; }
@media (max-width: 820px) {
  .tabbar { margin-left: 0; }
  .tab-btn { padding: 5px 10px; font-size: 12px; }
  .topnav .tab-pane.active { flex-direction: column; align-items: stretch; }
}

/* ---- 采集新商品 Tab 专用：磁贴/进度/补齐队列 ---- */
.coll-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 14px; }
.coll-toolbar select { min-width: 260px; }
.prog { height: 12px; border-radius: 8px; background: var(--border); overflow: hidden; margin: 8px 0; }
.prog > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .3s var(--ease); }
.miss-list { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.miss-list li { background: color-mix(in srgb, #e23b3b 12%, var(--card)); color: #e23b3b;
  border: 1px solid color-mix(in srgb, #e23b3b 30%, transparent); border-radius: 8px; padding: 3px 9px; font-size: 12px; }
.field-mod { margin-bottom: 12px; }
.field-mod > h4 { margin: 0 0 6px; font-size: 13px; color: var(--text-2); }
.field-row { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.field-row .fl { width: 150px; color: var(--muted); flex: none; }
.field-row .fv { flex: 1; word-break: break-word; }
.field-row .fs-tag { font-size: 11px; padding: 1px 7px; border-radius: 6px; margin-left: 6px; }
.fs-manual { background: color-mix(in srgb, #1aab5e 16%, var(--card)); color: #1aab5e; }
.fs-llm { background: color-mix(in srgb, #4f6bff 16%, var(--card)); color: #4f6bff; }
.fs-platform { background: color-mix(in srgb, #f5a623 16%, var(--card)); color: #f5a623; }
.fs-ocr { background: color-mix(in srgb, #9b59b6 16%, var(--card)); color: #9b59b6; }
.cf-badge { font-size: 11px; padding: 1px 7px; border-radius: 6px; margin-left: 4px; white-space: nowrap; }
.cf-high { background: color-mix(in srgb, #1aab5e 18%, var(--card)); color: #1aab5e; }
.cf-mid { background: color-mix(in srgb, #f5a623 18%, var(--card)); color: #f5a623; }
.cf-low { background: color-mix(in srgb, #e23b3b 18%, var(--card)); color: #e23b3b; }
.field-row.miss .fl::after { content: " *"; color: #e23b3b; }
.sugg { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 8px; background: var(--card); }
.sugg .s-head { font-size: 13px; font-weight: 600; }
.sugg .s-val { color: var(--text); margin: 3px 0; word-break: break-word; }
.sugg .s-meta { font-size: 11px; color: var(--muted); }
.md-preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; max-height: 420px; overflow: auto; font-size: 13px; line-height: 1.7; }
.md-preview h1, .md-preview h2, .md-preview h3 { margin: 10px 0 6px; }
.md-preview ul { padding-left: 20px; margin: 6px 0; }
.md-preview code { background: var(--border); padding: 1px 5px; border-radius: 4px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.media-cell { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); }
.media-cell img, .media-cell video { width: 100%; height: 96px; object-fit: cover; display: block; }
.media-cell .m-meta { font-size: 11px; padding: 4px 6px; color: var(--muted); display: flex; justify-content: space-between; }

/* ---- ops-card：insights 主体卡（紧凑头 + 自适应空态） ---- */
.ops-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); margin-top: 14px;
}
.ops-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.ops-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ops-ic {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef1ff, #f0f7ff); font-size: 16px; flex: 0 0 auto;
}
.ops-title > span:nth-child(2) {
  font-weight: 700; font-size: 15px; color: var(--text);
}
.ops-hint { color: var(--muted); font-size: 12px; line-height: 1.4; }
.ops-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ops-actions .inp { padding: 7px 10px; font-size: 13px; }
.ops-stat { color: var(--muted); font-size: 13px; margin: 10px 0 0; min-height: 18px; }

/* 大空态（替代旧的 padding:30-48px .empty，避免半屏空白） */
.empty-lg {
  padding: 64px 16px;
  text-align: center; color: var(--muted);
  border: 2px dashed var(--border); border-radius: 12px;
  background: #fafbfd; font-size: 16px; line-height: 1.7;
  min-height: 240px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
}
.empty-lg .muted { margin-top: 4px; }

/* ---- 移动端适配（顶栏汉堡纵向菜单） ---- */
@media (max-width: 820px) {
  .hamburger { display: inline-flex; }
  .topbar { gap: 10px; padding: 0 12px; }
  .topbar .brand-name { display: none; }
  .topnav {
    position: absolute; top: 58px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 58px); overflow-y: auto; padding: 8px;
    display: none;
  }
  .topnav.open { display: flex; }
  .nav-item { display: block; }
  .nav-trigger { width: 100%; justify-content: space-between; height: 46px; }
  .nav-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: transparent; padding: 0 0 6px 6px;
    display: none;
  }
  .nav-item.open .nav-menu { display: block; }
  .backdrop.show { display: block; }
  .container { padding: 18px 14px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head .head-actions { width: 100%; display: flex; gap: 8px; }
  .page-head .head-actions .btn { flex: 1 1 auto; }
  .card { padding: 16px 14px; }
  .wecom-row .inp { flex: 1 1 100%; }
}

/* ===== 内容审核台（M2 card-review）新增组件样式 ===== */
.page-title { font-size: 20px; font-weight: 700; margin: 4px 0 6px; }
.muted { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.card-block { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.block-title { font-weight: 700; font-size: 15px; }
.variant-row { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: #fafbff; }
.v-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.v-body { font-size: 13px; color: var(--text); line-height: 1.5; margin-bottom: 8px; }
.v-actions { display: flex; gap: 8px; }
.v-reason { font-size: 12px; color: var(--red); margin-top: 4px; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { background: #c93a3f; border-color: #c93a3f; color: #fff; }

/* 审核台批量操作条 + 变体勾选布局 */
.bulk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 4px; padding: 10px 12px; background: #f4f6ff; border: 1px solid var(--border); border-radius: 10px; }
.bulk-bar .ck-all { font-size: 13px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bulk-bar .muted { margin-left: auto; }
.btn.mini { padding: 5px 10px; font-size: 12px; line-height: 1.4; }
.variant-row { display: flex; align-items: flex-start; gap: 10px; }
.variant-row .ck { padding-top: 2px; }
.variant-row .v-main { flex: 1; min-width: 0; }

/* 磁贴 / 标签 颜色修饰（审核台复用） */
.stat-tile .stat-num.red { color: #e23b3b; }
.stat-tile .stat-num.amber { color: #e0962a; }
.stat-tile .stat-num.green { color: #1aab5e; }
.stat-tile .stat-num.blue { color: #4f6bff; }
.tag.blue { background: #e3ecff; color: #2f5bd6; }
.tag.red { background: #fde3e3; color: #c93a3f; }
.tag.green { background: #e3f5e8; color: #1aab5e; }
.tag.purple { background: #ede9ff; color: #6b3df5; }
.tag.gray { background: #eef0f3; color: #6b7280; }

/* ===== 流程化工具：流程进度条导航 ===== */
.section-h { font-size: 15px; font-weight: 700; margin: 22px 0 12px; color: var(--text); }
.flow-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 14px 0 10px; }
.flow-step { display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 10px; background: #fff;
  text-decoration: none; color: var(--text); min-width: 64px; transition: all .15s; }
.flow-step:hover { border-color: #4f6bff; box-shadow: 0 2px 8px rgba(79,107,255,.12); }
.flow-step.current { border-color: #4f6bff; background: #eef2ff; box-shadow: 0 0 0 3px rgba(79,107,255,.15); }
.fs-num { width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%;
  background: #4f6bff; color: #fff; font-size: 12px; font-weight: 700; }
.flow-step.current .fs-num { background: #1aab5e; }
.fs-t { font-size: 13px; font-weight: 600; }
.fs-s { font-size: 10px; color: var(--muted); }
.flow-arrow { color: #b9c2d6; font-size: 12px; }

/* ===== 上下文提示框 ===== */
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px;
  background: #fff8e6; border: 1px solid #f3d98a; margin: 12px 0; }
.hint-go { background: #eef6ff; border-color: #bcd4ff; }
.hint-ok { background: #e9f8ee; border-color: #b6e6c5; }
.hint-ico { font-size: 18px; line-height: 1.3; }
.hint-body { font-size: 13.5px; line-height: 1.6; color: var(--text); }
.hint-link { color: #2f5bd6; font-weight: 700; text-decoration: none; }
.hint-link:hover { text-decoration: underline; }

/* ===== 分步操作卡片 ===== */
.step-grid { margin-top: 8px; }
.step-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; background: #fff; }
.step-ico { flex: 0 0 auto; width: 34px; height: 34px; line-height: 34px; text-align: center;
  border-radius: 9px; background: #eef2ff; color: #2f5bd6; font-weight: 800; font-size: 16px; }
.gate-card { background: #fff5f5; border-color: #f3c9c9; }
.gate-card .step-ico { background: #fde3e3; color: #c93a3f; }
.step-body { flex: 1; min-width: 0; }
.step-body b { font-size: 14.5px; }
.step-body .muted { margin: 4px 0 8px; font-size: 13px; }
.step-body .btn.mini { margin-right: 6px; margin-bottom: 6px; }
.nowrap { white-space: nowrap; }

/* ===== 宪章 7 步主循环：动画流程图 ===== */
.loop-wrap { margin-top: 6px; background: #fbfcff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 16px; }
.loop-rail { position: relative; height: 4px; background: linear-gradient(90deg,#4f6bff,#1aab5e,#f5a623); border-radius: 4px; margin-bottom: 16px; overflow: visible; }
.loop-runner { position: absolute; top: -5px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid #4f6bff; box-shadow: 0 0 10px rgba(79,107,255,.6);
  animation: loopRun 6s linear infinite; }
@keyframes loopRun { 0% { left: 0; } 100% { left: calc(100% - 14px); } }
.loop-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.loop-node { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 92px;
  padding: 10px 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
  animation: nodePulse 3s ease-in-out infinite; animation-delay: var(--d, 0s); }
.loop-node.gate { background: #fff5f5; border-color: #f3c9c9; }
.loop-node b { font-size: 13px; }
.loop-node small { font-size: 11px; color: var(--muted); text-align: center; }
.ln-ico { font-size: 18px; }
.gate-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  background: #c93a3f; color: #fff; }
.gate-badge.red { background: #c93a3f; }
@keyframes nodePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(79,107,255,0); }
  50% { box-shadow: 0 0 0 4px rgba(79,107,255,.18); } }
.loop-foot { text-align: center; margin-top: 14px; font-size: 12px; }

/* ===== 响应式：流程条/卡片在窄屏转单列 ===== */
@media (max-width: 820px) {
  .flow-strip { gap: 4px; }
  .flow-step { min-width: 52px; padding: 6px 9px; }
  .fs-t { font-size: 12px; }
  .loop-node { min-width: 72px; }
  .step-grid { grid-template-columns: 1fr; }
}
.tag.amber { background: #fdf0db; color: #b9791a; }

/* ===== 增长洞察 / 周日报 页面组件 ===== */
.ind-list, .ev-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.ind-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.ev-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.ev-row { font-size: 12.5px; color: var(--text); padding: 4px 0; }
.md-preview { background: #0f1729; color: #e6edf3; padding: 14px 16px; border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; }

/* ===== 邮件营销后台：卡片 / 面板 / tab 激活 ===== */
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.panel { margin-top: 4px; }
.tab.active { border-color: #4f6bff; color: #2f5bd6; background: #eef2ff; }


/* ===== 运营驾驶舱 /ops 专用组件 ===== */
.loop-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--card); transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease); }
.loop-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border-strong); }
.loop-ic { width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; background: var(--primary-ghost); }
.loop-body { flex: 1 1 auto; min-width: 0; }
.loop-name { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 3px; }
.loop-desc { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-bottom: 9px; }
.loop-note { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.pillar { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--card); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.pillar:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.pillar-ic { font-size: 22px; margin-bottom: 6px; }
.pillar-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.pillar-desc { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.route-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.route-tag { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--bg); color: var(--text-2); font-size: 13px; font-weight: 500; border: 1px solid var(--border); transition: all .15s var(--ease); }
.route-tag:hover { background: var(--primary-ghost); color: var(--primary); border-color: var(--primary); }
.mini { border: 1px solid var(--border); border-radius: 12px; padding: 18px; text-align: center; background: var(--card); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.mini:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.mini-num { font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1; }
.mini-label { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ============================================================
   全站高级化 · 平滑主题过渡 / 表格 / 磁贴微交互 / 滚动条
   ============================================================ */
html { scroll-behavior: smooth; }
body { transition: background .25s var(--ease), color .25s var(--ease); }

/* 主题切换时避免闪烁 */
.theme-toggle .ic-moon, .theme-toggle .ic-sun { transition: transform .3s var(--ease), opacity .2s var(--ease); }

/* 统计磁贴：悬浮微浮 */
.stat-tile { transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease); }
.stat-tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border-strong); }

/* 表格高级化 */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; margin-bottom: 16px; }
thead th {
  text-align: left; font-weight: 700; color: var(--muted); font-size: 12.5px;
  background: var(--bg); padding: 11px 14px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
thead th:first-child { border-top-left-radius: 10px; }
thead th:last-child { border-top-right-radius: 10px; }
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
tbody tr { transition: background .14s var(--ease); }
tbody tr:hover { background: var(--bg); }
tbody tr:last-child td:first-child { border-bottom-left-radius: 10px; }
tbody tr:last-child td:last-child { border-bottom-right-radius: 10px; }
table.wrap, .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }

/* 自定义滚动条（webkit） */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }

/* 卡片可悬浮（用于可点击卡） */
.card.hoverable:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border-strong); }

/* 焦点可见性统一 */
a:focus-visible, button:focus-visible, .nav-trigger:focus-visible, .theme-toggle:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

/* 选中态品牌色 */
::selection { background: var(--primary-ghost); color: var(--primary-d); }
