/* ============================================================
   金牛 · AI 开放平台 —— 浅色红主题
   ============================================================ */
:root {
  --red: #e23b32;
  --red-d: #c9302a;
  --red-soft: #fdecea;
  --red-soft-2: #fff4f3;
  --ink: #1f2329;
  --ink-2: #4e5663;
  --muted: #8a9099;
  --muted-2: #a6abb3;
  --line: #f0f1f3;
  --line-2: #f5f6f8;
  --bg: #ffffff;
  --bg-soft: #fafafb;
  --radius: 16px;
  --shadow-sm: 0 6px 18px rgba(20, 20, 40, 0.03);
  --shadow-md: 0 12px 30px rgba(20, 20, 40, 0.07);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(620px 300px at 16% 0%, rgba(226, 59, 50, 0.06), transparent 70%),
    radial-gradient(680px 340px at 90% 4%, rgba(226, 59, 50, 0.055), transparent 70%),
    radial-gradient(560px 300px at 72% 96%, rgba(226, 59, 50, 0.035), transparent 72%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

/* 作者样式里的 display 会盖掉浏览器默认的 [hidden]{display:none},
   导致 JS 里 el.hidden = true 失效(典型: 登录二维码未加载时显示裂图)。这里强制兜住。 */
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.site-header, .site-main { position: relative; z-index: 1; }

.site-main { min-height: calc(100vh - 64px - 210px); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 64px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #f2f3f5;
}

.header-inner { height: 64px; display: flex; align-items: center; gap: 34px; }

.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-mark { display: inline-grid; place-items: center; line-height: 0; }
.brand-logo { display: block; width: 30px; height: 30px; object-fit: contain; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0.2px; white-space: nowrap; }
.brand-sep { color: #c9ccd2; margin: 0 2px; font-weight: 700; }

.nav { display: flex; align-items: center; gap: 28px; height: 64px; flex-shrink: 0; }
.nav-item {
  position: relative;
  height: 64px;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: var(--ink-2);
  transition: color 0.15s;
  white-space: nowrap;   /* 空间不足时宁可溢出, 也不要"首页"被挤成竖排 */
  flex-shrink: 0;
}
.nav-item:hover { color: var(--ink); }
.nav-item.active { color: var(--red); font-weight: 600; }
.nav-item.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.btn-login {
  background: var(--red);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 9px;
  box-shadow: 0 5px 14px rgba(226, 59, 50, 0.22);
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}
.btn-login:hover { background: var(--red-d); transform: translateY(-1px); }

.pill-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--red);
  background: #fff1f0;
  border: 1px solid #fbdcd9;
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.15s;
  white-space: nowrap;
}
.pill-credit:hover { background: #ffe9e7; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: #f2f3f5;
  display: grid; place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  background-image: linear-gradient(135deg, #ffb199, #e23b32);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 头像悬停卡片: 显示「我的 ID」(完整 openid)+ 一键复制。
   微信昵称大量是「微信用户」, 管理员只能靠 openid 认人, 这里给用户一个自查出口。
   padding-top 是「悬停桥」——鼠标从头像滑到卡片时中间不留空隙, 否则 hover 会中断。 */
.avatar-wrap { position: relative; display: flex; align-items: center; flex-shrink: 0; }

.avatar-pop {
  position: absolute;
  top: 100%;
  right: -2px;
  z-index: 70;
  width: 292px;
  max-width: calc(100vw - 24px);
  padding-top: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.avatar-wrap:hover .avatar-pop,
.avatar-wrap:focus-within .avatar-pop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.avatar-pop-card {
  background: #fff;
  border: 1px solid #eceef1;
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(20, 20, 40, 0.13);
  padding: 12px 14px 11px;
  text-align: left;
}
.avatar-pop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.avatar-pop-head b {
  font-size: 13px; color: var(--ink); font-weight: 600;
  max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.avatar-pop-sub { font-size: 11px; color: var(--muted); white-space: nowrap; }

.avatar-pop-row { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.avatar-pop-label { font-size: 12px; color: #9aa1ad; white-space: nowrap; }
.avatar-pop-id {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: #3f4753;
  background: #f7f8fa;
  border: 1px solid #eef0f3;
  border-radius: 7px;
  padding: 5px 7px;
  word-break: break-all;
  user-select: all;           /* 点一下即整段选中, 手选也方便 */
  -webkit-user-select: all;
}

.avatar-pop-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.btn-copy-id {
  border: 1px solid #f3c9c6; background: #fff1f0; color: var(--red);
  font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  cursor: pointer; transition: background 0.15s;
}
.btn-copy-id:hover { background: #ffe4e1; }
.avatar-pop-link { font-size: 12px; color: var(--red); }
.avatar-pop-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
  /* 窄屏头像贴着右上角, 卡片若仍以头像为参照会向左溢出屏外。
     改成 fixed 后按 header 盒定位(.site-header 有 backdrop-filter, 天然是 fixed 的包含块),
     右边留 12px, 卡片永远落在视口内。 */
  .avatar-pop { position: fixed; top: 62px; right: 12px; width: min(292px, calc(100vw - 24px)); }
}

/* 触屏没有 hover: 悬停卡片直接不渲染, 免得 iOS 把 :hover 粘住。
   移动端看 ID 走「我的」页的 .account-strip(常驻、可复制)。 */
@media (hover: none) {
  .avatar-pop { display: none !important; }
}

/* 「我的」页常驻 ID 条 */
.account-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 9px 14px;
  background: #fbfcfe; border: 1px solid #eef1f6; border-radius: 12px;
  font-size: 12px; color: #6b7280;
}
.account-strip-label { color: #9aa1ad; white-space: nowrap; }
.account-strip-id {
  font-family: var(--mono); font-size: 12px; line-height: 1.5; color: #3f4753;
  background: #fff; border: 1px solid #eef0f3; border-radius: 7px; padding: 3px 8px;
  word-break: break-all; user-select: all; -webkit-user-select: all;
}
@media (max-width: 480px) {
  .account-strip { gap: 8px; padding: 9px 12px; }
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 1;
  color: #6b7280;
  background: #f4f5f7;
  border: 1px solid #e5e7eb;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-logout:hover { background: #ffe9e7; color: var(--red); border-color: #fbdcd9; }
/* PC 显示"安全退出", 窄屏改显示"退出"(2 字) */
.btn-logout .lo-short { display: none; }

/* 窄屏: 退出按钮收窄 + 文案缩短, 避免和头像/充值积分挤在一起 */
@media (max-width: 640px) {
  .btn-logout { padding: 6px 10px; font-size: 12px; }
  .btn-logout .lo-full { display: none; }
  .btn-logout .lo-short { display: inline; }
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  padding: 12px 26px;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 22px rgba(226, 59, 50, 0.26);
}
.btn-primary:hover { background: var(--red-d); transform: translateY(-1px); }
.btn-ghost {
  background: #fff;
  color: #3d4450;
  border: 1px solid #e6e8eb;
  box-shadow: 0 4px 12px rgba(20, 20, 40, 0.04);
}
.btn-ghost:hover { border-color: #f3c9c6; color: var(--red); }
.btn-sm { font-size: 13px; padding: 8px 16px; border-radius: 999px; }

/* ---------------- Hero ---------------- */
.hero { padding: 76px 0 40px; }
.hero-inner { text-align: center; }

/* 数据球体: 体现数据研究与评级评价能力 */
.hero-orb {
  position: relative;
  width: 176px;
  height: 176px;
  margin: 0 auto 22px;
}
.hero-orb::before {
  content: "";
  position: absolute;
  inset: -34%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 59, 50, 0.14), rgba(226, 59, 50, 0) 64%);
  pointer-events: none;
}
.hero-orb::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  box-shadow: inset 0 0 34px rgba(226, 59, 50, 0.07);
  pointer-events: none;
}
.hero-orb canvas {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.hero-title {
  margin: 0;
  font-size: 46px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #1b1b1b;
  line-height: 1.25;
}
.hero-title .accent { color: var(--red); }

.hero-sub {
  margin: 22px auto 0;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}

.hero-actions { margin-top: 34px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.stat-card {
  margin: 48px auto 0;
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid #f1f1f3;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(20, 20, 40, 0.06);
  padding: 22px 12px;
}
.stat { padding: 0 46px; text-align: center; }
.stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: 0.5px; color: #1f2329; line-height: 1.1; }
.stat span { display: block; margin-top: 8px; font-size: 12px; color: var(--muted-2); }
.stat-divider { display: block; width: 1px; height: 38px; background: #f0f0f2; }

/* ---------------- Footer ---------------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 84px;
  padding: 38px 0 46px;
  border-top: 1px solid #f2f2f4;
  text-align: center;
}
.foot-copy { margin: 0; font-size: 12px; color: var(--muted-2); }
.foot-copy a { transition: color 0.15s; }
.foot-copy a:hover { color: var(--red); }
.foot-links { margin: 6px 0 0; font-size: 12px; color: var(--muted-2); }
.foot-links .link-btn:hover { color: var(--red); }
.foot-links .sep { margin: 0 8px; color: #d5d8dd; }

/* 文字形态的按钮(页脚协议、支付勾选里的协议名) */
.link-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: color 0.15s;
}
.link-btn:hover { color: var(--red); }

/* ---------------- 通用页 ---------------- */
.page { padding: 40px 0 20px; }

.page-head { display: flex; align-items: center; gap: 14px; }
.page-badge {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.page-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: 0.2px; }
.page-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* ---------------- 搜索 / 筛选 ---------------- */
.search {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted-2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search:focus-within { border-color: #f0b7b2; box-shadow: 0 0 0 3px rgba(226, 59, 50, 0.07); }
.search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  height: 100%;
}
.search input::placeholder { color: var(--muted-2); }

.filter-tabs { margin-top: 16px; display: flex; gap: 10px; }
.chip {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  color: var(--muted);
  background: #f6f7f9;
}
.chip.active { color: var(--red); background: var(--red-soft); }

/* ---------------- MCP 卡片 ---------------- */
.mcp-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.mcp-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px 18px;
  min-height: 222px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.mcp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #ebebef;
}
.mcp-ico { line-height: 0; }
.mcp-name {
  margin: 14px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mcp-desc {
  margin: 8px 0 0;
  flex: 1;
  font-size: 12.8px;
  line-height: 1.7;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mcp-meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
}
.mcp-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #dadde2; }

/* ---------------- 详情 ---------------- */
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--muted-2);
}
.crumb a:hover { color: var(--red); }
.crumb i { font-style: normal; color: #d5d8dd; }

.detail-head {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}
.detail-head-main { position: relative; z-index: 1; display: flex; gap: 20px; align-items: flex-start; }
.detail-ico { line-height: 0; flex-shrink: 0; }
.detail-title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: 0.2px; }
.detail-summary {
  margin: 12px 0 0;
  max-width: 800px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #7c828b;
}
.detail-head-glow {
  position: absolute;
  right: -70px;
  top: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 59, 50, 0.1), transparent 62%);
  pointer-events: none;
}

.tabs { margin-top: 26px; display: flex; gap: 28px; border-bottom: 1px solid var(--line); }
.tab {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 2px;
  font-size: 14px;
  color: #6b7280;
  transition: color 0.15s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--red); font-weight: 600; }
.tab.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.tab-count { font-size: 12px; margin-left: 2px; }

.panel { display: none; padding-top: 24px; }
.panel.active { display: block; }

/* Markdown */
.md { max-width: 920px; font-size: 13.5px; line-height: 1.95; color: var(--ink-2); }
.md > :first-child { margin-top: 0; }
.md h1, .md h2 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 26px 0 10px; }
.md h3 { font-size: 14.5px; font-weight: 700; color: var(--ink); margin: 20px 0 8px; }
.md p { margin: 8px 0; }
.md ul, .md ol { margin: 8px 0; padding-left: 22px; }
.md li { margin: 6px 0; }
.md strong { color: #2b3038; }
.md code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: #f6f7f9;
  padding: 1px 5px;
  border-radius: 4px;
  color: #b8493f;
}
.md pre {
  background: #0e1626;
  color: #d6e2f0;
  padding: 14px 16px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.7;
}
.md pre code { background: none; color: inherit; padding: 0; }
.md blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 3px solid #f6d5d2;
  background: #fff8f7;
  color: #7c828b;
  border-radius: 0 8px 8px 0;
}

/* 工具列表 */
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.tool-name {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--red);
  background: #fff3f2;
  padding: 2px 8px;
  border-radius: 6px;
}
.tool-title { margin-top: 9px; font-size: 14px; font-weight: 600; color: var(--ink); }
.tool-desc { margin: 6px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }

/* 安装 */
.install-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.install-col { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.install-foot { margin-top: 16px; font-size: 13px; color: var(--muted); }
.install-foot a { color: var(--red); }
.install-locked {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed #e9eaed;
  border-radius: 14px;
  color: var(--muted);
}
.install-locked p { margin: 0 0 18px; }

/* ---------------- 我的 ---------------- */
.seg-tabs {
  display: flex;
  gap: 28px;
  margin: 20px 0 22px;
  border-bottom: 1px solid var(--line);
}
.seg { position: relative; padding: 12px 2px; font-size: 14px; color: #6b7280; }
.seg:hover { color: var(--ink); }
.seg.active { color: var(--red); font-weight: 600; }
.seg.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--red); border-radius: 2px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}
.card-head.row-between { justify-content: space-between; }
.head-left { display: inline-flex; align-items: center; gap: 8px; }
.head-ico { color: var(--red); flex-shrink: 0; }

.key-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--red-soft);
  border-radius: 12px;
  padding: 14px 16px;
}
.key-val {
  flex: 1;
  min-width: 180px;
  font-family: var(--mono);
  font-size: 14px;
  color: #7a3b36;
  letter-spacing: 0.3px;
  word-break: break-all;
}
.key-ops { display: flex; align-items: center; gap: 8px; }
.mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #7a3b36;
  background: #fff;
  border: 1px solid #f0d6d3;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.mini:hover { border-color: #e8b7b2; background: #fff9f8; }
