/* 界面字体随项目自带，客户电脑不用装字体也能有一致、圆润饱满的字形。
   geo-ui.woff2 = Noto Sans SC 可变字重子集，3900+ 常用汉字，SIL OFL 1.1。 */
@font-face {
  font-family: "GeoUI";
  src: url("../fonts/geo-ui.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f4f6f6;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --ink: #18211f;
  --ink-2: #4d5854;
  --muted: #79837e;
  --line: #e3e8e6;
  --line-strong: #cfd8d4;
  --brand: #0e5148;
  --brand-2: #12665a;
  --brand-soft: #e2efeb;
  --accent: #d97742;
  --accent-soft: #fbeee4;
  --danger: #b4472f;
  --danger-soft: #fbeae5;
  --ok: #2f7a5c;
  --ok-soft: #e6f2ec;
  --warn: #a9782b;
  --warn-soft: #fbf1dc;
  --acting-h: 0px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(24, 33, 31, .04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "GeoUI", "Alibaba PuHuiTi 3.0", "阿里巴巴普惠体 3.0", "HarmonyOS Sans SC",
               "MiSans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size:17px;
  line-height: 1.6;
  letter-spacing: .1px;
  /* 不用 -webkit-font-smoothing:antialiased，它会把中文笔画削得偏细 */
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- 登录 ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}

.auth-side {
  background: var(--brand);
  color: #eaf4f1;
  padding: 56px 56px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-side::after {
  content: "";
  position: absolute;
  right: -120px; bottom: -160px;
  width: 420px; height: 420px;
  border: 1px solid rgba(234, 244, 241, .18);
  border-radius: 50%;
}

.auth-side h1 {
  font-size:33px;
  font-weight: 500;
  line-height: 1.4;
  margin: 40px 0 14px;
  letter-spacing: .5px;
}

.auth-side p { color: rgba(234, 244, 241, .72); max-width: 480px; }

.auth-points { display: grid; gap: 14px; margin-top: 32px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; font-size:16px; color: rgba(234,244,241,.85); }
.auth-point i {
  width: 22px; height: 22px; flex: 0 0 22px;
  border: 1px solid rgba(234,244,241,.4); border-radius: 50%;
  display: grid; place-items: center; font-style: normal; font-size:14px;
}

.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}

.auth-card { width: 100%; max-width: 440px; }
.auth-home { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 18px; font-size: 14px; color: var(--muted); text-decoration: none; }
.auth-home:hover { color: var(--brand); }
.auth-card h2 { font-size:25px; font-weight: 500; margin: 0 0 6px; }
.auth-card .sub { color: var(--muted); font-size:16px; margin-bottom: 26px; }
.auth-switch { text-align: center; margin-top: 18px; font-size:16px; color: var(--muted); }
.auth-switch button { background: none; border: 0; color: var(--brand); padding: 0 4px; }
/* 注册协议勾选（单个勾选框涵盖两份文件，默认勾选、可取消；取消后必须手动勾选才能提交） */
.auth-agree { margin: 2px 0 16px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.agree-row { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; cursor: pointer; }
.agree-row span { white-space: nowrap; font-size: clamp(11px, 3.55vw, 14.5px); }
.agree-row input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; }
.agree-row a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.agree-row a:hover { color: var(--brand-2); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size:15px; color: var(--muted);
  margin-bottom: 6px; letter-spacing: .3px;
}
.input, .select, .textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 81, 72, .08);
}
/* 占位符在窄屏/X5 上一律不折行（X5 字体偏宽会把长占位符挤成两行） */
.input::placeholder, .textarea::placeholder { white-space: nowrap; overflow: hidden; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
/* 平台设置里「地址/链接」类字段收紧，不随栅格拉满整列 */
.input-short { max-width: 400px; }
.hint { font-size:14.5px; color: var(--muted); margin-top: 6px; }
.error-text { color: var(--danger); font-size:15px; margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size:16px;
  font-weight: 500;
  white-space: nowrap;
  transition: .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 12px; font-size:15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 主框架 ---------- */
.shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: calc(100vh - var(--acting-h));
  overflow: hidden;
}

.brand-mark { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size:17.5px; letter-spacing: -.5px;
}
.brand-name { font-size:17.5px; font-weight: 500; letter-spacing: .4px; }
.brand-sub { font-size:14px; color: var(--muted); letter-spacing: .4px; }

.nav-group { display: grid; gap: 2px; align-content: start; min-height: 0; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
.nav-group::-webkit-scrollbar { width: 8px; }
.nav-group::-webkit-scrollbar-thumb { background: #b9c8c4; border-radius: 4px; }
.nav-group { scrollbar-color: #b9c8c4 transparent; scrollbar-width: thin; overscroll-behavior: contain; }
.nav-label { font-size:13.5px; color: var(--muted); letter-spacing: .8px; padding: 0 10px 3px; margin-top: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: 8px;
  color: var(--ink-2); font-size:15px; font-weight: 500;
  border: 0; background: none; text-align: left; width: 100%;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.nav-item .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .45; flex: none; }
.nav-sec-items .nav-item .dot { width: 5px; height: 5px; }
.nav-sec-ico { display: inline-flex; width: 18px; justify-content: center; flex: none; color: var(--muted); }
.nav-sec-ico svg { display: block; }

.side-foot { margin-top: auto; flex: none; padding: 0 6px; font-size:15px; color: var(--muted); }
.side-card {
  width: 100%; text-align: left; display: grid; gap: 9px;
  background: var(--brand-soft); border: 1px solid #cde3dc;
  border-radius: 12px; padding: 12px 12px 11px;
  font: inherit; color: var(--ink-2);
}
button.side-card { cursor: pointer; }
button.side-card:hover { border-color: var(--brand); background: #d9ece5; }
.side-card-admin { background: var(--accent-soft); border-color: #f0d9c6; cursor: default; }
.side-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.plan-chip {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border-radius: 8px;
  padding: 6px 13px; font-size: 15px; font-weight: 600; letter-spacing: .3px;
  line-height: 1.3; white-space: nowrap;
}
.side-card-admin .plan-chip { background: var(--accent); }
.side-card-exp { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.side-card-bottom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14.5px; color: var(--ink-2); }
.side-card-bottom b { color: var(--ink); font-size: 16.5px; }
.side-card-more { margin-left: auto; color: var(--brand); font-size: 13.5px; }
.side-card-desc { font-size: 14px; color: var(--ink-2); line-height: 1.55; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 68px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 0 rgba(24, 33, 31, .02);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(24px, 2.4vw, 56px);
  position: sticky; top: 0; z-index: 20;
}

/* ---------- 顶栏站点切换：自定义下拉（原生 select 的选项列表没法跟胶囊圆角走） ---------- */
.site-switch { position: relative; flex: none; }
.ss-btn {
  display: flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 10px 0 9px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 12px; font: inherit; color: var(--ink); cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.ss-btn:hover { border-color: #b9cfc8; background: #fafdfc; }
.ss-btn:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 81, 72, .14); }
.site-switch.is-open .ss-btn { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 81, 72, .12); }
.ss-ico {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
}
.ss-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-align: left; }
.ss-name {
  font-size: 13.5px; font-weight: 600; line-height: 1.25; color: var(--ink);
  max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-dom {
  font-style: normal; font-size: 12px; line-height: 1.2; color: var(--muted);
  max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-caret { flex: none; display: inline-flex; color: var(--muted); transition: transform .18s; }
.site-switch.is-open .ss-caret { transform: rotate(180deg); }

.ss-menu {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 40;
  width: 322px; max-width: min(322px, calc(100vw - 28px));
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(12, 32, 27, .16), 0 2px 6px rgba(12, 32, 27, .06);
  padding: 6px; animation: ssIn .14s ease;
}
@keyframes ssIn { from { opacity: 0; transform: translateY(-4px); } }
.ss-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 9px 8px; font-size: 13px; color: var(--muted);
}
.ss-head span { font-weight: 600; color: var(--ink); }
.ss-head em { font-style: normal; font-weight: 400; }
.ss-list { max-height: 262px; overflow-y: auto; display: grid; gap: 2px; }
.ss-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 9px; border: 0; background: none; border-radius: 9px;
  font: inherit; color: var(--ink-2); text-align: left; cursor: pointer;
}
.ss-item:hover { background: var(--surface-2); }
.ss-item.is-on { background: var(--brand-soft); color: var(--brand); }
.ss-item.is-on:hover { background: #d9ece5; }
.ss-item-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ss-item-txt b {
  font-size: 13.5px; font-weight: 600; color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-item-txt i {
  font-style: normal; font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-tick { flex: none; width: 15px; opacity: 0; color: var(--brand); }
.ss-tick svg { display: block; }
.ss-item.is-on .ss-tick { opacity: 1; }

.topbar .spacer { flex: 1; }

.points-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; font-size:15px; color: var(--ink-2);
}
.points-pill b { color: var(--brand); font-weight: 500; }

.user-chip { display: flex; align-items: center; gap: 8px; font-size:16px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size:15px; font-weight: 500;
}

.page { padding: 26px clamp(24px, 2.4vw, 56px) 48px; width: 100%; max-width: none; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.page-title { font-size:24px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.2px; }
.page-desc { color: var(--muted); font-size:14.5px; margin: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(24, 33, 31, .04);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.card-title { font-size:17px; font-weight: 600; margin: 0; }
.card-sub { font-size:14px; color: var(--muted); }

.grid { display: grid; gap: 14px; }
/* 栅格子项默认 min-width:auto，里面一张宽表就能把整页顶出横向滚动 */
.grid > * { min-width: 0; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-side { grid-template-columns: 1.55fr 1fr; }

/* ---------- GEO 指数 ---------- */
.hero {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
}
.ring { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.ring svg { transform: rotate(-90deg); }
.ring-center {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.ring-value { font-size:41px; font-weight: 500; line-height: 1; letter-spacing: -1px; }
.ring-label { font-size:14px; color: var(--muted); letter-spacing: 1.5px; margin-top: 6px; }

.hero-title { font-size:17px; color: var(--muted); margin-bottom: 10px; }
.hero-facts { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 12px; }
.fact-value { font-size:23px; font-weight: 500; }
.fact-label { font-size:15px; color: var(--muted); }
.hero-note {
  margin-top: 14px; font-size:15px; color: var(--ink-2);
  background: var(--surface-2); border: 1px dashed var(--line-strong);
  padding: 8px 12px; border-radius: 8px;
}

/* ---------- KPI ---------- */
.kpi { padding: 16px 18px; }
.kpi-label { font-size:14px; color: var(--muted); display: flex; justify-content: space-between; }
.kpi-value { font-size:29px; font-weight: 600; letter-spacing: -.5px; margin-top: 6px; }
.kpi-value small { font-size:16px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.kpi-foot { font-size:14px; color: var(--muted); margin-top: 4px; }
.trend-up { color: var(--danger); }
.trend-down { color: var(--ok); }

/* ---------- 待办 ---------- */
.todo {
  display: flex; gap: 12px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  margin-bottom: 8px;
}
.todo:last-child { margin-bottom: 0; }
.todo-mark {
  width: 26px; height: 26px; border-radius: 7px; flex: 0 0 26px;
  display: grid; place-items: center; font-size:15px;
  background: var(--brand-soft); color: var(--brand);
}
.todo-mark.audit { background: var(--warn-soft); color: var(--warn); }
.todo-mark.risk { background: var(--danger-soft); color: var(--danger); }
.todo-title { font-size:16px; font-weight: 500; }
.todo-desc { font-size:15px; color: var(--muted); line-height: 1.5; }
.todo-action { margin-left: auto; align-self: center; flex: none; }
.todo-action .btn { white-space: nowrap; }

/* ---------- 表格 ---------- */
/* 容器可横向滑动；滚动条做细但可见，桌面鼠标可直接拖动 */
.table-wrap {
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: rgba(21,90,72,.32) transparent;
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(21,90,72,.28); border-radius: 8px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(21,90,72,.48); }
table.data { width: 100%; border-collapse: collapse; font-size:15px; }
table.data th {
  text-align: left; font-weight: 500; font-size:14px; color: var(--ink-2);
  padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.6; word-break: break-word; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: var(--surface-2); }
table.data .num-cell { text-align: center; font-variant-numeric: tabular-nums; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap; font-size:14px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.tag-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag-fail { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.tag-brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

.score-bar { display: flex; align-items: center; gap: 8px; min-width: 132px; }
.score-track { flex: 1; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.score-fill { height: 100%; border-radius: 3px; background: var(--brand); }
.score-fill.low { background: var(--danger); }
.score-fill.mid { background: var(--accent); }

/* ---------- 站点卡 ---------- */
.site-card { display: flex; flex-direction: column; gap: 12px; }
.site-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.site-domain { font-size:17.5px; font-weight: 500; }
.site-meta { font-size:15px; color: var(--muted); }
/* 四个指标等分一栏，数字右对齐感更稳；窄屏保持一行，靠分隔线区分 */
.site-scores {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.site-score { min-width: 0; padding: 0 12px; }
.site-score:first-child { padding-left: 0; }
.site-score:last-child { padding-right: 0; }
.site-score + .site-score { border-left: 1px solid var(--line); }
.site-score b {
  display: block; font-size: 22px; font-weight: 500; line-height: 1.25;
  font-variant-numeric: tabular-nums; letter-spacing: -.2px;
}
.site-score span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.site-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
/* 站点席位提示：说清当前上限，右侧给一个去升级的出口 */
.seat-note {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 13px;
  border: 1px dashed var(--line-strong); border-radius: 10px;
  background: var(--surface-2); font-size: 13px; color: var(--ink-2);
}
.seat-note > span { flex: 1; min-width: 200px; }

.check-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
  font-size:16px;
}
.check-row:last-child { border-bottom: 0; }
.check-row .name { flex: 1; }
.check-row.is-block { flex-wrap: wrap; align-items: flex-start; }
.check-row.is-block .name { flex: 1; }
.check-detail {
  flex: 1 0 100%; margin: 7px 0 2px; padding: 8px 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; line-height: 1.7; color: var(--ink-2);
}
.check-detail > div { display: flex; gap: 8px; }
.check-detail > div + div { margin-top: 3px; }
.check-detail b { flex: none; font-weight: 500; color: var(--muted); }
.check-detail span { word-break: break-word; }
.check-dot { width: 7px; height: 7px; border-radius: 50%; }
.check-dot.pass { background: var(--ok); }
.check-dot.warn { background: var(--warn); }
.check-dot.fail { background: var(--danger); }

/* 开关行：用大白话显示「已开启 / 已关闭」，避免勾选框看不懂 */
.sw-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface-2);
  transition: border-color .18s, background .18s;
}
.sw-row.on  { border-color: rgba(14, 81, 72, .4); background: var(--brand-soft); }
.sw-row.off { border-color: rgba(180, 71, 47, .35); background: var(--danger-soft); }
.sw-txt { flex: 1; min-width: 0; }
.sw-txt b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.sw-txt .hint { display: block; margin-top: 2px; }
.sw-ctl { display: flex; align-items: center; gap: 10px; flex: none; }
.sw-state {
  font-size: 13.5px; font-weight: 600; line-height: 1;
  padding: 6px 11px; border-radius: 999px; white-space: nowrap;
}
.sw-state.on  { color: #fff; background: var(--brand); }
.sw-state.off { color: #fff; background: var(--danger); }
.sw { position: relative; display: inline-block; width: 56px; height: 32px; flex: none; cursor: pointer; }
.sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sw i { position: absolute; inset: 0; border-radius: 999px; background: #c3cbc8; transition: background .18s; pointer-events: none; }
.sw i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
  transition: transform .18s;
}
.sw input:checked + i { background: var(--brand); }
.sw input:checked + i::after { transform: translateX(24px); }
.sw input:focus-visible + i { box-shadow: 0 0 0 3px rgba(14, 81, 72, .22); }
@media (max-width: 560px) {
  .sw-row { flex-wrap: wrap; gap: 10px; padding: 12px 13px; }
  .sw-ctl { width: 100%; justify-content: space-between; }
}

/* ---------- 状态 ---------- */
.empty {
  text-align: center; padding: 44px 20px; color: var(--muted); font-size:16px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--surface-2);
}
.empty b { display: block; color: var(--ink); font-size:17px; font-weight: 500; margin-bottom: 4px; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, #f1efe8 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.toast-wrap { position: fixed; right: 24px; bottom: 24px; display: grid; gap: 8px; z-index: 100; }
.toast {
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size:16px; max-width: 460px; animation: toastIn .18s ease;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--brand); }
@keyframes toastIn { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(24, 33, 31, .38);
  display: grid; place-items: center; z-index: 60; padding: 24px;
}
.modal {
  --mp: 26px; --mpx: 26px;
  background: var(--surface); border-radius: 16px; width: 100%; max-width: 680px;
  max-height: 86vh; overflow: auto; padding: var(--mp) var(--mpx);
  animation: toastIn .16s ease;
}
.modal.wide { max-width: 980px; }
/* 点弹窗外面不关闭，只晃一下做反馈，避免用户以为卡住了 */
.modal.modal-nudge { animation: modalNudge .26s ease; }
@keyframes modalNudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  45% { transform: translateX(4px); }
  70% { transform: translateX(-2px); }
}

/* OEM 授权 vs 不授权：加宽避免换行、压缩行高避免竖向滚动；授权列只做淡色区分，不做强强调 */
.modal.wide.cmp { --mp: 20px; --mpx: 24px; max-width: min(1120px, 96vw); max-height: 94vh; }
.modal.cmp .modal-head { padding-bottom: 10px; }
.modal.cmp .hint { margin-top: 8px; }
table.data.oem-cmp { table-layout: fixed; font-size: 14.5px; line-height: 1.55; }
table.data.oem-cmp th, table.data.oem-cmp td { padding: 8px 13px; text-align: center; vertical-align: middle; white-space: normal; }
table.data.oem-cmp .cmp-k { width: 18%; text-align: left; color: var(--ink-2); font-weight: 600; background: var(--surface); }
table.data.oem-cmp .cmp-yes { width: 44%; background: #eef7f1; color: var(--ink-2); font-weight: 500; box-shadow: inset 1px 0 0 rgba(21,90,72,.06), inset -1px 0 0 rgba(21,90,72,.06); }
table.data.oem-cmp .cmp-no { width: 38%; background: #fafbf9; color: var(--muted); font-weight: 400; }
table.data.oem-cmp thead .cmp-yes { background: #e7f2eb; color: #155a48; font-weight: 600; box-shadow: none; border-bottom-color: rgba(21,90,72,.10); }
table.data.oem-cmp thead .cmp-k { background: #f3f5f4; }
table.data.oem-cmp thead .cmp-no { background: #f3f5f4; color: var(--muted); }
table.data.oem-cmp tr:hover td.cmp-yes { background: #e4f1e9; }
table.data.oem-cmp tr:hover td.cmp-no { background: #f4f6f4; }
table.data.oem-cmp tr:hover td.cmp-k { background: var(--surface); }
@media (max-height: 820px) {
  table.data.oem-cmp { font-size: 13.5px; line-height: 1.45; }
  table.data.oem-cmp th, table.data.oem-cmp td { padding: 6px 12px; }
}
/* 头部吸顶：长弹窗滚到下面时，标题和关闭按钮仍在原位，不用滚回顶部才能关 */
.modal-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  position: sticky; top: calc(-1 * var(--mp)); z-index: 6;
  margin: calc(var(--mp) * -1) calc(var(--mpx) * -1) 16px;
  padding: var(--mp) var(--mpx) 12px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
}
.modal-title { font-size:18.5px; font-weight: 500; margin: 0; }
.icon-btn {
  width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; color: var(--muted);
}

/* ---------- 图表 ---------- */
.chart-box { width: 100%; height: 180px; }
.chart-legend { display: flex; gap: 16px; font-size:15px; color: var(--muted); }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 5px; }

.bar-row { display: grid; grid-template-columns: minmax(104px, auto) 1fr 56px; align-items: center; gap: 10px; margin-bottom: 10px; font-size:15px; }
.bar-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 4px; }
.bar-fill.alt { background: var(--accent); }
.bar-value { text-align: right; color: var(--ink-2); }

/* ---------- 内容预览 ---------- */
.article { font-size:17px; line-height: 1.9; color: var(--ink-2); }
.article p { margin: 0 0 14px; }
.score-list { display: grid; gap: 8px; }
.score-item { display: grid; grid-template-columns: minmax(110px, auto) 1fr 44px; gap: 10px; align-items: center; font-size:15px; }
.score-item .bar-track { height: 6px; }

/* ---------- 版本 ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.plan {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  background: var(--surface); display: flex; flex-direction: column; gap: 6px;
}
.plan.featured { border-color: var(--brand); background: linear-gradient(180deg, var(--brand-soft), var(--surface) 42%); }
.plan-name { font-size:17px; font-weight: 500; }
.plan-price { font-size:27px; font-weight: 500; letter-spacing: -.5px; }
.plan-price small { font-size:15px; color: var(--muted); font-weight: 400; }
.plan-meta { font-size:15px; color: var(--muted); }
.plan ul { margin: 6px 0 0; padding-left: 16px; font-size:15px; color: var(--ink-2); }
.plan li { margin-bottom: 3px; }

/* ---------- 分段控件 ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 2px; }
.seg button {
  border: 0; background: none; padding: 5px 12px; border-radius: 6px;
  font-size:15px; color: var(--muted);
}
.seg button.active { background: var(--brand-soft); color: var(--brand); font-weight: 500; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-side { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-facts { justify-content: center; }
}

/* 系统设置 · AI 接入 */
.mode-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mode-btn {
  padding: 7px 16px; font-size:16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-family: inherit; transition: all .15s ease;
}
.mode-btn:hover { border-color: var(--ink-2); }
.mode-btn.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 500; }
.notice-warn {
  margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-size:15px; line-height: 1.7;
  background: var(--warn-soft); color: var(--warn);
}
.engine-card { display: flex; flex-direction: column; gap: 12px; }
.engine-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.engine-ident { display: flex; align-items: center; gap: 10px; min-width: 0; }
.engine-logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size:17.5px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand);
}
.engine-name { font-size:17px; font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.engine-doc { font-size:14px; color: var(--muted); margin-top: 3px; letter-spacing: .2px; }
.engine-fields { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }
.engine-adv { font-size:15px; color: var(--muted); }
.engine-adv summary { cursor: pointer; user-select: none; }
.engine-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.engine-result { font-size:15px; flex: 1; min-width: 0; line-height: 1.5; }
.engine-result.pending { color: var(--muted); }
.engine-result.ok { color: var(--ok); }
.engine-result.fail { color: var(--danger); }

/* 账号 · 白标预览 */
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type=color] {
  width: 38px; height: 34px; padding: 2px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); cursor: pointer;
}
.brand-preview {
  border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 18px;
  background: var(--surface); position: relative; overflow: hidden;
}
.brand-preview-bar { position: absolute; inset: 0 0 auto 0; height: 4px; }
.brand-preview-name { font-size:18.5px; font-weight: 500; margin-top: 6px; }
.brand-preview-slogan { font-size:15px; color: var(--muted); margin-top: 4px; }

/* 商品与订单 */
/* 点数与版本 → 点数账单 / 我的订单 的快捷入口 */
.quick-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.quick-link:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(14, 81, 72, .08); }
.quick-link-title { display: block; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.quick-link-desc { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.quick-link-arrow { flex: none; font-size: 22px; line-height: 1; color: var(--brand); }
.pl-action { font-weight: 550; }

.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.shop-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px; background: var(--surface);
  transition: border-color .15s ease, transform .15s ease;
}
.shop-item:hover { border-color: var(--brand); transform: translateY(-1px); }
.shop-name { font-size:17px; font-weight: 500; }
.shop-price { font-size:25px; font-weight: 500; letter-spacing: -.4px; }
.shop-price small { font-size:15px; color: var(--muted); font-weight: 400; }
.shop-desc { font-size:15px; color: var(--muted); line-height: 1.6; }
.shop-item .btn { margin-top: auto; align-self: flex-start; width: auto; min-width: 108px; padding: 8px 16px; font-size:15px; }

/* 点数与版本页：一条概览说清现状，下面只留充值、升级、对比、费率 */
.pts-ov {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: center; gap: 20px; margin-bottom: 14px;
}
.pts-ov-item { min-width: 0; }
.pts-ov-item > span { display: block; font-size: 12.5px; color: var(--muted); }
.pts-ov-item > b {
  display: block; margin-top: 3px; font-size: 24px; font-weight: 500; line-height: 1.2;
  font-variant-numeric: tabular-nums; letter-spacing: -.3px;
}
.pts-ov-item > em { display: block; margin-top: 3px; font-size: 12px; font-style: normal; color: var(--muted); }
.pts-ov-actions { display: flex; gap: 8px; align-items: center; }
.pts-ov-actions .btn { white-space: nowrap; }
#pts-recharge, #pts-upgrade { scroll-margin-top: 84px; }

/* 加油包：一行小卡，点一下直接下单 */
.pack-line {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.pack-label { flex: none; font-size: 12.5px; color: var(--muted); }
.pack-row { display: flex; flex: 1; gap: 8px; flex-wrap: wrap; }
.pack-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); font: inherit; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.pack-chip:hover { border-color: var(--brand); background: #fafdfc; }
.pack-chip b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.pack-chip i { font-size: 12.5px; font-style: normal; color: var(--muted); }
.pack-chip em { font-size: 13.5px; font-style: normal; font-weight: 600; color: var(--brand); }

/* 升级：只摆比当前版本高的那几张，几张就排几张，不留空位 */
.up-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.up-card {
  display: flex; flex-direction: column; gap: 7px;
  flex: 1 1 0; min-width: 220px;
  padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  transition: border-color .15s;
}
.up-card:hover { border-color: var(--brand); }
.up-name { font-size: 16px; font-weight: 600; }
.up-price { font-size: 24px; font-weight: 500; letter-spacing: -.4px; }
.up-price small { font-size: 14px; font-weight: 400; color: var(--muted); }
.up-meta { font-size: 12.5px; color: var(--muted); }
.up-card .btn { margin-top: 4px; align-self: flex-start; }
.up-oem {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--ink-2);
}
.up-oem b { color: var(--ink); }
/* 版本对比表里把当前版本那一列标出来 */
table.data th.is-cur { background: var(--brand-soft); color: var(--brand); }
.cur-mark {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  font-size: 10.5px; font-style: normal; font-weight: 600;
  background: var(--brand); color: #fff; border-radius: 4px; vertical-align: 1px;
}

@media (max-width: 1180px) {
  .pts-ov { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .pts-ov-actions { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .up-card { flex-basis: 100%; min-width: 0; }
}

.pay-box { display: grid; gap: 12px; }
.pay-method { display: flex; gap: 10px; }
.pay-choice {
  flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 12px;
  text-align: center; font-size:16px; cursor: pointer; background: var(--surface);
  transition: all .15s ease;
}
.pay-choice.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.pay-info { font-size:15px; color: var(--ink-2); line-height: 2; background: var(--surface-2); padding: 12px 14px; border-radius: 9px; }
.pay-info b { font-weight: 500; }

/* 分发步骤 */
.steps { margin: 0; padding-left: 18px; font-size:16px; line-height: 2; color: var(--ink-2); }
.steps li { margin-bottom: 2px; }
.steps b { font-weight: 500; color: var(--ink); }

.sys-section {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 18px 0 10px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.sys-section b { font-size:16px; font-weight: 500; }
.sys-section .hint { margin: 0; }

@media (max-width: 900px) {
  .engine-fields { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; gap: 12px; overflow: auto; padding: 12px; }
  .nav-group { display: flex; flex: 0 0 auto; overflow: visible; min-height: 0; }
  .nav-label, .side-foot { display: none; }
  .nav-item { white-space: nowrap; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .page { padding: 16px; }
  .topbar { padding: 0 14px; height: 56px; }
}

/* 分发工作台 */
.dist-layout { display: grid; grid-template-columns: 340px 1fr; gap: 14px; align-items: start; }
.dist-list { display: flex; flex-direction: column; gap: 6px; max-height: 720px; overflow: auto; }
.dist-item { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; transition: all .15s; }
.dist-item:hover { border-color: var(--ink-2); }
.dist-item.active { border-color: var(--brand); background: var(--brand-soft); }
.dist-title { font-size:16px; line-height: 1.5; color: var(--ink); }
.dist-meta { font-size:14px; color: var(--muted); }
.platform-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.platform-tab { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-size:15px; color: var(--ink-2); cursor: pointer; }
.platform-tab:hover { border-color: var(--ink-2); }
.platform-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.variant-box { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--surface-2); }
.variant-title { font-size:17.5px; font-weight: 500; margin-bottom: 10px; }
.variant-body { font-size:16px; line-height: 1.9; white-space: pre-wrap; color: var(--ink-2); max-height: 380px; overflow: auto; }
.variant-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
/* 平台字数上限：正常灰字，超限变红并给出处理建议 */
.variant-limit { font-size: 13px; color: var(--muted); margin: -4px 0 10px; line-height: 1.7; }
.variant-limit.over { color: #d9534f; background: #fff5f4; border-radius: 6px; padding: 6px 9px; }
.variant-limit.over b { display: block; font-weight: 600; margin-top: 2px; }
@media (max-width: 980px) { .dist-layout { grid-template-columns: 1fr; } }

/* 帮助说明 */
.help-btn { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; margin-left:5px; padding:0; border:1px solid var(--line); border-radius:50%; background:var(--surface); color:var(--muted); font-size:14px; line-height:1; cursor:pointer; vertical-align:1px; }
.help-btn:hover { border-color:var(--brand); color:var(--brand); background:var(--brand-soft); }
.help-body { font-size:16px; line-height:1.95; color:var(--ink-2); max-height:62vh; overflow:auto; padding-right:4px; }
.help-body p { margin:0 0 10px; }
.help-body ul { margin:0 0 10px; padding-left:18px; }
.help-body li { margin-bottom:4px; }
.help-body code { background:var(--surface-2); border:1px solid var(--line); border-radius:4px; padding:1px 5px; font-size:15px; color:var(--ink); }
.help-body strong { color:var(--ink); font-weight:500; }
.help-tip { background:var(--brand-soft); border-left:2px solid var(--brand); border-radius:0 6px 6px 0; padding:8px 10px; color:var(--ink-2); }
.link-btn { margin-top:6px; padding:0; border:0; background:none; color:var(--brand); font-size:15px; cursor:pointer; }
.link-btn:hover { text-decoration:underline; }
/* AI 回答回溯弹窗：原文按段落显示，命中的地址与负面词用黄色标出来 */
.m-answer {
  max-height:46vh; overflow:auto; white-space:pre-wrap; word-break:break-word;
  background:var(--surface-2); border:1px solid var(--line); border-radius:10px;
  padding:14px 16px; font-size:15px; line-height:1.9; color:var(--ink-2);
}
.m-answer mark { background:#fff3bf; color:var(--ink); border-radius:3px; padding:0 2px; }
.m-answer strong { color:var(--ink); font-weight:600; }
.hit-row { padding:9px 11px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); margin-bottom:8px; }
.hit-row b { font-weight:500; color:var(--ink); font-size:15px; }
.hit-link { display:block; margin-top:3px; font-size:13px; color:var(--brand); word-break:break-all; }
.hit-row .hint { font-size:13px; line-height:1.7; margin-top:5px; }
.neg-box { border:1px solid var(--line-strong); background:var(--danger-soft); border-radius:10px; padding:11px 13px; font-size:15px; color:var(--ink-2); }
.neg-box b { color:var(--ink); font-weight:500; }
.neg-line { display:flex; gap:8px; align-items:flex-start; margin-bottom:6px; line-height:1.75; }
.neg-line .tag { flex:0 0 auto; }
.fix-where { margin-top:10px; padding:9px 11px; border-radius:8px; background:var(--brand-soft); color:var(--ink-2); font-size:15px; line-height:1.8; }
.fix-where-icon { display:inline-block; white-space:nowrap; margin:0 6px 2px 0; vertical-align:1px; padding:1px 6px; border-radius:4px; background:var(--brand); color:#fff; font-size:14px; }

/* 收银台 */
.pay-channel-list { display:flex; flex-direction:column; gap:10px; }
.pay-channel { display:flex; align-items:center; gap:12px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); text-align:left; cursor:pointer; transition:all .15s; }
.pay-channel:hover { border-color:var(--brand); background:var(--brand-soft); }
.pay-channel b { display:block; font-size:17px; font-weight:500; color:var(--ink); }
.pay-channel small { display:block; margin-top:2px; font-size:15px; color:var(--muted); }
.pay-channel-icon { display:flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:10px; background:var(--brand); color:#fff; font-size:17.5px; }
.pay-qr-wrap { display:flex; flex-direction:column; align-items:center; gap:8px; padding:8px 0 4px; }
.pay-qr { display:flex; align-items:center; justify-content:center; width:204px; height:204px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.pay-qr img { display:block; width:188px; height:188px; }
.pay-state { margin-top:8px; text-align:center; font-size:15px; color:var(--muted); }
.pay-state.ok { color:var(--brand); }

/* 支付与通知配置 */
.pay-config { border:1px solid var(--line); border-radius:12px; padding:14px 14px 10px; margin:10px 0 12px; background:var(--surface-2); }
.pay-config-head { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.pay-config-head b { font-size:16px; font-weight:500; color:var(--ink); }
.pay-config-head .btn { margin-left:auto; }
.pay-config textarea.input { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:14px; line-height:1.5; resize:vertical; }
.notify-grid { display:flex; flex-wrap:wrap; gap:8px 18px; margin:10px 0 4px; }
.notify-item { display:inline-flex; align-items:center; gap:6px; font-size:15px; color:var(--ink-2); }


/* ---------- 接管提示条 ---------- */
.acting-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px clamp(24px, 2.4vw, 56px);
  background: #7b4a1e; color: #fff; font-size: 15px;
}
.acting-bar .btn { margin-left: auto; flex: none; }
.acting-dot { width: 8px; height: 8px; border-radius: 50%; background: #ffd9a0; flex: none; }
.acting-text { line-height: 1.6; }
.acting-account {
  display: inline-block; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.32); border-radius: 6px;
  padding: 2px 9px; margin: 0 2px; color: #fff; font-weight: 600; letter-spacing: .3px;
}
.modal-note {
  background: var(--brand-soft); border: 1px solid #cde3dc; border-radius: 9px;
  padding: 11px 13px; margin-bottom: 14px;
  font-size: 14.5px; line-height: 1.7; color: var(--ink-2);
}
.modal-note b { color: var(--brand); }
.side-role { color: var(--brand); font-weight: 500; margin-bottom: 4px; }
.tenant-link { cursor: pointer; border-bottom: 1px dashed var(--line-strong); }
.tenant-link:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- 上手流程图 ---------- */
.ob-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px 18px; margin-bottom: 20px;
}
.ob-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ob-summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ob-summary b { font-size: 18px; font-weight: 500; }
.ob-summary span { color: var(--muted); font-size: 15px; }
.ob-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ob-progress { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 12px 0 14px; }
.ob-progress i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .3s; }
.ob-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.ob-step { position: relative; display: flex; gap: 10px; padding: 10px 10px; border-radius: 10px; min-width: 0; cursor: pointer; transition: background .15s; }
.ob-step:hover { background: var(--surface-2); }
.ob-dot {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 14px; font-weight: 500;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-strong);
}
.ob-check { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ob-body { min-width: 0; }
.ob-title { font-size: 15px; font-weight: 500; line-height: 1.4; }
.ob-desc { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.ob-state { font-size: 13px; margin-top: 7px; }
.ob-badge {
  display: inline-flex; align-items: center; font-size: 13px; font-weight: 500;
  line-height: 1; padding: 6px 10px; border-radius: 6px;
  border: 1px solid transparent; white-space: nowrap;
}
.ob-badge-done { background: var(--ok); color: #fff; border-color: var(--ok); }
.ob-badge-current { background: var(--brand); color: #fff; border-color: var(--brand); }
.ob-badge-todo { background: var(--surface-2); color: var(--muted); border-color: var(--line-strong); }
.ob-line { position: absolute; right: -8px; top: 24px; width: 8px; height: 1px; background: var(--line-strong); }
.ob-done .ob-dot { background: var(--ok); color: #fff; border-color: var(--ok); }
.ob-done .ob-title, .ob-done .ob-desc { color: var(--ink-2); }
.ob-current { background: var(--brand-soft); }
.ob-current .ob-dot { background: var(--brand); color: #fff; border-color: var(--brand); }
.ob-current .ob-title { color: var(--brand); }
.ob-todo .ob-dot { background: var(--surface-2); color: var(--muted); border-color: var(--line-strong); }
.ob-todo .ob-title { color: var(--ink-2); }
@media (max-width: 1400px) { .ob-steps { grid-template-columns: repeat(3, 1fr); } .ob-line { display: none; } }
@media (max-width: 760px) { .ob-steps { grid-template-columns: 1fr; } }

/* ---------- 帮助中心 ---------- */
.help-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--brand-soft); border: 1px solid #cde3d6; border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 18px;
}
.help-banner b { display: block; font-size: 17px; font-weight: 500; }
.help-banner span { font-size: 15px; color: var(--ink-2); }
.help-grid { align-items: start; }
.help-no { font-size: 13.5px; color: var(--brand); letter-spacing: 1px; margin-bottom: 8px; }
.help-lead { font-size: 15px; color: var(--ink-2); line-height: 1.8; margin: 0 0 12px; }
.help-do { font-size: 14.5px; line-height: 1.85; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 12px 14px; }
.help-do b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 4px; }
.help-actions { margin-top: 14px; }
.help-step.help-current { border-color: var(--brand); }
.help-step.help-done { opacity: .82; }
.help-faq { border-top: 1px dashed var(--line); padding: 12px 0; }
.help-faq summary { cursor: pointer; font-size: 15.5px; font-weight: 500; list-style: none; }
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary::before { content: '+ '; color: var(--brand); }
.help-faq[open] summary::before { content: '− '; }
.help-faq div { font-size: 14.5px; color: var(--ink-2); line-height: 1.9; padding: 8px 0 2px 18px; }
.help-btn { cursor: help; }

/* 表头括号里的补充说明：小字淡色，不挤压列名 */
.th-note { margin-left:3px; font-size:11px; font-weight:400; color:var(--muted); white-space:nowrap; }
/* ---------- 版本管理 ---------- */
#plans-save, #plans-reset { white-space: nowrap; }

/* ---------- 经营看板 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card { padding: 20px 22px; }
.stat-label { font-size: 14.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 30px; line-height: 1.25; font-weight: 600; margin-top: 10px; letter-spacing: -.5px; }
.stat-value.pos { color: var(--brand); }
.stat-sub { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.fin-note { font-size: 14px; color: var(--ink-2); line-height: 1.9; }
#finance-days { min-width: 130px; }

/* ---------- 表格分层：标题清楚、正文收敛、说明文字更小但不刺眼 ---------- */
/* 百分比列宽 + 自动布局在窄屏会把表格算到天上去（卡在 1fr 栅格里尤其明显），
   固定一个最小宽度交给 .table-wrap 横向滚动，页面就不会被撑宽。 */
.engine-table { table-layout: fixed; min-width: 520px; }
.engine-table col:first-child { width: 74px; }
.engine-table th, .engine-table td { vertical-align: top; }
.engine-table th:first-child, .engine-table .engine-name { white-space: nowrap; }
.engine-table .engine-name b { font-size: 15px; font-weight: 500; }
/* .hint 自带 margin-top 会把「主要来源」整列往下顶，这里必须清掉才对得齐 */
.engine-table .engine-sources { font-size: 14px; line-height: 1.6; margin-top: 0; }
.engine-table .engine-action { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.engine-table td:last-child, .engine-table th:last-child { padding-left: 16px; }
/* 分发记录：列宽固定，渠道名不折行、文章列最宽、操作列只放按钮 */
.dist-table { table-layout: fixed; }
.dist-table th, .dist-table td { vertical-align: top; }
.dist-table .hint { font-size: 14px; margin-top: 0; }
.dist-table .dist-channel { font-weight: 500; white-space: nowrap; }
.dist-table .dist-meta { font-size: 12.5px; white-space: nowrap; margin-top: 4px; }
.dist-table .dist-title { line-height: 1.6; }
.dist-table .dist-note { font-size: 13px; line-height: 1.55; margin-top: 6px; color: var(--ink-2); }
.dist-table .pub-url-input { width: 100%; min-width: 0; box-sizing: border-box; }
.dist-table .dist-actions .btn { margin: 0 4px 4px 0; white-space: nowrap; }
/* 「我核对过」：单独占一行小字，跟在状态下面，不挤状态标签也不撑宽操作列 */
.dist-table .dist-level { white-space: nowrap; }
.dist-table .dist-confirm {
  display: block; margin-top: 4px; white-space: nowrap;
  border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; cursor: pointer;
  color: var(--brand); text-decoration: underline; text-underline-offset: 2px;
}
.dist-table .dist-confirm:hover { opacity: .78; }
.compact-table th, .compact-table td { padding: 9px 10px; font-size: 14.5px; vertical-align: top; }
.compact-table td .btn { margin: 0 4px 4px 0; }

#buy-submit { width: auto; justify-self: start; min-width: 116px; }
.report-url { word-break: break-all; line-height: 1.55; }

/* ---------- 侧栏分组归类 ---------- */
.nav-group { gap: 5px; }
.nav-sec { min-width: 0; }
.nav-sec-head {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border: 0; border-radius: 7px;
  background: none; color: var(--muted);
  font-size: 13.5px; font-weight: 500; letter-spacing: .3px;
  text-align: left; cursor: pointer;
}
.nav-sec-head:hover { background: var(--surface-2); color: var(--ink); }
.nav-item-home { margin-bottom: 2px; font-weight: 500; }
.nav-item-home .nav-home-ico { display: inline-flex; width: 18px; justify-content: center; color: currentColor; }
.nav-item-home .nav-home-ico svg { display: block; }
.nav-group > .nav-item-home { border-bottom: 1px solid var(--line); border-radius: 0; padding-bottom: 9px; margin-bottom: 6px; }
.nav-sec-arrow { margin-left: auto; font-size: 15px; line-height: 1; transition: transform .18s ease; color: var(--muted); }
.nav-sec.is-open .nav-sec-arrow { transform: rotate(90deg); }
.nav-sec-items { display: none; padding: 2px 0 4px 6px; gap: 2px; }
.nav-sec.is-open .nav-sec-items { display: grid; }
.nav-sec-items .nav-item { padding-left: 18px; font-size: 15px; }

/* ---------- 右上角 ---------- */
.top-help {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); font-size: 14.5px; padding: 6px 8px;
  border-radius: 8px; white-space: nowrap;
}
.top-help:hover { background: var(--surface-2); color: var(--brand); }
.top-help-ico { display: inline-flex; color: var(--muted); }
.top-help-ico svg { width: 15px; height: 15px; display: block; }
/* 顶栏「手册」：完整使用手册入口，与「帮助」并排 */
.top-manual {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); font-size: 14.5px; padding: 6px 8px;
  border-radius: 8px; white-space: nowrap;
}
.top-manual:hover { background: var(--surface-2); color: var(--brand); }
.top-manual-ico { display: inline-flex; color: var(--muted); }
.top-manual-ico svg { width: 15px; height: 15px; display: block; }
.top-home {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); font-size: 14.5px; padding: 6px 8px;
  border-radius: 8px; white-space: nowrap;
}
.top-home:hover { background: var(--surface-2); color: var(--brand); }
.top-home-ico { display: inline-flex; color: var(--muted); }
.top-home-ico svg { width: 15px; height: 15px; display: block; }

/* ---------- 右上角工单入口：客户是下拉（我的工单 / 提交新工单），管理员是直达 ---------- */
.tk-wrap { position: relative; flex: none; }
/* 与「首页/清除缓存」同一视觉：无外框，hover 才给浅底，避免顶栏堆一圈小方框 */
.top-ticket {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 8px;
  border: 0; background: transparent;
  color: var(--ink-2); font: inherit; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.top-ticket:hover { background: var(--surface-2); color: var(--brand); }
.top-ticket:focus-visible { outline: none; background: var(--surface-2); box-shadow: 0 0 0 3px rgba(14, 81, 72, .14); }
.tk-wrap.is-open .top-ticket { background: var(--surface-2); color: var(--brand); }
.top-ticket-ico { display: inline-flex; color: var(--muted); flex: none; }
.top-ticket-ico svg { width: 15px; height: 15px; display: block; }
.tk-caret { display: inline-flex; color: var(--muted); margin-left: -2px; }
.tk-caret svg { display: block; }
/* 角标：红底白字，贴在按钮右上角 */
.tk-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  font-size: 11px; font-weight: 600; font-style: normal; line-height: 1;
  color: #fff; background: var(--danger, #b4472f); border-radius: 9px;
  box-shadow: 0 0 0 2px #fff;
}
.tk-badge[hidden] { display: none; }
.tk-new {
  display: inline-flex; align-items: center; margin-left: 6px; vertical-align: middle;
  padding: 1px 6px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600;
  color: var(--danger, #b4472f); background: var(--danger-soft, #fbeae5);
}
.top-ticket > .tk-badge { position: absolute; top: -7px; right: -7px; }
.tk-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  width: 248px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg, 0 12px 32px rgba(24, 33, 31, .14));
}
.tk-menu[hidden] { display: none; }
.tk-menu button {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px;
  width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; text-align: left; cursor: pointer;
}
.tk-menu button:hover { background: var(--surface-2); }
.tk-menu button b { font-size: 14px; font-weight: 600; color: var(--ink); margin-right: auto; }
.tk-menu button > span { flex: 0 0 100%; font-size: 12.5px; color: var(--muted); }
.tk-menu button > .tk-badge { flex: none; box-shadow: none; align-self: center; }
.user-wrap { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  border: 0; background: none; border-radius: 8px; padding: 5px 8px;
  font-size: 15px; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.user-chip:hover { background: var(--surface-2); }
.user-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.user-caret { color: var(--muted); line-height: 1; display: inline-flex; }
.user-caret svg { width: 14px; height: 14px; display: block; }
.top-clear {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); font-size: 14.5px; padding: 6px 8px;
  border-radius: 8px; white-space: nowrap; cursor: pointer; background: none; border: 0;
}
.top-clear:hover { background: var(--surface-2); color: var(--brand); }
/* 顶栏「查看完整指引」：引导条被隐藏时高亮并带小圆点，提示可召回 */
.top-guide {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); font-size: 14.5px; padding: 6px 10px;
  border-radius: 8px; white-space: nowrap; cursor: pointer;
  background: none; border: 1px solid transparent;
}
.top-guide:hover { background: var(--surface-2); color: var(--brand); }
.top-guide svg { width: 15px; height: 15px; display: block; }
.top-guide.is-hidden { color: var(--brand); background: var(--brand-soft); border-color: rgba(14,81,72,.14); font-weight: 600; }
.guide-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); display: none; }
.top-guide.is-hidden .guide-dot { display: inline-block; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 224px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(24, 33, 31, .13); padding: 8px; z-index: 60;
}
.user-menu[hidden] { display: none; }
.user-menu-head { display: grid; gap: 2px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-menu-head b { font-size: 15px; font-weight: 600; }
.user-menu-head > span { font-size: 13px; color: var(--muted); }
.user-menu-role {
  display: inline-block; justify-self: start; margin-top: 5px;
  background: var(--brand-soft); color: var(--brand);
  border-radius: 5px; padding: 2px 8px; font-size: 12.5px;
}
.user-menu button,.user-menu a {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 9px 10px; border-radius: 8px; font-size: 14.5px; color: var(--ink-2);
  text-decoration: none; cursor: pointer; box-sizing: border-box;
}
.user-menu button:hover,.user-menu a:hover { background: var(--brand-soft); color: var(--brand); }
.user-menu-sep { height: 1px; background: var(--line); margin: 6px 0; }

/* ---------- 上手流程：一行紧凑流程条 ---------- */
.ob-flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ob-node {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0; width: 100%;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 6px 9px 6px 6px;
  font-size: 13.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.ob-node:hover { border-color: var(--brand); }
.ob-node-dot {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.ob-node.ob-done .ob-node-dot { background: var(--ok); color: #fff; }
.ob-node.ob-todo { color: var(--muted); background: var(--surface-2); }
.ob-node.ob-todo .ob-node-dot { background: var(--surface); color: var(--muted); border: 1px solid var(--line-strong); }
.ob-node.ob-current {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 4px 12px rgba(14, 81, 72, .18);
}
.ob-node.ob-current .ob-node-dot { background: rgba(255, 255, 255, .22); color: #fff; }
.ob-node-flag { font-size: 13.5px; background: rgba(255, 255, 255, .2); border-radius: 4px; padding: 1px 7px; }
.ob-node-line { display: none; }
.ob-node-title { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1300px) { .ob-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 窄屏再降一档到 2 列，避免标题被省略号切得太碎 */
@media (max-width: 620px) { .ob-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 平台设置：左侧三级菜单 ---------- */
.nav-parent { min-width: 0; }
.nav-item-parent { position: relative; padding-right: 26px; }
.nav-item-parent.parent-active { color: var(--brand); font-weight: 600; }
.nav-sub-arrow { position: absolute; right: 10px; font-size: 15px; line-height: 1; transition: transform .18s ease; color: var(--muted); }
.nav-parent.is-open .nav-sub-arrow { transform: rotate(90deg); }
.nav-sub-items { display: none; padding: 2px 0 4px 14px; gap: 2px; }
.nav-parent.is-open .nav-sub-items { display: grid; }
.nav-sub-items .nav-item { font-size: 14.5px; padding-left: 14px; color: var(--muted); }
.nav-sub-items .nav-item .dot { width: 4px; height: 4px; }
.nav-sub-items .nav-item.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.set-nav-ico { display: inline-flex; align-items: center; justify-content: center; width: 16px; flex: none; font-size: 14px; line-height: 1; opacity: .8; }
.nav-sec-items .nav-item.active .set-nav-ico { opacity: 1; }
.nav-item-ico { display: inline-flex; align-items: center; justify-content: center; width: 16px; flex: none; opacity: .7; }
.nav-item-ico svg { display: block; }
.nav-item.active .nav-item-ico { opacity: 1; }

/* ---------- 平台设置：分页与独立保存 ---------- */
.set-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.set-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-2); font-size: 14.5px; text-decoration: none; transition: .18s ease; white-space: nowrap; }
.set-tab:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.set-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(14, 81, 72, .18); }
.set-tab-ico { font-size: 15px; line-height: 1; opacity: .85; }
.set-page-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.set-page-head h3 { margin: 0; font-size: 19px; color: var(--ink); }
.set-page-head span { font-size: 14px; color: var(--muted); }
.set-block-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.set-form { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.set-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.set-legal-editor { font-family: var(--mono, ui-monospace, monospace); font-size: 13px; line-height: 1.7; resize: vertical; }
.set-legal-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.legal-preview { margin-top: 16px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); max-height: 420px; overflow: auto; }
.legal-preview-head { font-size: 13px; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.legal-preview-body { font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.legal-preview-body h2 { font-size: 17px; margin: 18px 0 8px; }
.legal-preview-body h3 { font-size: 15.5px; margin: 14px 0 6px; }
.legal-preview-body p { margin: 6px 0; }
/* ---------- 法律协议：内置富文本编辑器 ---------- */
.rte { border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; background: var(--surface); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 9px;
  border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rte-group { display: flex; gap: 4px; align-items: center; padding-right: 8px; border-right: 1px solid var(--line); }
.rte-group:last-child { border-right: 0; padding-right: 0; }
.rte-right { margin-left: auto; }
.rte-btn { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--surface); color: var(--ink-2); font-size: 13px;
  line-height: 1; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.rte-btn:hover { border-color: var(--brand); color: var(--brand); }
.rte-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.rte-select { height: 30px; max-width: 132px; padding: 0 6px; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--surface); color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.rte-visual { min-height: 268px; max-height: 520px; overflow: auto; padding: 16px 18px;
  font-size: 14px; line-height: 1.85; color: var(--ink-2); background: var(--surface); outline: none; }
.rte-visual:focus { box-shadow: inset 0 0 0 2px rgba(14, 81, 72, .10); }
.rte-visual h2 { font-size: 18px; margin: 18px 0 9px; color: var(--ink); }
.rte-visual h3 { font-size: 16px; margin: 15px 0 7px; color: var(--ink); }
.rte-visual h4 { font-size: 15px; margin: 12px 0 6px; color: var(--ink); }
.rte-visual p { margin: 7px 0; }
.rte-visual ol, .rte-visual ul { padding-left: 26px; margin: 9px 0; }
.rte-visual li { margin: 4px 0; }
.rte-visual blockquote { margin: 10px 0; padding: 4px 12px; border-left: 3px solid var(--brand);
  background: var(--surface-2); color: var(--muted); }
.rte-visual a { color: var(--brand); text-decoration: underline; }
.rte-visual:empty::before { content: '在这里编辑正文，或从下方「载入默认文本」开始…'; color: var(--muted); }
.rte textarea.rte-source { display: block; width: 100%; min-height: 268px; padding: 16px 18px;
  border: 0; border-radius: 0; box-shadow: none; resize: vertical; outline: none; }
.rte textarea.rte-source:focus { border: 0; box-shadow: none; }
.rte.is-source .rte-visual { display: none; }
.rte:not(.is-source) .rte-source { display: none; }
.rte.is-source .rte-group:not(.rte-right) { opacity: .42; pointer-events: none; }
.rte-mode { font-size: 12.5px; }
@media (max-width: 900px) { .rte-right { margin-left: 0; } }

.set-form code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
@media (max-width: 900px) { .set-tabs { gap: 6px; } .set-tab { padding: 7px 10px; font-size: 13.5px; } }

/* ---------- 经营看板：制高点四块总览 ---------- */
.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.ov-card { padding: 16px 18px; }
.ov-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.ov-head h3 { margin: 0; font-size: 16.5px; color: var(--ink); }
.ov-head span { font-size: 13px; color: var(--muted); }
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ov-kpis div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ov-kpis b { font-size: 23px; line-height: 1.2; color: var(--ink); }
.ov-kpis span { font-size: 12.5px; color: var(--muted); }
.ov-warn { color: var(--danger, #c0392b) !important; }
.ov-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ov-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; }
.ov-chip.internal { background: var(--surface-2); color: var(--muted); }
.ov-chip b { font-size: 13px; }
.ov-foot { margin-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.ov-foot a { color: var(--brand); }
.ov-health { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; }
.ov-state { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.ov-state i { width: 8px; height: 8px; border-radius: 50%; background: #c6cdc9; flex: none; }
.ov-state.on i { background: var(--ok, #2e9e6b); box-shadow: 0 0 0 3px rgba(46, 158, 107, .14); }
.ov-state.off i { background: #d8a13a; }
.ov-state b { margin-left: auto; font-size: 12px; font-weight: 500; white-space: nowrap; padding: 2px 8px; border-radius: 5px; }
.ov-state.on b { color: var(--ok, #2e9e6b); background: rgba(46, 158, 107, .11); }
.ov-state.off b { color: #a4761c; background: rgba(216, 161, 58, .14); }
.ov-state em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ov-head .ov-dot-ok, .ov-head .ov-dot-wait { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 2px 0 8px; vertical-align: 1px; }
.ov-head .ov-dot-ok { background: var(--ok, #2e9e6b); }
.ov-head .ov-dot-wait { background: #d8a13a; }
@media (max-width: 1100px) { .ov-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-health { grid-template-columns: 1fr; } }

/* ---------- 排版层级：标题与正文拉开差距，正文整体收敛 ---------- */
body { font-size: 15px; }
.page-title { font-size: 22px; }
.page-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.page-desc, .hint, .card-sub { font-size: 13px; }
.card-title { font-size: 16px; }
.modal-title { font-size: 17px; }
.btn { font-size: 14px; padding: 9px 16px; }
.btn-sm { font-size: 13px; padding: 6px 11px; }
.input, .select, .textarea { font-size: 14px; }
.nav-item, .nav-sec-items .nav-item, .nav-item-solo { font-size: 14px; }
.nav-sec-head, .nav-label { font-size: 12.5px; }
.user-chip, .ss-btn, .points-pill, .top-help, .top-manual, .top-home, .top-clear, .top-guide, .top-ticket { font-size: 13.5px; }
.brand-name { font-size: 16px; }
.brand-sub, .side-card-exp, .side-card-more { font-size: 12.5px; }
.user-menu-head b { font-size: 14px; }
.user-menu-head > span { font-size: 12.5px; }
.user-menu button, .user-menu a { font-size: 13.5px; }
table.data { font-size: 13.5px; }
table.data th { font-size: 12.5px; padding: 10px 14px; }
table.data td { padding: 11px 14px; }
.tag { font-size: 12.5px; }
.empty, .toast, .steps, .pay-info, .sys-section b, .dist-title,
.plan-name, .plan-meta, .plan ul, .shop-name, .shop-desc, .todo-title,
.todo-desc, .site-domain, .site-meta, .engine-name, .engine-adv,
.engine-result, .help-lead, .help-faq summary, .fin-note, .stat-label,
.ob-title, .link-btn, .notify-item, .pay-state, .hero-title, .fact-label,
.kpi-label, .kpi-foot, .help-do, .help-faq div, .dist-meta, .engine-doc,
.side-card-desc, .side-card-bottom, .chart-legend, .bar-row, .score-item,
.article, .variant-body, .help-body { font-size: 14px; }
.article, .variant-body, .help-body { font-size: 15px; }

/* ---------- OEM 授权管理：宽松表格与 Key 复制 ---------- */
.oem-table { min-width: 900px; }
.oem-table th, .oem-table td { white-space: nowrap; }
.oem-table th { padding: 11px 16px; }
.oem-table td { padding: 14px 16px; vertical-align: middle; }
.oem-table .oem-cell-main { display: block; font-weight: 600; font-size: 14px; color: var(--ink); }
.oem-table .oem-cell-sub { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.oem-table .oem-key { display: inline-flex; align-items: center; gap: 9px; }
.oem-table .oem-key code {
  font-size: 12.5px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px;
  max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.oem-copy {
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink-2); border-radius: 6px; padding: 4px 9px;
  font-size: 12px; cursor: pointer; transition: .15s;
}
.oem-copy:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.oem-actions { display: inline-flex; gap: 8px; }
.oem-events { min-width: 860px; }
.oem-events td:last-child { white-space: normal; min-width: 160px; }

/* ---------- 代理身份标签 / 单层菜单项 ---------- */
.user-menu-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.user-menu-role { margin-top: 0; }
.user-menu-agent, .side-agent-chip {
  display: inline-flex; align-items: center; border-radius: 5px;
  padding: 2px 8px; font-size: 12.5px;
  background: var(--accent-soft); color: var(--accent);
}
.side-agent-chip { font-size: 12px; }
.nav-item-solo .nav-item-ico { display: inline-flex; width: 18px; justify-content: center; flex: none; color: var(--muted); }
.nav-item-solo.active .nav-item-ico { color: var(--brand); }
.nav-item-solo .nav-item-ico svg { display: block; }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }


/* ---------- 即时说明浮层（替代原生 title，鼠标放上即显示） ---------- */
.tip-pop { position:fixed; z-index:9999; display:none; max-width:380px; padding:11px 13px;
  border:1px solid var(--line-strong); border-radius:9px; background:var(--surface);
  color:var(--ink-2); font-size:13px; line-height:1.8; white-space:pre-line;
  box-shadow:0 12px 32px rgba(14,45,38,.18); pointer-events:none; }
.tip-q { display:inline-flex; align-items:center; justify-content:center; width:17px; height:17px;
  margin-left:6px; border:1px solid var(--line-strong); border-radius:50%; background:var(--surface-2);
  color:var(--muted); font-size:12px; line-height:1; cursor:help; vertical-align:2px; user-select:none; }
.tip-q:hover, .tip-q:focus { border-color:var(--brand); color:#fff; background:var(--brand); outline:none; }
.tip-q.tip-q-brand { border-color:var(--brand); background:var(--brand-soft); color:var(--brand); }
.tip-q.tip-q-brand:hover, .tip-q.tip-q-brand:focus { color:#fff; background:var(--brand); }
.site-score[data-tip] { cursor:help; }

/* ---------- 客户侧站点巡检 ---------- */
.patrol-card { margin-bottom:14px; }
.patrol-kpis { display:flex; flex-wrap:wrap; margin-bottom:14px; border:1px solid var(--line);
  border-radius:9px; overflow:hidden; background:var(--surface-2); }
.patrol-kpis > div { flex:1 1 140px; padding:11px 16px; border-right:1px solid var(--line); }
.patrol-kpis > div:last-child { border-right:0; }
.patrol-kpis b { display:block; font-size:21px; font-weight:600; color:var(--ink); line-height:1.35; }
.patrol-kpis span { font-size:12px; color:var(--muted); }
.patrol-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:8px; margin-top:12px; font-size:13px; color:var(--muted); }
.patrol-foot .link-btn { margin-top:0; }

/* ---------- 品牌设置：微信二维码维护 ---------- */
.qr-edit { display:flex; gap:14px; align-items:flex-start; flex-wrap:wrap; }
.qr-preview { width:112px; height:112px; flex:none; border:1px dashed var(--line-strong); border-radius:10px;
  background:var(--surface-2); display:grid; place-items:center; overflow:hidden; }
.qr-preview img { width:100%; height:100%; object-fit:contain; display:block; }
.qr-empty { font-size:12.5px; color:var(--muted); text-align:center; padding:0 8px; line-height:1.5; }
.qr-edit-main { flex:1 1 260px; min-width:0; display:grid; gap:8px; }
.qr-edit-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.qr-edit-actions label.btn { cursor:pointer; }

/* ---------- 移动端：侧栏抽屉 + 顶栏精简 + 内容重排 ---------- */
.nav-toggle { display:none; align-items:center; justify-content:center; width:36px; height:36px; flex:none;
  border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--ink-2); }
.side-mask { display:none; }
@media (max-width:760px) {
  .shell { grid-template-columns:1fr; }
  .nav-toggle { display:inline-flex; }
  .sidebar {
    position:fixed; left:0; top:0; bottom:0; width:min(282px,84vw);
    height:100vh; height:100dvh; z-index:60;
    transform:translateX(-102%); transition:transform .22s ease;
    flex-direction:column; align-items:stretch; gap:12px; padding:16px 12px;
    overflow-y:auto; box-shadow:12px 0 36px rgba(10,29,25,.16);
  }
  body.nav-open .sidebar { transform:none; }
  .side-mask { position:fixed; inset:0; z-index:55; background:rgba(10,29,25,.42); display:none; }
  body.nav-open .side-mask { display:block; }
  .nav-group { display:grid; flex:1 1 auto; overflow-y:auto; overflow-x:hidden; align-content:start; }
  .nav-label, .side-foot { display:block; }
  .nav-item { white-space:normal; }
  .auth-wrap { grid-template-columns:1fr; }
  .auth-side { display:none; }
  .grid-4, .grid-3, .grid-2, .grid-side { grid-template-columns:1fr; }
  .page { padding:14px 12px 30px; }
  .topbar { padding:0 12px; height:56px; gap:8px; }
  .top-home, .top-help, .top-guide, .top-clear { display:none!important; }
  /* 手机端「手册」保留为纯图标按钮：顶栏空间有限，但手册是主要查阅入口 */
  .top-manual { display:inline-flex!important; padding:6px; }
  .top-manual-txt { display:none; }
  .top-manual-ico { color: var(--ink-2); }
  /* 工单入口在手机端只留图标 + 角标，位置仍紧挨点数与头像 */
  .top-ticket { padding: 7px 9px; gap: 4px; }
  .top-ticket-txt, .tk-caret { display: none; }
  .tk-menu { width: 232px; }
  .ss-btn { height: 38px; padding: 0 8px; gap: 7px; border-radius: 10px; }
  .ss-ico { display: none; }
  .ss-name, .ss-dom { max-width: 116px; }
  .ss-menu { width: 282px; }
  .points-pill { padding:4px 9px; font-size:13px; }
  .user-name { display:none; }
  .user-menu { right:0; min-width:216px; }
  .table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; max-width:100%; }
  /* 小屏表格保持横排：按内容自然宽度撑开，不再把列压成竖排；
     超出的部分在容器内左右滑动查看，文字与日期、按钮都不折行。*/
  .table-wrap > table.data { min-width: max-content; }
  .table-wrap > table.data th,
  .table-wrap > table.data td { white-space: nowrap; word-break: normal; }
  /* 这几张表原有自己的最小宽度 / 靠换行排版，按原样保留 */
  .table-wrap > table.data.oem-table { min-width: 900px; }
  .table-wrap > table.data.oem-events { min-width: 860px; }
  .table-wrap > table.data.oem-cmp { min-width: 620px; }
  .table-wrap > table.data.oem-cmp th,
  .table-wrap > table.data.oem-cmp td,
  .table-wrap > table.data.oem-events td:last-child { white-space: normal; }
  /* 分发记录在小屏保持横排滑动，文字同样不折行，超出部分省略 */
  .table-wrap > table.data.dist-table { min-width: 860px; }
  .pub-page .table-wrap > table.data.dist-table .dist-title,
  .pub-page .table-wrap > table.data.dist-table .dist-note { white-space: nowrap; word-break: normal; }
  .pub-page .page-head h1 { font-size: 20px; }
  .modal-mask { padding:10px; }
  .modal { --mp:18px; --mpx:15px; width:calc(100vw - 20px); max-width:none; }
  .modal.wide.cmp { --mp:14px; --mpx:10px; width:calc(100vw - 20px); max-width:none; }
  .page-head { gap:10px; margin-bottom:14px; }
  .page-title { font-size:20px; }
  .card { padding:14px; }
  .kpi { padding:13px 14px; }
  .kpi-value { font-size:24px; }
  .stat-grid { grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; }
  .ob-steps { grid-template-columns:1fr; }
  .qr-edit-main { flex-basis:100%; }
}
@media (max-width:420px) {
  .topbar { gap:6px; }
  .ss-name { display:none; }
  .ss-name, .ss-dom { max-width: 104px; }
  .ss-dom { font-size: 13px; }
  /* 390 这类窄屏顶栏放不下点数胶囊，点数在侧栏底部卡片同样能看到 */
  .points-pill { display:none; }
  .user-chip { gap:5px; }
  .page-head { flex-direction:column; align-items:flex-start; }
  .ov-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .qr-preview { width:92px; height:92px; }
  /* 顶栏空间紧张：头像缩小并去掉下拉箭头，把位置让给「手册」入口 */
  .user-chip { padding:4px; gap:0; }
  .avatar { width:26px; height:26px; font-size:13px; }
  .user-caret { display:none; }
}

/* ---------- 使用手册（#/manual） ---------- */
.manual-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.manual-entry-main { display: flex; align-items: flex-start; gap: 14px; min-width: 0; flex: 1 1 320px; }
.manual-entry-ico {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.manual-entry-desc { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.65; }

.manual-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.manual-side {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 10px;
  box-shadow: var(--shadow);
}
.manual-side-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .6px;
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.manual-toc { display: flex; flex-direction: column; gap: 1px; }
.manual-toc-item {
  display: block;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.45;
  border-left: 2px solid transparent;
  transition: background .12s, color .12s;
}
.manual-toc-item:hover { background: var(--surface-2); color: var(--brand); }
.manual-toc-item.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; border-left-color: var(--brand); }
.manual-toc-item.lv3 { padding-left: 20px; font-size: 13px; color: var(--muted); }

.manual-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px 34px;
  box-shadow: var(--shadow);
  min-width: 0;
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink);
}
.manual-body > :first-child { margin-top: 0; }

.md-h { scroll-margin-top: 84px; color: var(--ink); letter-spacing: .2px; }
.md-h1 { font-size: 25px; margin: 30px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.md-h2 { font-size: 21px; margin: 32px 0 12px; padding-left: 11px; border-left: 4px solid var(--brand); }
.md-h3 { font-size: 17.5px; margin: 24px 0 9px; color: var(--brand); }
.md-h4 { font-size: 16px; margin: 18px 0 8px; color: var(--ink-2); }
.md-p { margin: 10px 0; }
.md-hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }

.md-list { margin: 10px 0; padding-left: 24px; }
.md-list li { margin: 5px 0; }
.md-sub { margin: 4px 0; padding-left: 22px; color: var(--ink-2); }
.md-sub li { font-size: 15.5px; }

.md-quote {
  margin: 14px 0;
  padding: 12px 16px;
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-2);
  font-size: 15.5px;
}
.md-quote .md-p:last-child { margin-bottom: 0; }
.md-quote .md-quote { background: rgba(255,255,255,.6); }

.md-table-wrap {
  margin: 14px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.md-table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--surface); }
.md-table th, .md-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
.md-table th { background: var(--surface-2); font-weight: 700; color: var(--ink); white-space: nowrap; }
.md-table tbody tr:last-child td { border-bottom: 0; }
.md-table tbody tr:nth-child(even) { background: #fcfdfd; }

.md-code {
  margin: 14px 0;
  padding: 13px 16px;
  background: #16211f;
  color: #d9e6e2;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.md-code code { font-family: inherit; white-space: pre; }
.md-inline-code {
  padding: 1px 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13.5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--brand);
  word-break: break-word;
}
.manual-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.manual-body strong { color: var(--ink); font-weight: 700; }

@media (max-width: 980px) {
  .manual-layout { grid-template-columns: 1fr; }
  .manual-side { position: static; max-height: none; }
  .manual-toc { max-height: 260px; overflow-y: auto; }
  .manual-body { padding: 20px 18px 26px; font-size: 15.5px; }
  .md-h1 { font-size: 22px; }
  .md-h2 { font-size: 19px; }
  .md-h3 { font-size: 17px; }
  .manual-entry { align-items: flex-start; }
}

/* 打印：只输出手册正文 */
@media print {
  .sidebar, .topbar, .side-mask, .nav-toggle, .page-actions, .manual-side { display: none !important; }
  .shell { grid-template-columns: 1fr !important; }
  .manual-body { border: 0; box-shadow: none; padding: 0; font-size: 12pt; }
  .md-table-wrap { overflow: visible; }
  .md-h { break-after: avoid; }
}

/* ---------- 缺失项自助指引（站点详情弹窗） ---------- */
.fix-link { margin-left: 8px; flex: none; white-space: nowrap; }
.check-row .name[data-tip] { cursor: help; }
.check-row .name[data-tip]:hover { color: var(--brand); }

.fix-nudge {
  margin-top: 14px; padding: 12px 14px;
  background: var(--warn-soft); border-left: 3px solid var(--warn);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.fix-nudge b { display: block; font-size: 15.5px; color: var(--ink); margin-bottom: 3px; }
.fix-nudge span { font-size: 14.5px; color: var(--ink-2); line-height: 1.7; }

.fix-quick { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.fix-quick-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 10px 13px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.fix-quick-head b { font-size: 15.5px; color: var(--ink); }
.fix-quick-head span { font-size: 14px; color: var(--muted); }
.fix-quick-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 13px; border-bottom: 1px dashed var(--line);
}
.fix-quick-row:last-child { border-bottom: 0; }
.fix-quick-name { font-size: 15px; font-weight: 600; color: var(--ink); flex: none; min-width: 132px; }
.fix-quick-hint { font-size: 14px; color: var(--muted); flex: 1 1 220px; line-height: 1.6; }
.fix-quick-row .btn { flex: none; }

/* ---------- 「这是什么 / 去哪找 / 怎么补」三段式指引 ---------- */
.guide-block { margin-bottom: 16px; }
.guide-block:last-child { margin-bottom: 0; }
.guide-k {
  font-size: 14px; font-weight: 700; color: var(--brand);
  letter-spacing: .4px; margin-bottom: 5px;
}
.guide-v { font-size: 15.5px; line-height: 1.85; color: var(--ink-2); }
.guide-where { background: var(--brand-soft); padding: 12px 14px; border-radius: var(--radius-sm); }
.guide-where .guide-k { color: var(--brand); margin-bottom: 4px; }
.guide-where .guide-v { color: var(--ink); }
.guide-steps { margin: 4px 0 0; padding-left: 22px; }
.guide-steps li { font-size: 15.5px; line-height: 1.85; color: var(--ink-2); margin-bottom: 7px; }
.guide-steps li::marker { color: var(--brand); font-weight: 700; }
.guide-code {
  margin: 6px 0 0; padding: 12px 14px;
  background: #16211f; color: #d9e6e2; border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.7; max-height: 260px; overflow: auto;
  white-space: pre-wrap; word-break: break-all;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.guide-verify { padding-top: 12px; border-top: 1px dashed var(--line); }
.guide-verify .guide-k { color: var(--ok); }

@media (max-width: 760px) {
  .fix-quick-name { min-width: 0; }
  .fix-quick-row { gap: 8px; }
  .guide-steps li { font-size: 15px; }
}

/* ---------- 标题内的问号：与标题文字对齐，不喧宾夺主 ---------- */
.card-title .tip-q,
.kpi-label .tip-q,
.page-title .tip-q {
  width: 15px; height: 15px; font-size: 11px; margin-left: 5px;
  vertical-align: 1px; opacity: .72;
}
.card-title .tip-q:hover,
.kpi-label .tip-q:hover,
.page-title .tip-q:hover { opacity: 1; }

/* 卡片标题问号后的小字说明，避免撑破标题行 */
.hint > .tip-q { vertical-align: 1px; }

/* ---------- 发布回执 / 自建站点对接：统一字号层级 ---------- */
/* 五档：页面标题 22 / 卡片标题 16 / 正文说明 13 / 表格 13.5 / 按钮 14；
   辅助小字 12.5。原先「对接流程」16px、文章标题 16px 比正文大一圈，统一收敛。 */
.pub-page .page-head h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.pub-page .page-desc { font-size: 13px; color: var(--muted); margin: 0; }
.pub-page .card-title { font-size: 16px; }
.pub-page .card-sub,
.pub-page .hint,
.pub-page .field label,
.pub-page .check-row,
.pub-page .dist-channel,
.pub-page .dist-title { font-size: 13px; }
.pub-page .dist-note,
.pub-page .dist-meta,
.pub-page .dist-level,
.pub-page .tag { font-size: 12.5px; }
.pub-page .check-row { padding: 7px 0; }
.pub-page .check-row b { font-weight: 600; }
.pub-page .dist-title { font-weight: 600; }
.pub-page table.data { font-size: 13.5px; }
.pub-page .btn { font-size: 14px; }
.pub-page .btn-sm { font-size: 13px; }
.pub-page .input, .pub-page select.input, .pub-page textarea.input { font-size: 13px; }
.pub-page .kpi-label { font-size: 13px; }

.pub-page .pub-kpis,
.pub-page .pub-card,
.pub-page .pub-pair { margin-bottom: 14px; }
.pub-page .pub-steps { margin-top: 14px; border-top: 1px solid var(--border-tertiary); padding-top: 12px; }
.pub-page .pub-evidence > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.pub-page .pub-evidence > summary::-webkit-details-marker { display: none; }
.pub-page .pub-evidence > summary::before { content: '▸'; color: var(--muted); font-size: 13px; }
.pub-page .pub-evidence[open] > summary::before { content: '▾'; }
.pub-page .pub-evidence[open] > .table-wrap { margin-top: 14px; }
.pub-page .pub-evidence-table { table-layout: fixed; }
.pub-page .pub-evidence-table td[data-tip] { cursor: help; }
.pub-page .pub-evidence-table td[data-tip]:hover { color: var(--brand); }

/* 长说明与补登控件默认收起，回执页一屏就能看完整张表 */
.pub-page .pub-fold { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.pub-page .pub-fold > summary { list-style: none; cursor: pointer; color: var(--muted); }
.pub-page .pub-fold > summary::-webkit-details-marker { display: none; }
.pub-page .pub-fold > summary::before { content: '▸'; margin-right: 6px; }
.pub-page .pub-fold[open] > summary::before { content: '▾'; }
.pub-page .pub-fold > summary:hover { color: var(--brand); }
.pub-page .pub-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.pub-page .pub-add-row #pub-newurl { width: 280px; }

/* 表格内文字一律单行不折行；长标题 / 长说明用省略号，悬停看全文 */
.pub-page .dist-table th,
.pub-page .dist-table td { white-space: nowrap; word-break: normal; vertical-align: top; }
.pub-page .dist-table .dist-title,
.pub-page .dist-table .dist-note,
.pub-page .dist-table .dist-channel,
.pub-page .dist-table .dist-meta,
.pub-page .dist-table .dist-level,
.pub-page .pub-evidence td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pub-page .dist-table .dist-title[data-tip],
.pub-page .dist-table .dist-note[data-tip] { cursor: help; }
.pub-page .dist-table .dist-title[data-tip]:hover,
.pub-page .dist-table .dist-note[data-tip]:hover { color: var(--brand); }

/* ---------- 自媒体发布：各平台字数上限设置 ---------- */
.limit-table { table-layout: fixed; }
.limit-table th, .limit-table td { white-space: nowrap; }
.limit-table .input { width: 84px; padding: 4px 8px; font-size: 14px; }
.limit-unit { font-size: 12.5px; color: var(--muted); margin-left: 4px; }
.cell-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.cell-ellipsis:hover { color: var(--brand); }

/* ---------- 总览：概要指标可点卡片 + 情感分布 ---------- */
.hero-main { min-width: 0; }
.hero-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hero-range { font-size: 12.5px; color: var(--muted); }

/* 每格都是链接：数字下面给分母，0% 才不会被看成「坏了」 */
.hero-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.fact {
  display: flex; flex-direction: column; gap: 1px;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: inherit; text-decoration: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.fact:hover { border-color: var(--brand); background: var(--surface); box-shadow: 0 2px 8px rgba(24, 33, 31, .06); }
.fact-value { font-size: 22px; font-weight: 600; letter-spacing: -.4px; line-height: 1.15; }
.fact.is-null .fact-value { color: var(--muted); font-weight: 500; }
.fact-label { font-size: 13px; font-weight: 500; color: var(--ink); }
.fact-sub { font-size: 12px; color: var(--muted); }

.hero-senti {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.senti-lead { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.senti-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 12.5px; color: var(--ink-2); font-family: inherit;
  transition: border-color .15s, background .15s, color .15s;
}
.senti-chip i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.senti-chip b { font-weight: 600; color: var(--ink); }
.senti-chip.pos i { background: #2e9e6b; }
.senti-chip.neu i { background: #a9b3af; }
.senti-chip.neg i { background: #cf5a4a; }
.senti-chip:hover { background: var(--surface-2); border-color: currentColor; }
.senti-chip.pos:hover { color: #2e9e6b; }
.senti-chip.neg:hover { color: #cf5a4a; }
.senti-hint { font-size: 12px; color: var(--muted); opacity: .85; }

/* 情感明细弹窗 */
.senti-list { display: flex; flex-direction: column; gap: 10px; max-height: 54vh; overflow: auto; padding-right: 4px; }
.senti-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.senti-item-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.senti-open { margin: 0 0 0 auto; font-size: 12.5px; }
.senti-q { font-size: 13.5px; font-weight: 500; margin-top: 6px; }
.senti-a { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 3px; }
.senti-foot { font-size: 12px; color: var(--muted); margin-top: 7px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.senti-count { color: var(--brand); font-weight: 600; }
/* 同问题多次采样合并后，「每次回答」用时间做链接 */
.senti-run {
  font-size: 12px; color: var(--brand); font-family: inherit; cursor: pointer;
  padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
}
.senti-run:hover { border-color: var(--brand); background: var(--brand-soft); }
.senti-site { margin-left: auto; }
.senti-write { margin: 0 0 0 auto; flex: none; }
/* 「含负面词」这类提示要能一眼看出是解释，不是警告 */
.hint-note {
  padding: 10px 12px; border-radius: 9px; line-height: 1.7;
  background: #fdf7e9; border: 1px solid #f0e2c2; color: #7a5c1e;
}

/* ---------- 字号层级收口：数字三档 36 / 26 / 22，正文 13.5，说明 12.5 ---------- */
.ring-value { font-size: 36px; }
.ring-label { font-size: 12.5px; letter-spacing: 1px; }
.kpi-value { font-size: 26px; }
.kpi-value small { font-size: 14px; }
.kpi-label, .kpi-foot { font-size: 13px; }
.todo-title { font-size: 14px; font-weight: 600; }
.todo-desc { font-size: 12.5px; line-height: 1.55; }
.hero-title, .hero-note { font-size: 13px; }

@media (max-width: 1080px) {
  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { align-items: center; text-align: center; }
  .hero-head, .hero-senti { justify-content: center; }
}
@media (max-width: 560px) {
  .hero-facts { grid-template-columns: 1fr; }
}

/* 761-1180：侧栏固定占 244px，顶栏点数和入口一多就挤不下，收掉次要入口而不是让它折行溢出 */
@media (min-width: 761px) and (max-width: 1280px) {
  .topbar { gap: 10px; padding: 0 16px; }
  .top-home, .top-help, .top-guide, .top-clear { display: none !important; }
  .ss-name, .ss-dom { max-width: 132px; }
  .points-pill { flex: none; white-space: nowrap; }
}

/* ---------- 立即监测：按钮旁的成本说明 + 扣点确认弹窗 ---------- */
.run-cluster { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.run-row { display: flex; align-items: center; gap: 6px; }
.run-cost { font-size: 12.5px; line-height: 1.35; color: var(--muted); white-space: nowrap; }
.run-cost.is-short { color: #cf5a4a; font-weight: 500; }

.spend-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.spend-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 13px; font-size: 13.5px; color: var(--ink-2); border-bottom: 1px solid var(--line);
}
.spend-row b { font-weight: 600; color: var(--ink); }
.spend-total { background: var(--surface-2); }
.spend-total b { color: var(--brand); font-size: 16px; }
.spend-note { padding: 9px 13px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); }

@media (max-width: 560px) {
  /* 手机端一行放不下「采样 + 按钮 + 成本」，让按钮独占一行，别把小字挤到采样器旁边 */
  .run-cluster { flex: 1 0 100%; align-items: stretch; }
  .run-row { justify-content: flex-start; }
  .run-cost { white-space: normal; }
}

/* ---------- 验证站点归属：两种方式各成一块，下载文件不用自己造 ---------- */
.vm-block { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); margin-bottom: 12px; }
.vm-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13.5px; color: var(--ink); }
.vm-no { font-size: 12px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 2px 9px; }
.vm-tag { margin-left: auto; font-size: 12px; color: var(--muted); }
.vm-code {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 13px; font-size: 13px; line-height: 1.6; overflow: auto;
  white-space: pre-wrap; word-break: break-all;
}
.vm-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 9px; }
.vm-acts .hint { margin: 0; font-size: 12.5px; line-height: 1.6; }
.vm-file {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
}
.vm-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.vm-file .hint { margin: 3px 0 0; font-size: 12.5px; }
.vm-foot { display: flex; gap: 8px; margin-top: 16px; }

@media (max-width: 560px) {
  .vm-tag { margin-left: 0; width: 100%; }
  .vm-file { align-items: flex-start; }
  .vm-foot { flex-direction: column; }
  .vm-foot .btn { width: 100%; }
}

/* ---------- 自建站点对接：只留「下载文件 + 测试」两件事 ---------- */
.int-download {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
}
.int-download-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.int-download-text b { font-size: 13.5px; color: var(--ink); }
.int-download-text span { font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.int-status {
  margin-top: 14px; padding: 9px 12px; border-radius: 9px; font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.int-status.is-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.int-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.int-actions .hint { margin: 0; font-size: 12.5px; }

@media (max-width: 560px) {
  .int-download { align-items: stretch; }
  .int-download .btn { width: 100%; text-align: center; }
}

/* ---------- 二开申请表单：必填标记 + 逐项红字，不让人空着提交 ---------- */
.req-mark {
  font-style: normal; font-size: 11.5px; font-weight: 500; letter-spacing: .3px;
  color: var(--danger); background: var(--danger-soft);
  padding: 1px 6px; border-radius: 999px; margin-left: 6px; vertical-align: 1px;
}
.pub-page .error-text { font-size: 12.5px; line-height: 1.6; margin-top: 5px; }
.input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* 客户自己的工单：状态 + 平台回复，都在这一块里 */
.rq-tickets {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.rq-tk-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.rq-tk {
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); display: flex; flex-direction: column; gap: 6px;
}
.rq-tk-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rq-tk-head b { font-size: 13.5px; color: var(--ink); }
.rq-tk-meta { font-size: 12.5px; color: var(--muted); }
.rq-tk-req { font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.rq-tk-reply {
  margin-top: 2px; padding: 9px 11px; border-radius: 8px; font-size: 13px; line-height: 1.7;
  background: var(--brand-soft); color: var(--ink-2);
}
.rq-tk-reply b { color: var(--brand); font-weight: 600; margin-right: 2px; }

/* 运营处理工单的弹窗：一屏看全，改完点保存 */
.tk-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); margin-bottom: 14px;
}
.tk-facts > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tk-facts span { font-size: 12px; color: var(--muted); }
.tk-facts b { font-size: 13px; font-weight: 500; color: var(--ink); word-break: break-all; }
.tk-facts b a { color: var(--brand); }
.tk-facts .tk-full { grid-column: 1 / -1; }
.tk-facts .tk-full p {
  margin: 0; font-size: 13px; line-height: 1.7; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}

@media (max-width: 760px) {
  .tk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tk-facts { grid-template-columns: 1fr; }
}

/* 加购项：一行一个，名称和价格不断在中间折行 */
.rq-addons-title { font-size: 13px; color: var(--muted); margin: 10px 0 7px; }
.rq-addons { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.rq-addon {
  display: inline-flex; align-items: flex-start; gap: 6px;
  font-size: 13px; line-height: 1.6; color: var(--ink-2); cursor: pointer;
}
.rq-addon input { margin: 3px 0 0; flex: 0 0 auto; }
.rq-addon b { font-weight: 600; color: var(--ink); }

/* ---------- 生成 GEO 内容：字数可选可填 + 一眼能看懂的进度 ---------- */
.gen-words { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gen-word-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.gen-word-pick {
  padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-family: inherit;
  font-size: 13px; line-height: 1.5; cursor: pointer; transition: all .15s ease;
}
.gen-word-pick:hover { border-color: var(--brand); color: var(--brand); }
.gen-word-pick.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.gen-word-pick:disabled { opacity: .55; cursor: not-allowed; }
.gen-word-custom { display: flex; align-items: center; gap: 6px; }
.gen-word-custom .input { width: 96px; text-align: right; }
.gen-word-unit { font-size: 13px; color: var(--muted); }

.gen-progress {
  margin-top: 14px; padding: 14px 16px 15px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
}
.gen-gp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.gen-gp-stage { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.gen-gp-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.gen-gp-pct {
  font-size: 34px; font-weight: 600; line-height: 1; color: var(--brand);
  font-variant-numeric: tabular-nums; letter-spacing: -.5px;
}
.gen-gp-track { height: 10px; border-radius: 999px; background: #e3eae7; overflow: hidden; }
.gen-gp-fill {
  position: relative; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #4aa392);
  transition: width .2s linear;
}
.gen-gp-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  animation: gpShine 1.5s linear infinite;
}
@keyframes gpShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.gen-gp-note { font-size: 12.5px; color: var(--muted); margin-top: 9px; line-height: 1.6; }
.gen-progress.is-done .gen-gp-pct { color: var(--ok); }
.gen-progress.is-done .gen-gp-fill { background: var(--ok); }
.gen-progress.is-done .gen-gp-fill::after { display: none; }
.gen-progress.is-failed .gen-gp-pct { color: var(--danger); }
.gen-progress.is-failed .gen-gp-fill { background: var(--danger); }
.gen-progress.is-failed .gen-gp-fill::after { display: none; }

@media (max-width: 560px) {
  .gen-word-custom .input { width: 76px; }
  .gen-gp-pct { font-size: 28px; }
}

/* ---------- 素材卡「这份怎么放」：下载按钮下面直接写清去哪、怎么弄、怎么验收 ---------- */
.kit-how {
  margin-top: 14px; padding-top: 11px; border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 7px;
}
.kit-how-h { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.kit-how-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; align-items: start; }
.kit-how-row > span {
  font-size: 11.5px; line-height: 1.55; text-align: center; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 0;
}
.kit-how-row > p { margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--ink-2); word-break: break-word; }
.kit-how-row:first-of-type > p { color: var(--ink); font-weight: 500; }
.kit-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; margin-right: 7px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-size: 11.5px; font-weight: 600; vertical-align: 1px;
}

/* ---------- 客服工单：列表筛选 + 对话气泡 + 截图 ---------- */
.st-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.st-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
  font-family: inherit; font-size: 13px; line-height: 1.5; cursor: pointer;
  transition: all .15s ease;
}
.st-tab:hover { border-color: var(--brand); color: var(--brand); }
.st-tab b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.st-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.st-tab.active b { color: rgba(255, 255, 255, .8); }

.st-thread {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 44vh; overflow: auto; padding: 2px 4px 2px 2px;
}
.st-msg {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 13px; background: var(--surface);
}
.st-msg.is-admin { background: var(--brand-soft); border-color: transparent; }
.st-msg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.st-msg-head b { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.st-msg-head span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.st-msg-body { font-size: 13.5px; line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
/* 系统留痕（平台退点等）：居中一条，不冒充任何一方发言 */
.st-sys {
  align-self: center; max-width: 100%;
  padding: 6px 13px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
  font-size: 12.5px; line-height: 1.65; text-align: center;
}
.st-sys span { margin-left: 8px; opacity: .7; white-space: nowrap; }

/* 工单退点区块 */
.rf-box {
  margin-top: 14px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.rf-head { display: flex; gap: 4px 10px; align-items: baseline; flex-wrap: wrap; }
.rf-head b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.rf-head span { flex: 1 1 340px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.rf-done {
  margin-top: 9px; padding: 6px 10px; border-radius: 8px;
  background: var(--ok-soft); color: var(--ok); font-size: 12.5px;
}
.rf-label { margin-top: 11px; font-size: 12px; color: var(--muted); line-height: 1.65; }
.rf-spend-select { width: 100%; margin-top: 7px; cursor: pointer; }
.rf-pick-note { margin-top: 6px; min-height: 15px; font-size: 12px; color: var(--brand); }
.rf-form {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 8px; margin-top: 8px; align-items: center;
}
.rf-form .input { height: 37px; }
.rf-form .btn { height: 37px; width: auto; padding: 0 18px; white-space: nowrap; }
.rf-foot { margin-top: 8px; font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .rf-form { grid-template-columns: 1fr; }
  .rf-form .btn { width: 100%; }
}
.st-shot {
  display: block; margin-top: 9px; max-width: 100%; max-height: 260px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}

.st-upload { display: flex; flex-direction: column; gap: 9px; }
.st-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-pick .hint { margin: 0; }
.st-preview { position: relative; display: inline-block; max-width: 100%; }
.st-preview img { max-height: 160px; max-width: 100%; display: block; border: 1px solid var(--line); border-radius: 8px; }
.st-preview-x {
  position: absolute; top: -9px; right: -9px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer;
}
.st-count { font-size: 12px; color: var(--muted); text-align: right; margin-top: 5px; }

@media (max-width: 560px) {
  .st-thread { max-height: 52vh; }
  .st-shot { max-height: 200px; }
}

/* ---------------- 发票申请 ---------------- */
.inv-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.inv-tab {
  padding: 7px 18px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface); color: var(--ink2); font-size: 13px; cursor: pointer;
}
.inv-tab:hover { border-color: var(--brand); color: var(--brand); }
.inv-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.inv-apply-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink2);
}
.inv-apply-bar b { color: var(--brand); font-variant-numeric: tabular-nums; }
.inv-done {
  margin-top: 14px; padding: 12px 14px; border-radius: 8px;
  background: rgba(14, 81, 72, .07); color: var(--brand); font-size: 13px;
}
.inv-done b { font-weight: 600; }
@media (max-width: 560px) {
  .inv-tabs { gap: 6px; }
  .inv-tab { padding: 7px 12px; }
  .inv-apply-bar { flex-direction: column; align-items: stretch; }
  .inv-apply-bar .btn { width: 100%; }
}

/* 平台 Logo 上传预览：与二维码编辑区同一视觉，方形变体 */
.logo-edit { display:flex; gap:14px; align-items:flex-start; flex-wrap:wrap; }
.logo-preview { width:112px; height:112px; flex:none; border:1px dashed var(--line-strong); border-radius:10px;
  background:var(--surface-2); display:grid; place-items:center; overflow:hidden; }
.logo-preview img { width:100%; height:100%; object-fit:contain; display:block; }
.logo-edit-main { flex:1 1 260px; min-width:0; display:grid; gap:8px; }
@media (max-width: 560px) {
  .logo-edit-main { flex-basis:100%; }
  .logo-preview { width:92px; height:92px; }
}

/* ---------------- 对公转账凭证 ---------------- */
.vc-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:12px; }
.vc-cell { position:relative; aspect-ratio:1; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:var(--surface-2); }
.vc-cell img { width:100%; height:100%; object-fit:cover; display:block; }
.vc-del { position:absolute; top:2px; right:2px; width:22px; height:22px; border:0; border-radius:50%; background:rgba(0,0,0,.6); color:#fff; font-size:16px; line-height:1; cursor:pointer; }
.vc-viewer { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.vc-viewcell { position:relative; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:var(--surface-2); }
.vc-viewcell img { width:100%; height:150px; object-fit:cover; display:block; cursor:zoom-in; }
.vc-viewcell span { display:block; padding:4px 8px; font-size:12px; color:var(--muted); text-align:center; }
@media (max-width:560px) {
  .vc-grid { grid-template-columns:repeat(3,1fr); }
  .vc-viewer { grid-template-columns:1fr; }
}

/* 素材上传弹窗的待选缩略图：横排小图，去掉方形大块 */
#mat-pending.vc-grid { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
#mat-pending .vc-cell { width:72px; height:72px; aspect-ratio:auto; flex:0 0 auto; }
#mat-pending .vc-cell img { width:72px; height:72px; }
#mat-pending .vc-del { width:18px; height:18px; font-size:13px; top:2px; right:2px; }

/* ---------------- 素材中心 ---------------- */
.mat-grid { display:flex; gap:10px; overflow-x:auto; padding:4px 2px 10px; align-items:flex-start; }
.mat-card { position:relative; flex:0 0 auto; width:104px; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--surface-2); transition:transform .15s, box-shadow .15s; }
.mat-card:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.10); }
.mat-card img { width:104px; height:78px; object-fit:cover; display:block; cursor:zoom-in; background:var(--surface-3,#f3f3f3); }
.mat-meta { padding:5px 6px; font-size:11px; display:flex; flex-direction:column; gap:2px; align-items:flex-start; }
.mat-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.mat-del { position:absolute; top:4px; right:4px; width:20px; height:20px; border:0; border-radius:50%; background:rgba(0,0,0,.55); color:#fff; font-size:13px; line-height:1; cursor:pointer; opacity:0; transition:opacity .15s; }
.mat-card:hover .mat-del { opacity:1; }
.mat-badge { position:absolute; top:4px; left:4px; padding:1px 6px; border-radius:999px; background:rgba(0,0,0,.55); color:#fff; font-size:10px; }
/* 悬停大图浮层 */
.mat-hover { position:fixed; z-index:9999; pointer-events:none; border-radius:10px; overflow:hidden; box-shadow:0 10px 32px rgba(0,0,0,.28); background:#000; }
.mat-hover img { display:block; width:280px; max-width:280px; max-height:260px; object-fit:contain; }
@media (max-width:560px) {
  .mat-del { opacity:1; }
}