.mini.danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  font-weight: 600;
}
.mini.danger:hover { background: var(--red-d); border-color: var(--red-d); }

.key-hint { margin: 12px 0 0; font-size: 12px; color: var(--muted-2); }
.key-hint code {
  font-family: var(--mono);
  background: #f6f7f9;
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--ink-2);
}
/* 计费口径提示：一次提问可能触发多次工具调用，提前说清免得用户以为扣错了 */
.key-note { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--red); }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat-box { padding: 20px 22px; margin-bottom: 0; }
.stat-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.stat-num { margin-top: 10px; font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.stat-num.red { color: var(--red); }
.stat-num em { font-style: normal; font-size: 13px; font-weight: 500; color: var(--muted-2); margin-left: 4px; }
.stat-sub { margin-top: 8px; font-size: 12px; color: var(--muted-2); }

.chart-wrap {
  height: 250px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: linear-gradient(#fff, #fcfcfd);
}
.chart-empty { font-size: 13px; color: #b0b5bd; }

.filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter .to { color: var(--muted-2); font-size: 12px; }
.date-input {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #fff;
  outline: none;
}
.date-input:focus { border-color: #f0b7b2; }

.btn-sm-solid {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
}
.btn-sm-solid:hover { background: var(--red-d); }
.btn-sm.ghost { background: #fff; border: 1px solid #e6e8eb; color: #6b7280; }
.btn-sm.ghost:hover { border-color: #f3c9c6; color: var(--red); }
.btn-sm.ghost:disabled { opacity: 0.45; cursor: not-allowed; border-color: #e6e8eb; color: #b0b5bd; }

.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  font-weight: 600;
  color: #6b7280;
  background: #fafafb;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: 14px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.tbl th.num, .tbl td.num { text-align: right; }
.td-empty { text-align: center; color: #b0b5bd; padding: 30px 0 !important; }

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
}

/* 充值 */
.pkg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pkg {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.pkg:hover { border-color: #f0c4c0; }
.pkg.active {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(226, 59, 50, 0.08);
  background: #fffdfd;
}
.pkg-credits { font-size: 26px; font-weight: 800; color: var(--red); line-height: 1.1; }
.pkg-credits span { font-size: 13px; font-weight: 600; margin-left: 4px; }
.pkg-amount { margin-top: 8px; font-size: 14px; color: var(--ink-2); font-weight: 600; }

.pay-section { margin-top: 22px; background: #fff8f7; border-radius: 12px; padding: 16px 18px; }
.pay-label { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.pay-methods { display: flex; gap: 12px; flex-wrap: wrap; }
.pay-method {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 22px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.pay-method.active { border-color: var(--red); color: var(--red); font-weight: 600; }
.pay-method:disabled { opacity: 0.5; cursor: not-allowed; }

.pay-bar {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.pay-sum { font-size: 13.5px; color: var(--ink-2); }
.pay-sum b { color: var(--red); font-size: 16px; }
.pay-amount { color: var(--red); font-weight: 700; margin-left: 10px; font-size: 15px; }
.pay-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* 无明文可看时, 「显示/复制」按钮给灰态(仍可点击, 点出说明) */
.key-ops .mini.is-off { opacity: 0.42; }

.agree { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 3px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.agree input { accent-color: var(--red); }
.btn-pay { border-radius: 999px; padding: 10px 28px; font-size: 14px; }
.btn-pay:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }

/* 弹层 */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(15, 18, 25, 0.45); }
.modal-box {
  position: relative;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 18px;
  padding: 26px 24px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}
.modal-title { margin: 0; font-size: 17px; font-weight: 700; }
.qr-wrap {
  width: 200px; height: 200px;
  margin: 18px auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: grid; place-items: center;
}
.modal-tip { margin: 0; font-size: 13px; color: #6b7280; }
.modal-order { margin: 8px 0 16px; font-size: 11.5px; color: #b0b5bd; word-break: break-all; }
/* 支付弹窗底部按钮: 「我已完成支付，刷新状态」+「关闭」并排(回调丢失时用户自救入口) */
.pay-actions { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pay-actions .btn { padding: 8px 16px; font-size: 13px; }

/* ---------------- 登录 ---------------- */
.login-stage { display: grid; place-items: center; padding: 64px 20px 40px; }
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 32px 26px;
  text-align: center;
  box-shadow: 0 18px 54px rgba(20, 20, 40, 0.08);
}
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.login-brand h1 { margin: 0; font-size: 20px; font-weight: 700; }
.login-sub { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

.qr-box {
  position: relative;
  width: 208px; height: 208px;
  margin: 22px auto 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid; place-items: center;
  background: #fff;
}
.qr-box img { width: 190px; height: 190px; }
.qr-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted-2); }
.spinner {
  width: 22px; height: 22px;
  border: 2px solid #f6e3e1;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.qr-expired p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }

/* 手机浏览器(非微信)无法完成微信授权 → 站内提示「复制链接到微信打开」 */
.wx-blocked {
  margin: 22px auto 0;
  padding: 18px 16px 16px;
  border: 1px solid #f3ded9;
  border-radius: 14px;
  background: #fffaf8;
  text-align: left;
}
.wx-blocked-title { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #1f2328; }
.wx-blocked-tip { margin: 0 0 13px; font-size: 12.5px; line-height: 1.65; color: #6b7280; }
.wx-blocked-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px 8px 12px;
  border: 1px dashed #f0c9c3;
  border-radius: 10px;
  background: #fff;
}
.wx-blocked-url {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--red);
  word-break: break-all;
}
.wx-blocked-link .btn { flex: 0 0 auto; }

.login-status { margin: 16px 0 0; font-size: 13px; color: #6b7280; }
.login-agree { margin: 10px 0 0; font-size: 11.5px; color: #b0b5bd; }

/* 登录 / 授权 浮窗 */
body.modal-open { overflow: hidden; }
.modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #a3a9b3;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.modal-x:hover { background: #f4f5f7; color: #4b5563; }
.login-modal .login-card {
  position: relative;
  width: 360px;
  max-width: calc(100vw - 36px);
  padding: 32px 28px 24px;
  animation: modalPop 0.18s ease-out;
}
.login-modal .qr-box { width: 198px; height: 198px; margin-top: 20px; }
.login-modal .qr-box img { width: 182px; height: 182px; }
@keyframes modalPop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* 协议弹窗(叠在登录/支付弹窗之上) */
.legal-modal { z-index: 120; }
.legal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(880px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  animation: modalPop 0.18s ease-out;
}
.legal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid #f0f1f4;
}
.legal-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.legal-head .modal-x { position: static; }
.legal-body { position: relative; flex: 1 1 auto; min-height: 0; background: #f4f6fa; }
.legal-frame { display: block; width: 100%; height: min(72vh, 660px); border: 0; }
.legal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted-2);
  background: #f4f6fa;
}
.legal-loading[hidden] { display: none; }
.legal-foot {
  flex: 0 0 auto;
  padding: 10px 20px;
  border-top: 1px solid #f0f1f4;
  text-align: right;
  font-size: 12px;
}
.legal-foot a { color: var(--muted-2); }
.legal-foot a:hover { color: var(--red); }
.legal-foot .link-btn { color: var(--muted-2); }
.legal-foot .link-btn:hover { color: var(--red); }

/* 空状态 */
.empty { text-align: center; padding: 60px 0; color: var(--muted); font-size: 14px; }
.empty p { margin: 0 0 14px; }
.empty-lg { padding: 90px 0; }
.empty-code { font-size: 54px; font-weight: 800; color: #e9eaed; line-height: 1; margin-bottom: 8px !important; }
.empty-sub { font-size: 13px; color: var(--muted-2); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
  .mcp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .hero-title { font-size: 38px; }
  .stat { padding: 0 30px; }
  .tool-grid, .install-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .header-inner { gap: 16px; }
  .nav { gap: 18px; }
  .brand-name { font-size: 15px; }
  .brand-logo { width: 27px; height: 27px; }
  .hero { padding: 56px 0 24px; }
  .hero-orb { width: 132px; height: 132px; margin-bottom: 16px; }
  .hero-title { font-size: 29px; letter-spacing: 0.5px; }
  .hero-sub { font-size: 13.5px; margin-top: 16px; }
  .hero-actions { margin-top: 26px; }
  .btn { font-size: 14px; padding: 11px 20px; }
  .stat-card { display: flex; width: 100%; padding: 18px 6px; margin-top: 34px; }
  .stat { flex: 1; padding: 0 6px; }
  .stat b { font-size: 20px; }
  .stat span { font-size: 11px; }
  .stat-divider { height: 30px; }
  .mcp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mcp-card { min-height: 200px; padding: 16px; }
  .mcp-name { font-size: 15px; margin-top: 12px; }
  .mcp-desc { font-size: 12.2px; line-height: 1.65; }
  .detail-head { padding: 20px; }
  .detail-head-main { flex-direction: column; gap: 14px; }
  .detail-title { font-size: 20px; }
  .detail-summary { font-size: 13px; }
  .tabs { gap: 20px; overflow-x: auto; overflow-y: hidden; }
  .tab { white-space: nowrap; }
  .stat-grid { grid-template-columns: 1fr; }
  .pkg-grid { grid-template-columns: 1fr; }
  .card { padding: 18px 16px; }
  .key-row { flex-direction: column; align-items: stretch; }
  .key-ops { justify-content: flex-end; }
  .card-head.row-between { flex-wrap: wrap; gap: 12px; }
  .pager { justify-content: center; flex-wrap: wrap; }
  .seg-tabs { gap: 18px; overflow-x: auto; overflow-y: hidden; }
  .seg { white-space: nowrap; }
  /* 移动端隐藏滚动条(仍可滑动/滚动), 避免 Tab 右侧与页面右侧出现那根滚动条 */
  html, body { scrollbar-width: none; -ms-overflow-style: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0 !important; height: 0 !important; }
  .seg-tabs, .tabs, .table-wrap { scrollbar-width: none; -ms-overflow-style: none; }
  .seg-tabs::-webkit-scrollbar, .tabs::-webkit-scrollbar, .table-wrap::-webkit-scrollbar { display: none; width: 0 !important; height: 0 !important; }
  .site-footer { margin-top: 56px; padding: 30px 0 36px; }
  .legal-box { width: calc(100vw - 24px); max-height: calc(100vh - 48px); border-radius: 14px; }
  .legal-frame { height: 74vh; }
}

@media (max-width: 480px) {
  .mcp-grid { grid-template-columns: 1fr; }
  .mcp-card { min-height: 0; }
  .nav { gap: 14px; }
  .brand-name { display: none; }
  /* 极窄屏: 充值积分只留图标, 给导航和退出按钮腾空间 */
  .pill-credit { padding: 6px 9px; font-size: 12px; }
  .pill-credit-text { display: none; }
}

/* ---------------- 轻提示 ---------------- */
.wb-toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  transform: translate(-50%, 12px);
  background: rgba(31, 35, 41, 0.92);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 200;
  max-width: calc(100vw - 40px);
}
.wb-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 用量柱状图 ---------------- */
.chart-wrap .bars {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 20px 10px 6px;
}
.bar-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.bar-item i {
  display: block;
  width: 100%;
  max-width: 20px;
  min-height: 4px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #f0756d, #e23b32);
}
.bar-item span {
  font-size: 10px;
  color: var(--muted-2);
  white-space: nowrap;
  transform: scale(0.92);
}

.delta-plus { color: var(--red); font-weight: 600; }
.delta-minus { color: #1faa59; font-weight: 600; }

.pkg-bonus {
  font-style: normal;
  font-size: 11px;
  color: var(--red);
  background: var(--red-soft);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 4px;
}

/* 分页按钮 */
.btn-pager {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #e6e8eb;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-pager:hover { border-color: #f3c9c6; color: var(--red); }
.btn-pager:disabled { opacity: 0.45; cursor: not-allowed; border-color: #e6e8eb; color: #b0b5bd; }

/* 登录页(浮窗自动弹出)占位 */
.page-login .site-main { min-height: 52vh; }

@media (max-width: 480px) {
  .login-modal .login-card { padding: 28px 20px 22px; }
  .login-modal .qr-box { width: 182px; height: 182px; }
  .login-modal .qr-box img { width: 168px; height: 168px; }
  .mcp-grid { grid-template-columns: 1fr; }
  .mcp-card { min-height: 0; }
  .nav { gap: 14px; }
  .brand-name { display: none; }
  .pill-credit { padding: 6px 11px; font-size: 12px; }
}

/* ============================================================
   管理员后台（仅 PC 端）
   - 导航入口 <=900px 隐藏：满足「移动端不显示入口」
   - 直接访问仍有服务端 role 校验兜底（admin_required）
   ============================================================ */
@media (max-width: 900px) {
  .nav-admin { display: none !important; }
  .admin-tag { display: none; }
}

.admin-tag {
  display: inline-block; margin-left: 10px; padding: 2px 8px;
  font-size: 11px; color: #8a5a14; background: #fff6e6;
  border: 1px solid #f3dfb8; border-radius: 999px; vertical-align: middle;
}

.admin-flash { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.7; }
.admin-flash.ok { background: #eefaf1; border: 1px solid #cfe9d8; color: #1d7a3f; }
.admin-flash.err { background: #fdeeee; border: 1px solid #f3c9c6; color: #b3231b; }
.admin-flash.tip { background: #f5f7fb; border: 1px solid #e3e8f0; color: #5a6478; }
/* 一次性提示（ok/err）右上角的关闭键，由 app.js 的 initFlashes 注入 */
.admin-flash.ok, .admin-flash.err { position: relative; padding-right: 40px; }
.flash-x {
  position: absolute; top: 7px; right: 9px;
  width: 22px; height: 22px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; background: transparent;
  color: inherit; opacity: .45; cursor: pointer;
  font-size: 17px; line-height: 1; font-family: inherit;
}
.flash-x:hover { opacity: 1; background: rgba(0, 0, 0, .07); }
.flash-x:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; opacity: 1; }

/* 一次性提示改成浮动 toast（app.js initFlashes 把 .admin-flash.ok/.err 搬进来）：
   后台页很长，302 回来带 #orders/#detail 锚点停在中下部，顶部横幅看不见。
   固定右上角后无论滚到哪都能看到；.sticky 与 .tip 不搬，仍在文档流里。 */
.admin-flash-host {
  position: fixed;
  /* 让开吸顶的 .site-header(64px)，否则会正好盖住右上角登录区 */
  top: 74px;
  right: 16px;
  /* 压过顶部导航(70)，但低于 .modal(100)/.wb-toast(200)：
     确认框弹出时 toast 不会盖住对话框 */
  z-index: 95;
  width: min(420px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.admin-flash.is-toast {
  margin: 0;
  pointer-events: auto;
  box-shadow: 0 10px 28px rgba(20, 28, 45, .16);
  animation: admin-flash-in .22s ease-out both;
}
.admin-flash.is-toast.flash-out { animation: admin-flash-out .18s ease-in both; }
@keyframes admin-flash-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes admin-flash-out {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(-8px); }
}
@media (max-width: 640px) {
  .admin-flash-host { top: 70px; right: 10px; left: 10px; width: auto; }
  .admin-flash.is-toast { font-size: 12.5px; }
}

.admin-search { display: flex; align-items: center; gap: 8px; }
.admin-search .date-input { width: 230px; }

/* 订单卡片: 标题下面的搜索行 + 操作列(查微信状态 / 补发积分) */
.admin-order-search { margin: -6px 0 14px; }
.admin-order-search .date-input { width: 280px; }
.admin-order-ops form { display: inline; margin: 0; }
.admin-order-ops .btn-sm-ghost { white-space: nowrap; }
.ops-ok {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  color: #2f7a4d; background: #eef8f1; border: 1px solid #d4ecdc;
}
.ops-warn { color: #b3271e; border-color: #f0c9c5; background: #fff6f5; }
.ops-warn:hover { border-color: #e3a9a3; color: #8f1f18; }
@media (max-width: 640px) {
  .admin-order-search { flex-wrap: wrap; }
  .admin-order-search .date-input { width: 100%; }
}

.admin-user { display: flex; flex-direction: column; gap: 2px; }
.admin-openid { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; color: #98a0ae; }
.admin-time { font-variant-numeric: tabular-nums; color: #6b7280; font-size: 12px; white-space: nowrap; }
.muted { color: #9aa1ad; font-weight: 400; }

/* 产品编辑区底部：保存 / 从上游同步工具 并排 */
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.admin-sync-note { margin: 8px 0 0; font-size: 12px; line-height: 1.7; }
.admin-sync-note code { font-size: 11px; }

.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; background: #f1f3f6; color: #6b7280; border: 1px solid #e6e8eb; }
.tag-ok { background: #eefaf1; color: #1d7a3f; border-color: #cfe9d8; }
.tag-off { background: #f4f5f7; color: #9aa1ad; border-color: #e6e8eb; }
.tag-admin { background: #fdeeee; color: var(--red); border-color: #f3c9c6; }
.tag-wait { background: #fff6e6; color: #8a5a14; border-color: #f3dfb8; }
/* 管理员给用户打的自定义标签(open_users.tag): 蓝色系, 和角色(红)/状态(绿灰)分开 */
.tag-user { background: #eff4ff; color: #3556c9; border-color: #d9e3fb; }

.btn-sm-ghost {
  display: inline-block; padding: 5px 12px; font-size: 12px; border-radius: 999px;
  border: 1px solid #e6e8eb; background: #fff; color: #6b7280; cursor: pointer;
}
.btn-sm-ghost:hover { border-color: #f3c9c6; color: var(--red); }

.tbl a.link { color: var(--red); text-decoration: none; }
.tbl a.link:hover { text-decoration: underline; }
/* 表格里的文字按钮(如充值明细「刷新状态」): 默认继承正文色太像普通文字, 这里按链接处理 */
.tbl .link-btn { color: var(--red); }
.tbl .link-btn:hover { text-decoration: underline; }
.tbl-sm td, .tbl-sm th { padding-top: 6px; padding-bottom: 6px; }
.row-active { background: #fff8f7; }

.admin-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; padding: 0 4px 16px; }
.admin-kv > div { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.admin-kv span { color: #9aa1ad; min-width: 56px; }

.admin-grant {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; background: #fbfcfe; border: 1px solid #eef1f6; border-radius: 12px; margin-bottom: 6px;
}
.admin-grant label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #6b7280; }
.admin-grant input { width: 130px; padding: 7px 10px; border: 1px solid #e2e6ee; border-radius: 8px; font-size: 13px; }
.admin-grant small { color: #9aa1ad; font-size: 11px; }
.admin-note { margin: 10px 2px 0; font-size: 12px; color: #8b93a1; line-height: 1.7; }
.admin-note.red { color: var(--red); }
/* 标签编辑条: 复用 .admin-grant 的排版, 只放宽输入框(标签可能写「某某银行·王总」) */
.admin-tag-form { margin-bottom: 10px; }
.admin-tag-form input { width: 240px; }
.admin-sub-title { font-size: 13px; font-weight: 600; color: #495266; margin: 16px 0 8px; }

.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.admin-two-col > .card { margin: 0; }
@media (max-width: 900px) { .admin-two-col { grid-template-columns: 1fr; } }

.admin-list { display: flex; flex-direction: column; }
/* 产品 / 套餐之间要有明确分界：展开多个时靠这条线区分，别再用 1px #f0f2f6（白底上几乎看不见）。
   上色用品牌红做极淡渐变（两端淡出），既有颜色又不会像报错线那样刺眼；
   不用 border 而用伪元素，是因为 border 上不了渐变（border-image 会毁圆角与移动端表现）。 */
.admin-item { position: relative; padding: 18px 2px 15px; }
.admin-item + .admin-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    rgba(226, 59, 50, 0) 0%,
    rgba(226, 59, 50, .30) 14%,
    rgba(226, 59, 50, .30) 86%,
    rgba(226, 59, 50, 0) 100%);
}
.admin-item:first-child { padding-top: 6px; }
.admin-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-item-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.admin-meta { color: #98a0ae; font-size: 12px; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

.admin-details > summary { cursor: pointer; font-size: 12px; color: #6b7280; padding: 4px 0; list-style: none; }
.admin-details > summary::-webkit-details-marker { display: none; }
.admin-details > summary::before { content: "▸ "; color: #b0b5bd; }
.admin-details[open] > summary::before { content: "▾ "; }
.admin-details-head > summary { padding: 5px 12px; border-radius: 999px; }
.admin-details-head > summary::before { content: ""; }
/* 「+ 新增产品 / + 新增套餐」实际是 <summary class="btn-sm-solid">，
   上面 `.admin-details > summary` 的灰字 12px 会把按钮样式盖掉（红底灰字，看不清）。
   (0,2,1) 的特异性高于它，这里把白字和尺寸拉回来。 */
.admin-details-head > summary.btn-sm-solid {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(226, 59, 50, .22);
}
.admin-details-head > summary.btn-sm-solid:hover { color: #fff; }
.admin-details-sub > summary { color: #8b93a1; }

.admin-form { margin: 12px 0 4px; padding: 14px; background: #fbfcfe; border: 1px solid #eef1f6; border-radius: 12px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; }
@media (max-width: 900px) { .admin-form-grid { grid-template-columns: 1fr; } .admin-form-grid .span2 { grid-column: span 1; } }
.admin-form-grid label, .admin-block { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #6b7280; }
.admin-form-grid .span2 { grid-column: span 2; }
.admin-form-grid .chk { flex-direction: row; align-items: center; gap: 6px; }
.admin-form input[type="text"], .admin-form input[type="number"], .admin-form select, .admin-form textarea {
  width: 100%; padding: 7px 10px; border: 1px solid #e2e6ee; border-radius: 8px;
  font-size: 13px; font-family: inherit; box-sizing: border-box;
}
.admin-form textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.6; }
.admin-block { margin-top: 10px; }
.mini-input { width: 76px; padding: 5px 8px; border: 1px solid #e2e6ee; border-radius: 8px; font-size: 12px; }

.admin-bars {
  display: flex; align-items: flex-end; gap: 2px; height: 190px;
  padding: 8px 2px 0; border-bottom: 1px solid #eef1f6; margin-bottom: 22px;
}
.admin-bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; position: relative; }
.admin-bar-fill { width: 100%; background: linear-gradient(180deg, #f2726a, #c8102e); border-radius: 3px 3px 0 0; min-height: 2px; }
.admin-bar-fill.is-zero { background: #eceef2; }
.admin-bar-ix { position: absolute; bottom: -18px; left: 0; font-size: 10px; color: #a7adb8; white-space: nowrap; }
.admin-mini-bar { display: inline-block; width: 100px; height: 7px; background: #f0f2f6; border-radius: 4px; overflow: hidden; vertical-align: middle; }
.admin-mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f2726a, #c8102e); }

.admin-denied { font-size: 15px; color: #495266; margin: 0 0 8px; }
.admin-denied-tip { font-size: 13px; color: #8b93a1; line-height: 1.8; }

/* ============================================================
   关于我们(页脚入口 → 弹窗)
   ============================================================ */
.about-box { width: min(660px, calc(100vw - 40px)); }
.about-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 22px;
  background: #fff;
  text-align: left;
}
.about-body p {
  margin: 0 0 13px;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--muted);
  text-align: justify;
}
.about-body .about-lead { color: var(--ink-2); }
.about-body p:last-child { margin-bottom: 0; }
.about-meta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f0f1f4;
}
.about-meta p {
  margin: 0 0 8px;
  font-size: 12.8px;
  line-height: 1.8;
  color: var(--muted-2);
  text-align: left;
}
.about-meta p:last-child { margin-bottom: 0; }
.about-k {
  display: inline-block;
  min-width: 5.2em;
  color: #b0b5bd;
}
.about-meta a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px dotted #d9dce1;
  transition: color 0.15s, border-color 0.15s;
}
.about-meta a:hover { color: var(--red); border-bottom-color: #f3c9c6; }

/* ============================================================
   意见反馈浮窗(MCP 页)
   ============================================================ */
.fb-fab {
  position: fixed;
  right: 0;
  top: 62%;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 10px 11px;
  border: 1px solid #f3c9c6;
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: #fff;
  color: var(--red);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(226, 59, 50, 0.14);
  transition: background 0.16s, color 0.16s, transform 0.16s;
}
.fb-fab:hover { background: var(--red); color: #fff; border-color: var(--red); transform: translateX(-2px); }
.fb-fab:active { transform: translateX(0); }
.fb-fab svg { display: block; }

.fb-box {
  position: relative;
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 26px 26px 22px;
  text-align: left;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}
.fb-title { margin: 0 0 14px; font-size: 17px; font-weight: 700; color: var(--ink); }

.fb-intro {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.fb-intro p { margin: 0; font-size: 12.5px; line-height: 1.85; color: var(--ink-2); }
.fb-intro p + p { margin-top: 6px; }

.fb-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
}
.fb-label .req { color: var(--red); margin-right: 2px; }

#fb-content, #fb-contact {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.75;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#fb-content { resize: vertical; min-height: 112px; }
#fb-content::placeholder, #fb-contact::placeholder { color: var(--muted-2); }
#fb-content:focus, #fb-contact:focus {
  border-color: #f0b7b2;
  box-shadow: 0 0 0 3px rgba(226, 59, 50, 0.07);
}
.fb-count { margin: 4px 0 14px; text-align: right; font-size: 11.5px; color: var(--muted-2); }

.fb-err {
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid #f3c9c6;
  border-radius: 8px;
  background: #fdeeee;
  color: #b3231b;
  font-size: 12.5px;
  line-height: 1.7;
}
.fb-actions { margin-top: 18px; }
.fb-actions .btn { width: 100%; }

.fb-done { text-align: center; padding: 10px 0 2px; }
.fb-done-title { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--ink); }
.fb-done-sub { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.fb-box form[hidden], .fb-box .fb-done[hidden] { display: none; }

/* ============================================================
   后台 · 意见反馈列表
   ============================================================ */
.fb-content {
  max-width: 620px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
  color: var(--ink-2);
}
.fb-meta {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted-2);
  word-break: break-all;
}
.fb-meta .sep { margin: 0 6px; color: #d5d8dd; }
.fb-contact { font-variant-numeric: tabular-nums; }
.row-quiet td { color: #98a0ae; }
.row-quiet .fb-content { color: #98a0ae; }

@media (max-width: 760px) {
  .about-box { width: calc(100vw - 24px); }
  .about-body { padding: 16px 18px 18px; }
  .about-body p { font-size: 13px; line-height: 1.9; }
  .about-k { min-width: 4.8em; }
  .fb-fab { top: auto; bottom: 96px; padding: 10px 9px 9px; font-size: 11px; }
  .fb-box { padding: 22px 18px 18px; }
  .fb-content { max-width: none; }
}
@media (max-width: 900px) {
  /* 后台只支持电脑端, 小屏本来就没有入口; 这里只保证误入时表格可横向滚动 */
  .admin-console .fb-content { max-width: 320px; }
}
