/* SaaS 商家工作台样式
   字体合规：仅使用系统通用族，不引用任何需授权或来源不明的字库，不携带字库文件。 */

:root {
  --bg: #fbf8f5;
  --surface: #ffffff;
  --ink: #3d3431;
  --muted: #8d807b;
  --line: #eee4de;
  --peach: #f3a895;
  --peach-soft: #fdeee9;
  --mint: #74c4a6;
  --mint-soft: #eaf6f0;
  --danger: #c9757f;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(96, 71, 60, .07);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 40px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; border-bottom: 1px solid var(--line); margin-bottom: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 10px; background: var(--peach-soft); color: var(--peach); font-size: 16px;
}
.brand small { color: var(--muted); font-weight: 500; font-size: 12px; border-left: 1px solid var(--line); padding-left: 10px; }
.top-right { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }

/* 注意：#guestView 现为营销首页，整段必须保持普通文档流。
   旧版这里曾有 .guest { display:grid; grid-template-columns:1.1fr .9fr }，
   会把 Hero / 数据卡 / 各 section 塞进两栏，导致排版错乱，禁止恢复。 */
.hero h1 { font-size: 34px; line-height: 1.35; margin: 12px 0 14px; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; color: var(--peach); }
.hero p { color: var(--muted); font-size: 15px; max-width: 460px; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.hero-tags span { background: var(--mint-soft); color: #4e9279; padding: 6px 12px; border-radius: 999px; font-size: 12px; }

.auth-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.tabs { display: flex; gap: 6px; background: var(--bg); padding: 4px; border-radius: 12px; margin-bottom: 18px; }
.tab { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; cursor: pointer; color: var(--muted); font: inherit; }
.tab.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 6px rgba(96,71,60,.08); }
.form { display: grid; gap: 13px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; width: 100%;
}
input:focus, select:focus { border-color: var(--peach); box-shadow: 0 0 0 3px var(--peach-soft); }
.captcha-row { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
/* flex 子项默认 min-width:auto（input  intrinsic 约 180px），会把验证码行撑宽，
   进而把整个弹层顶出手机屏幕、把右上角关闭叉号挤出可视区。必须允许收缩。 */
.captcha-row > input { flex: 1 1 auto; min-width: 0; width: auto; }
/* 验证码按钮放在图片下方，不再悬浮盖住算式；图片与按钮是两行独立区域 */
.captcha-box { position: relative; display: flex; flex-direction: column; gap: 5px; width: 150px; flex: none; }
.captcha-img { display: block; width: 100%; height: 45px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--bg); }
/* 明确可点的状态按钮：获取中 / 换一张 / 重试获取，避免「点了没反应」 */
.captcha-action {
  position: static; width: 100%; min-height: 22px; font: inherit; font-size: 11px;
  line-height: 1.4; font-weight: 600; border: 1px solid #f1d8cf; border-radius: 7px; padding: 2px 8px;
  background: #fff8f4; color: var(--danger); cursor: pointer;
}
.captcha-action:hover { background: #fff1ea; }
.captcha-action:disabled { cursor: default; }
.captcha-box[data-state="idle"] .captcha-action,
.captcha-box[data-state="loading"] .captcha-action,
.captcha-box[data-state="error"] .captcha-action {
  border-color: #f1d8cf; font-size: 11px; border-radius: 7px;
  padding: 2px 8px; box-shadow: none; background: #fff8f4;
}
.captcha-box[data-state="loading"] .captcha-action { color: var(--muted); background: #f7f5f3; }
.captcha-box[data-state="error"] .captcha-img { border: 1px solid var(--danger); }
.captcha-box[data-state="error"] .captcha-action { color: #b4453c; background: #fff5f1; }
.captcha-hint { font-size: 12px; line-height: 1.5; color: #b4453c; margin: 6px 0 0; }
.captcha-hint[hidden] { display: none; }
.boot-hint { font-size: 12px; line-height: 1.6; color: #9a6b3f; background: #fdf3e6;
  border: 1px solid #f0dcc0; border-radius: 10px; padding: 9px 12px; margin: 0 0 14px; }
.boot-hint[hidden] { display: none; }
.btn { font: inherit; border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--ink); color: #fff; font-weight: 600; }
.btn.primary:hover { opacity: .88; }
.btn.ghost { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 6px 11px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.auth-switch a { color: var(--danger); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.msg { min-height: 20px; font-size: 13px; margin: 12px 0 0; color: var(--danger); }
.msg.ok { color: #4e9279; }
.plan-strip { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }

.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card .label { color: var(--muted); font-size: 12px; }
.card strong { display: block; font-size: 25px; margin: 4px 0; }
.card .sub { color: var(--muted); font-size: 12px; }
.bar { height: 7px; border-radius: 99px; background: var(--bg); overflow: hidden; margin: 8px 0; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--peach)); }

.wtabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.wt { font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.wt.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.panel-head h2 { font-size: 16px; margin: 0; }
.panel-head span { color: var(--muted); font-size: 12px; }
.panel-head + .panel-head { margin-top: 26px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: var(--bg); display: grid; gap: 7px; }
.tile .ico { font-size: 20px; }
.tile h3 { margin: 0; font-size: 14px; }
.tile .tag { color: var(--muted); font-size: 11px; }
.tile p { margin: 0; color: var(--muted); font-size: 12px; max-height: 54px; overflow: hidden; }
.tile .price { font-size: 18px; font-weight: 700; color: var(--ink); }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.inline-form input { flex: 1 1 150px; width: auto; }
.inline-form select { flex: 1 1 180px; width: auto; }
.inline-form input[type=number] { flex: 0 0 90px; }

.table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.row:last-child { border-bottom: 0; }
.row.head { background: var(--bg); color: var(--muted); font-size: 12px; }
.row .mono { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); word-break: break-all; }
.row .nowrap { white-space: nowrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; background: var(--mint-soft); color: #4e9279; }
.pill.warn { background: var(--peach-soft); color: #b56b58; }
.empty { padding: 22px; text-align: center; color: var(--muted); }

/* ---------- 左侧卖点展示：把留白变成可读的产品价值区 ---------- */
.showcase { margin-top: 26px; display: grid; gap: 13px; }
.showcase-art {
  position: relative; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, #fffdfb 0%, #fdf3ee 52%, #eef7f2 100%);
  box-shadow: var(--shadow); padding: 14px 16px 4px;
}
.art-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; }
.art-head > span:first-child { font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: .2px; }
.art-badge { font-size: 11px; color: #4e9279; background: var(--mint-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.art-svg { display: block; width: 100%; height: auto; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.feature { display: flex; align-items: flex-start; gap: 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px;
  box-shadow: 0 2px 10px rgba(96, 71, 60, .04); }
.feature-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; flex: none; }
.feature-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.f-peach { background: var(--peach-soft); color: #c9756b; }
.f-mint  { background: var(--mint-soft);  color: #4e9279; }
.f-blue  { background: #eef1f9; color: #7a89b5; }
.f-cream { background: #fdf3e6; color: #c79a55; }
.feature strong { display: block; font-size: 13px; color: var(--ink); }
.feature small { display: block; font-size: 11.5px; line-height: 1.5; color: var(--muted); margin-top: 2px; }
.steps { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; }
.steps-label { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.steps-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink); }
.steps-flow span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.steps-flow i { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%;
  background: var(--peach-soft); color: #c9756b; font-style: normal; font-size: 11px; font-weight: 700; }
.steps-flow b { color: #d8cfc9; font-weight: 400; }
.showcase-note { margin: 0; font-size: 11.5px; color: var(--muted); text-align: center; letter-spacing: .2px; }

.foot { color: var(--muted); font-size: 12px; text-align: center; margin-top: 30px; }

@media (max-width: 860px) {
  .hero h1 { font-size: 27px; }
  .showcase { margin-top: 20px; }
  .grid, .plan-strip, .summary { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 1fr auto; }
  .row > *:nth-child(3), .row > *:nth-child(4) { grid-column: 2; }
}
@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
  .art-head { flex-wrap: wrap; }
}

/* ============================================================
   已登录商家工作台：与主系统后台一致的左侧导航 + 主内容区
   登录 / 注册页样式保持原样，本段只在 body[data-view=work] 生效。
   ============================================================ */
:root {
  --red: #ef4b73;
  --red-deep: #d02c58;
  --red-soft: #fff0f4;
  --surface2: #fdf7f8;
  --surface3: #f6ecef;
  --text: #33262b;
}
body[data-view="work"] { background: #fffafb; }
body[data-view="work"] .wrap { max-width: none; margin: 0; padding: 0; }
body[data-view="work"] .topbar,
body[data-view="work"] .foot { display: none; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 214px; flex: 0 0 214px; background: #fff;
  border-right: 1px solid #f7ebef; display: flex; flex-direction: column;
  padding: 20px 12px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 9px; font-size: 15.5px; font-weight: 780;
  color: #35272d; text-decoration: none; padding: 2px 8px 4px; }
.side-brand .brand-mark { width: 31px; height: 31px; border-radius: 10px;
  background: linear-gradient(135deg, #ff7d96, #ef4b73); color: #fff; font-size: 16px;
  box-shadow: 0 3px 9px rgba(239, 75, 115, .2); }
.side-label { font-size: 11px; color: #b9adb1; padding: 18px 12px 7px; letter-spacing: .5px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav .wt { display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 11px; border: 0; border-radius: 9px; background: transparent;
  font: inherit; font-size: 13px; font-weight: 600; color: #70646a;
  text-align: left; cursor: pointer; transition: .16s; }
.side-nav .wt span { width: 19px; text-align: center; font-size: 14px; }
.side-nav .wt:hover { background: #fff5f7; color: #d02c58; }
.side-nav .wt.active { background: #fff0f4; color: #e23462; font-weight: 750; }
.side-bottom { margin-top: auto; padding-top: 12px; }
.side-plan { background: #fff6f8; border: 1px solid #f9e6ec; border-radius: 12px;
  padding: 11px 12px; display: grid; gap: 3px; }
.side-plan-label { font-size: 10.5px; color: #b09fa5; }
.side-plan strong { font-size: 14px; color: #35272d; }
.side-plan-sub { font-size: 10.5px; color: #9a8c92; }
.side-quota { font-size: 11px; color: #70646a; margin-top: 4px; }
.side-quota b { color: #e23462; font-size: 13px; }
.side-link { display: block; width: 100%; margin-top: 7px; padding: 7px 11px;
  border: 0; border-radius: 9px; background: transparent; color: #93858b;
  font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.side-link:hover { background: #fff0f4; color: #e23462; }
.side-link.member-link { color: #d9507c; font-weight: 650; }
.side-foot-row { display: flex; align-items: center; gap: 4px; }
.side-foot-row .side-link { flex: 1; min-width: 0; }
.side-foot-row .icon-btn { flex: none; margin-top: 7px; }

.main-area { flex: 1; min-width: 0; padding: 24px 28px 60px; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.main-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.3px; margin: 0; color: #35272d; }
.main-head p { color: #ab9da2; font-size: 12.5px; margin: 3px 0 0; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.head-actions #topRightMain { display: flex; align-items: center; gap: 8px; }
.btn.head-new { border: 0; border-radius: 999px; padding: 9px 18px; font-size: 12.5px;
  font-weight: 650; background: linear-gradient(100deg, #ff6b86, var(--red)); color: #fff;
  box-shadow: 0 4px 12px rgba(239, 75, 115, .2); }
.btn.head-new:hover { opacity: .92; transform: translateY(-1px); }
.btn.icon-btn { width: 30px; height: 30px; padding: 0; border-radius: 9px; border: 1px solid #f4e6ea;
  background: #fff; color: #a4959b; font-size: 15px; line-height: 1; cursor: pointer; }
.btn.icon-btn:hover { color: #e23462; border-color: #f7cfda; background: #fff6f8; }
.view-host { animation: fadein .22s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 18px 16px; box-shadow: 0 4px 16px rgba(96, 71, 60, .05); overflow: hidden; }
.kpi-card::after { content: ''; position: absolute; right: -18px; top: -18px; width: 74px; height: 74px;
  border-radius: 50%; background: var(--red-soft); opacity: .7; }
.kpi-icon { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 11px; font-size: 17px; }
.k-peach { background: var(--peach-soft); } .k-mint { background: var(--mint-soft); }
.k-blue { background: #eef1f9; } .k-cream { background: #fdf3e6; }
.kpi-value { position: relative; z-index: 1; font-size: 30px; font-weight: 850; line-height: 1.25; margin-top: 12px; }
.kpi-label { font-size: 13px; font-weight: 650; margin-top: 2px; }
.kpi-hint { font-size: 11.5px; color: #a89ba0; margin-top: 3px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
body[data-view="work"] .panel { background: #fff; border: 1px solid #f7ebef; border-radius: 16px;
  padding: 18px 20px; box-shadow: 0 3px 14px rgba(120, 80, 95, .04); margin-bottom: 16px; }
body[data-view="work"] .panel-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.panel-title { font-size: 15px; font-weight: 800; }
.spacer { flex: 1; }
.muted { color: #a89ba0; font-size: 12px; }
.btn-xs { font: inherit; font-size: 11.5px; padding: 4px 10px; border-radius: 8px; }
.btn-plain { border: 1px solid var(--line); background: #fff; color: var(--red-deep); cursor: pointer; }
.btn-plain:hover { background: var(--red-soft); }
.btn-block { width: 100%; } .btn-lg { padding: 12px 18px; font-size: 14.5px; }
/* 工作台主操作沿用主系统后台的粉红强调色，不复用登录页的深墨色 */
body[data-view="work"] .btn.primary {
  background: linear-gradient(100deg, #ff6b86, var(--red));
  color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(239, 75, 115, .18);
}
body[data-view="work"] .btn.primary:hover { opacity: .92; }
.hint-box { background: #fff8f3; border: 1px solid #f6e6d6; border-radius: 10px;
  padding: 9px 12px; font-size: 12px; line-height: 1.65; color: #8a6a52; margin-bottom: 9px; }
.hint-box b { color: #a35c33; }
body[data-view="work"] .panel .hint-box:last-child { margin-bottom: 0; }
.help { font-size: 12px; color: #a89ba0; margin: 12px 0 0; line-height: 1.6; }

.stat-line { display: flex; align-items: center; gap: 10px; font-size: 12.5px; margin-bottom: 10px; }
.stat-line .lab { width: 72px; flex: 0 0 72px; color: #8d807b; }
.stat-bar { flex: 1; height: 8px; border-radius: 8px; background: var(--surface3); overflow: hidden; }
.stat-bar i { display: block; height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, #ff8ca6, var(--red)); min-width: 0; }
.stat-line b { width: 30px; text-align: right; font-weight: 700; }
.timeline { display: grid; gap: 12px; }
.tl-item { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: #5c4f54; }
.tl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red);
  flex: none; margin-top: 6px; }
.tl-item > div { flex: 1; min-width: 0; word-break: break-all; }
.tl-item b { font-weight: 700; color: var(--text); }
.tl-time { color: #b3a6ab; font-size: 11px; white-space: nowrap; }
.tl-empty { color: #a89ba0; font-size: 12.5px; text-align: center; padding: 16px 0; }

.stack-form { display: grid; gap: 13px; }
.stack-form label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 650; color: #6d6267; }
.stack-form label em { color: var(--red); font-style: normal; }
.stack-form small { font-weight: 400; font-size: 11px; color: #a89ba0; }
.stack-form textarea { font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none;
  width: 100%; resize: vertical; }
.stack-form textarea:focus { border-color: var(--peach); box-shadow: 0 0 0 3px var(--peach-soft); }
.segmented { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.segmented button { font: inherit; font-size: 12px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: #8d807b; cursor: pointer; }
.segmented button.active { background: var(--red-soft); border-color: #f8cfdb; color: var(--red-deep); font-weight: 700; }
.search-row { margin-bottom: 12px; }
.search-row input { max-width: 340px; }

/* 表格：按业务分别给列宽，避免完整网址被挤到看不见 */
body[data-view="work"] .table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
body[data-view="work"] .row.head { background: var(--surface2); }
#testsTable .row { grid-template-columns: 1.6fr 1fr .8fr auto; }
#linksTable .row { grid-template-columns: 2.1fr 1.1fr .8fr auto; }
#answersTable .row { grid-template-columns: 1fr 1.1fr .7fr 1.3fr 1fr; }
#ledgerTable .row { grid-template-columns: 1.2fr .6fr 1fr 1.2fr; }
#assetsTable .row { grid-template-columns: 1.5fr .8fr 1fr auto; }
/* 平台后台 · 商家管理：5 列平铺对齐（商家 / 套餐 / 状态 / 额度 / 操作） */
#tenantTable .row { grid-template-columns: 1.25fr .95fr .6fr 1.35fr auto; }
#tenantTable .quota-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
#tenantTable .quota-cell .q-edit { margin-top: 0; flex: none; }
#tenantTable .q-edit input { width: 84px; padding: 5px 8px; font-size: 12px; }
#tenantTable .row > div { min-width: 0; }
/* 商家工作台 · 充值记录与收银台 */
#ordersTable .row { grid-template-columns: 1.4fr 1.2fr .8fr 1fr 1.6fr; }
/* 平台管理员 · 全站掌控表格列宽 */
#adminOrdersTable .row { grid-template-columns: 1.1fr 1.5fr .7fr .9fr .7fr 1fr auto; }
#adminLedgerTable .row { grid-template-columns: 1.1fr 1fr .6fr .6fr 1.2fr 1fr; }
#adminAuditTable .row { grid-template-columns: 1fr .9fr 1.3fr 1.1fr 1.2fr; }
#adminCardsTable .row { grid-template-columns: 1.3fr 1fr .6fr .7fr 1.1fr 1fr auto; }
#afChannels .row { grid-template-columns: 1fr auto auto; }
#adminOrdersTable .row > div, #adminLedgerTable .row > div,
#adminAuditTable .row > div, #adminCardsTable .row > div { min-width: 0; }
/* 卡密生成结果：明文一次性展示区 */
.card-gen-result { margin-top: 14px; max-height: 320px; overflow-y: auto; }
.card-gen-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; color: #c23a68; margin-bottom: 8px; line-height: 1.6; }
.card-gen-head [data-copy-all] { flex: none; white-space: nowrap; }
.card-code-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 7px 10px; border: 1px dashed #f0c8d3; border-radius: 9px; margin-bottom: 6px;
  background: #fff9fb; font-size: 12.5px; }
.card-code-line .mono { font-weight: 700; letter-spacing: .5px; color: #7d3050; }
.card-code-line .muted { margin-left: auto; }
/* ---------- 套餐对比营销区（引导升级，单条越买越便宜） ---------- */
.compare-panel { border-color: #f6dce6 !important;
  background: linear-gradient(180deg, #fff9fb, #fff) !important; }
.cmp-lead { display: flex; align-items: flex-start; gap: 10px;
  background: linear-gradient(100deg, #fff1f5, #fff8f2); border: 1px solid #f7dfe8;
  border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; }
.cmp-lead-icon { font-size: 18px; line-height: 1.4; }
.cmp-lead-text { font-size: 12.5px; line-height: 1.75; color: #8a6a75; }
.cmp-lead-text b { color: #d9507c; font-weight: 800; }
.cmp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cmp-card { position: relative; border: 1px solid #f3e6ea; border-radius: 14px;
  padding: 16px 14px 14px; background: #fff; display: flex; flex-direction: column;
  gap: 8px; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.cmp-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(212, 83, 126, .10); }
.cmp-card.is-best { border: 1.5px solid #f2a9c0; background: linear-gradient(180deg, #fff6f9, #fff);
  box-shadow: 0 6px 20px rgba(229, 75, 120, .10); }
.cmp-ribbon { position: absolute; top: 0; right: 0; color: #fff; font-size: 10.5px; font-weight: 700;
  padding: 5px 10px; border-radius: 0 0 0 12px;
  background: linear-gradient(100deg, #ff6b86, #ef4b73); }
.cmp-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding-right: 66px; min-height: 22px; }
.cmp-badge { font-size: 10.5px; color: #d9507c; background: #fff0f5;
  border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.cmp-name { font-size: 14px; font-weight: 800; color: var(--ink); }
.cmp-price { font-size: 26px; font-weight: 850; color: #2f2830; letter-spacing: -.5px; line-height: 1.1; }
.cmp-price small { font-size: 14px; font-weight: 700; margin-right: 2px; }
.cmp-quota { font-size: 11.5px; color: #9b8d92; }
.cmp-quota b { color: #d9507c; font-size: 13px; }
.cmp-unit { display: flex; align-items: baseline; gap: 4px;
  background: #fff5f8; border-radius: 10px; padding: 8px 10px; }
.cmp-card.is-best .cmp-unit { background: #ffeef4; }
.cmp-unit-num { font-size: 19px; font-weight: 850; color: #e23462; }
.cmp-unit-suffix { font-size: 11px; color: #b07f90; }
.cmp-save { align-self: flex-start; font-size: 11px; font-weight: 700; color: #3f8b6b;
  background: #ecf7f1; border-radius: 999px; padding: 3px 9px; }
.cmp-save-base { color: #9b8d92; background: #f6f3f4; font-weight: 600; }
.cmp-desc { margin: 0; font-size: 11.5px; line-height: 1.6; color: #a2959a; min-height: 36px; }
.cmp-btn { margin-top: auto; }
.cmp-card.is-best .cmp-btn { color: #fff; font-weight: 700; border-color: transparent;
  background: linear-gradient(100deg, #ff6b86, #ef4b73); }
.cmp-topup { display: block; width: 100%; margin-top: 7px; padding: 5px 8px; border: 0;
  background: transparent; color: #b58a99; font: inherit; font-size: 11px; cursor: pointer;
  border-radius: 8px; transition: .15s; }
.cmp-topup:hover { background: #fff2f6; color: #d9507c; }
.cmp-foot { margin-top: 12px; font-size: 11.5px; line-height: 1.7; color: #9b8d92;
  background: #fffdfd; border-radius: 10px; padding: 9px 12px; }
.cmp-foot b { color: #d9507c; }
@media (max-width: 1280px) { .cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .cmp-grid { grid-template-columns: 1fr; } }

.empty-state { grid-column: 1 / -1; display: grid; justify-items: center; gap: 4px; padding: 28px 12px; text-align: center; }
.empty-state .empty-emoji { font-size: 26px; opacity: .75; }
.empty-state .empty-title { font-size: 13px; font-weight: 700; color: #7d7076; }
.empty-state .empty-desc { font-size: 11.5px; color: #b0a3a8; line-height: 1.6; max-width: 360px; }
.pay-channel-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.pay-channel-list .btn.block { width: 100%; }
.link-url { display: block; font-family: ui-monospace, monospace; font-size: 11px;
  color: var(--red-deep); word-break: break-all; text-decoration: none; margin-top: 2px; }
.link-url:hover { text-decoration: underline; }
.row-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 650; }
.chip-unused { background: #fdf3e6; color: #b07f3c; }
.chip-bound { background: #eef1f9; color: #6a7db5; }
.chip-completed { background: var(--mint-soft); color: #3f8b6b; }
.chip-expired { background: #f2efee; color: #8d807b; }
.chip-revoked { background: var(--peach-soft); color: #b45c56; }
.issued-list { display: grid; gap: 8px; }
.issued-item { display: grid; grid-template-columns: 116px 1fr auto; gap: 10px; align-items: center;
  background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.issued-item .who { font-size: 12.5px; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issued-item .u { font-family: ui-monospace, monospace; font-size: 11px; color: var(--red-deep);
  word-break: break-all; }
.kv { display: grid; gap: 9px; font-size: 12.5px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: #a89ba0; flex: none; }
.kv b { font-weight: 650; color: var(--text); text-align: right; word-break: break-all; }
.mono { font-family: ui-monospace, monospace; }
.flash { font-size: 12px; font-weight: 650; }

@media (max-width: 1000px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  body[data-view="work"] .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; padding: 12px;
    border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .side-nav .wt { width: auto; white-space: nowrap; padding: 7px 11px; font-size: 12px; }
  .side-bottom { display: none; }
  .main-area { padding: 18px 14px 40px; }
  .main-head h1 { font-size: 21px; }
  .head-new { padding: 7px 12px; font-size: 11.5px; }
  .project-card { grid-template-columns: 38px 1fr; gap: 11px; }
  .pc-actions { grid-column: 1 / -1; justify-content: flex-start; padding-left: 49px; }
  .issued-item { grid-template-columns: 1fr auto; }
  .issued-item .u { grid-column: 1 / -1; }
  #answersTable .row { grid-template-columns: 1fr auto; }
  #answersTable .row > *:nth-child(n+3) { grid-column: 2; }
}

/* ============================================================
   第四阶段：营销首页 / 认证弹层 / 平台管理后台
   字体合规：仅系统通用族，无任何字库文件。
   ============================================================ */

/* ---------- 营销首页 ---------- */
.site { max-width: 1180px; margin: 0 auto; }
.lp-topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; }
.lp-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.lp-nav { display: flex; align-items: center; gap: 18px; }
.lp-nav a { color: var(--muted); font-size: 13px; text-decoration: none; }
.lp-nav a:hover { color: var(--ink); }
.lp-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center; padding: 50px 24px 40px; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--mint-soft); color: #4e9279; border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 700; }
.lp-dot { width: 6px; height: 6px; border-radius: 50%; background: #4e9279; }
.lp-hero h1 { font-size: 54px; line-height: 1.18; letter-spacing: -1.5px; margin: 22px 0 18px; color: #2f2a28; }
.lp-hero h1 .hl { color: #e8607f; position: relative; }
.lp-lead { color: var(--muted); font-size: 15px; line-height: 1.9; max-width: 470px; }
.lp-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 30px; }
.btn.lg { padding: 13px 24px; font-size: 15px; border-radius: 12px; }
/* 营销页主按钮用青绿，与示例版一致；工作台 / 管理后台的 .btn.primary 不受影响 */
.lp-hero-actions .btn.primary { background: #329270; }
.lp-hero-actions .btn.primary:hover { background: #2b7f61; }
.lp-nav .btn.primary { background: #e8607f; }
.btn.merchant { background: #e8607f; color: #fff; font-weight: 600; }
.btn.merchant:hover { opacity: .9; }
.btn.block { width: 100%; }
.lp-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.lp-meta b { color: var(--ink); font-size: 15px; }
.lp-meta i { width: 1px; height: 14px; background: var(--line); }
.lp-hero-visual { position: relative; min-height: 400px; }
.lp-hero-visual::before {
  content: ""; position: absolute; inset: 6% 0 6% 6%; z-index: 0;
  background: radial-gradient(circle at 58% 46%, #ffe6ea 0, #fff5f3 45%, transparent 72%);
  border-radius: 50%; filter: blur(6px);
}
.lp-hero-visual > * { position: relative; z-index: 1; }
.float-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.float-card.card-main { width: 372px; max-width: 94%; padding: 26px; margin: 46px 8px 0 auto; transform: rotate(-3deg); }
.fc-head { display: flex; align-items: center; justify-content: space-between; }
.fc-tag { background: #fdeef1; color: #d4537e; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.float-card.card-main h3 { font-size: 20px; margin: 18px 0 6px; color: var(--ink); }
.float-card.card-main p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.fc-progress { height: 7px; background: #f3eef0; border-radius: 999px; overflow: hidden; }
.fc-progress span { display: block; width: 66%; height: 100%; background: linear-gradient(90deg, #f3a895, #e8607f); }
.fc-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 11px; color: var(--muted); }
.float-card.mini { position: absolute; padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--ink); }
/* 与参考版一致：独立 Token 在主卡左下，转发即跳转在右上 */
.float-card.mini-1 { bottom: 30px; left: -12px; transform: rotate(-4deg); }
.float-card.mini-2 { top: 6px; right: -8px; transform: rotate(4deg); }
.lp-stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 30px 24px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.lp-stat-band > div { text-align: center; }
.lp-stat-band b { display: block; font-size: 26px; color: #e8607f; }
.lp-stat-band span { font-size: 12px; color: var(--muted); }
.lp-section { padding: 46px 24px; }
.lp-sec-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.lp-kicker { color: #d4537e; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; }
.lp-sec-head h2 { font-size: 28px; margin: 12px 0; color: var(--ink); letter-spacing: -.5px; }
.lp-sec-head p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.lp-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lp-feature-grid article { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.lp-feature-grid .fi { font-size: 24px; }
.lp-feature-grid h3 { font-size: 14px; margin: 12px 0 8px; color: var(--ink); }
.lp-feature-grid p { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 0; }
.lp-tpl { background: #fff8f5; border-radius: 22px; margin: 0 16px; }
.lp-tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lp-tpl-grid .tpl-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.lp-tpl-grid .tpl-card .em { font-size: 22px; }
.lp-tpl-grid .tpl-card h4 { font-size: 13px; margin: 10px 0 4px; color: var(--ink); }
.lp-tpl-grid .tpl-card p { font-size: 11.5px; color: var(--muted); margin: 0; line-height: 1.6; }
.lp-projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.lp-projects-copy h2 { font-size: 28px; margin: 12px 0; color: var(--ink); }
.lp-projects-copy p { color: var(--muted); line-height: 1.8; }
.lp-check { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; }
.lp-check li { font-size: 13px; color: var(--muted); padding-left: 20px; position: relative; }
.lp-check li::before { content: "✓"; position: absolute; left: 0; color: #4e9279; font-weight: 700; }
.lp-check b { color: var(--ink); }
.lp-mock { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.mock-head { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--ink); }
.mock-add { font-size: 12px; color: #d4537e; }
.mock-row { padding: 11px 18px; border-bottom: 1px solid #faf3ef; font-size: 13px; color: var(--ink); }
.mock-row em { float: right; font-size: 11px; color: var(--muted); font-style: normal; }
.mock-more { padding: 12px 18px; color: var(--muted); font-size: 12px; }
.lp-rule-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lp-rule-grid article { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.lp-rule-grid .rn { color: #f3c7cc; font-size: 22px; font-weight: 800; }
.lp-rule-grid .ri { font-size: 22px; margin: 6px 0; }
.lp-rule-grid h3 { font-size: 14px; margin: 8px 0; color: var(--ink); }
.lp-rule-grid p { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 0; }
.lp-join { text-align: center; margin: 40px 16px; padding: 54px 24px; background: linear-gradient(180deg, #fff2f3, #fff8f5); border: 1px solid #f7dfe2; border-radius: 24px; }
.lp-join h2 { font-size: 30px; margin: 14px 0; color: var(--ink); }
.lp-join > p { color: var(--muted); margin-bottom: 24px; }
.lp-join-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; text-align: left; }
.lp-join-steps > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.lp-join-steps b { display: block; color: #d4537e; font-size: 13px; margin-bottom: 8px; }
.lp-join-steps span { font-size: 12px; color: var(--muted); line-height: 1.7; }
.lp-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 30px 24px 40px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

/* ---------- 认证弹层 ---------- */
/* minmax(0,1fr) 强制网格列不超过容器宽度，避免子项 min-content 把轨道撑破 */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px; }
.modal-mask { position: absolute; inset: 0; background: rgba(40, 30, 26, .45); }
.modal-card { position: relative; width: min(420px, 100%); max-width: 100%; max-height: 92vh; overflow-y: auto; overflow-x: hidden; background: #fff; border-radius: 20px; padding: 34px 26px 22px; box-shadow: 0 20px 60px rgba(60, 40, 34, .25); }
.modal-x { position: absolute; top: 6px; right: 12px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); background: #faf7f5; border-radius: 999px; font-size: 18px; color: var(--muted); cursor: pointer; line-height: 1; z-index: 3; }
.modal-x:hover { color: var(--ink); background: #f4efeb; }
.modal-title { font-size: 18px; margin: 0 0 8px; color: var(--ink); }
.modal-card .tabs { margin-bottom: 14px; }
.modal-card .form { gap: 11px; }
.modal-card .hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.modal-card .captcha-box { width: 150px; }
.auth-switch { text-align: center; font-size: 12px; color: var(--muted); }
.auth-switch a { color: #d4537e; }
.msg { min-height: 18px; font-size: 12.5px; color: #c0395f; margin: 10px 0 0; }

/* 手机端弹层：留足两侧边距，验证码区收窄，保证关闭叉号始终可见可点 */
@media (max-width: 520px) {
  .modal { padding: 12px; }
  .modal-card { width: 100%; padding: 30px 16px 18px; border-radius: 16px; }
  .modal-x { top: 6px; right: 8px; }
  .modal-card .captcha-box { width: 108px; }
  .captcha-row { gap: 6px; }
  .captcha-img { height: 38px; }
}
.msg.ok { color: #4e9279; }

/* ---------- 平台管理后台（沿用工作台骨架，主色调玫瑰红） ---------- */
body[data-view="admin"] .btn.primary { background: #e8607f; color: #fff; }
body[data-view="admin"] .btn.primary:hover { opacity: .92; }
body[data-view="admin"] .wt.active { background: #e8607f; border-color: #e8607f; color: #fff; }
body[data-view="admin"] .panel-title { color: var(--ink); }
#tenantTable .row { display: grid; grid-template-columns: 1.1fr 1fr .8fr .7fr auto; gap: 12px; align-items: center; }
#tenantTable .row.head { font-weight: 700; color: var(--muted); font-size: 12px; }
#tenantTable .row > div { min-width: 0; }
#tenantTable .mono { font-size: 11px; color: var(--muted); word-break: break-all; }
.q-edit { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.q-edit input { width: 110px; padding: 5px 8px; font-size: 12px; }
.setting-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.setting-row label { font-weight: 600; color: var(--ink); }
.setting-row input { padding: 8px 10px; }
#planManageTable .row { grid-template-columns: 1.4fr 1fr 1fr auto; }
#planManageTable .row.head { color: var(--muted); font-size: 12px; font-weight: 700; }
#planManageTable .plan-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#planManageTable label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
#planManageTable input { width: 100%; max-width: 220px; box-sizing: border-box;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 13px; color: var(--ink); background: #fff; }
#planManageTable .plan-msg { font-size: 11.5px; color: #3f8b6b; min-height: 18px; }
body[data-view="admin"] #planManageTable input { padding: 10px 12px; }
@media (max-width: 760px) { #planManageTable .row { grid-template-columns: 1fr; } }

/* ---------- 测评项目卡片（浅粉提示条 + 彩色标签 + 胶囊操作） ---------- */
.notice-strip { position: relative; background: #fff5f7; border: 1px solid #fbe1e8; color: #a9556e;
  border-radius: 10px; padding: 10px 14px 10px 34px; margin-bottom: 16px; font-size: 12px; line-height: 1.7; }
.notice-strip::before { content: '⚠'; position: absolute; left: 13px; top: 10px; color: #ef4b73; font-weight: 800; }
.notice-strip b { color: #d02c58; }
.project-list { display: grid; gap: 12px; }
.project-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center;
  padding: 13px 18px; background: #fff; border: 1px solid #f8e9ee; border-radius: 15px;
  box-shadow: 0 2px 10px rgba(120, 80, 95, .035); transition: border-color .16s, box-shadow .16s, transform .16s; }
.project-card:hover { border-color: #f5cfda; box-shadow: 0 5px 18px rgba(239, 75, 115, .08); transform: translateY(-1px); }
.pc-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(135deg, #fff0f4, #f1f8f4); font-size: 21px; }
.pc-main { min-width: 0; }
.pc-main strong { display: block; color: #35272d; font-size: 13.5px; font-weight: 750; margin-bottom: 3px; }
.pc-main p { margin: 0 0 7px; color: #a89aa0; font-size: 11.5px; line-height: 1.55; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-card .chip { background: #f7f5f6; color: #877a80; font-weight: 600; }
.chip-tone-pink { background: #fff0f5 !important; color: #d9507c !important; }
.chip-tone-blue { background: #eef4fd !important; color: #5b87c4 !important; }
.chip-tone-green { background: #ecf7f1 !important; color: #4b9a76 !important; }
.chip-tone-amber { background: #fff5e6 !important; color: #b78032 !important; }
.pc-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.pc-actions .btn { border: 1px solid #f0e5e9; background: #fff; color: #80737a;
  border-radius: 999px; padding: 5px 12px; font-size: 11.5px; line-height: 1.5; font-weight: 600; }
.pc-actions .btn:hover { border-color: #f7cfda; color: #e23462; background: #fff7f9; }
.pc-actions .act-del { background: #fff0f4; border-color: #fbdde6; color: #d9507c; }
.pc-actions .act-del:hover { background: #ffe4ec; color: #c42455; }
#tab-tests #testForm { display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: #fff; border: 1px solid #f8e9ee; border-radius: 13px; padding: 12px 14px; margin-bottom: 14px; }
#tab-tests #testForm input { max-width: 280px; flex: 1 1 200px; width: auto; }
#tab-tests #testForm select { max-width: 220px; flex: 1 1 180px; width: auto; }

@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; padding-top: 30px; }
  .lp-hero h1 { font-size: 40px; }
  .lp-stat-band, .lp-feature-grid, .lp-tpl-grid, .lp-rule-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-projects-grid { grid-template-columns: 1fr; gap: 24px; }
  .lp-nav a { display: none; }
  .lp-join-steps { grid-template-columns: 1fr; }
  #tenantTable .row { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   宽屏统一布局（2026-11-20）
   目标：工作台 / 平台后台的所有页面共用同一套「流体主内容区」——
     1) 去掉营销页 .site 的 1180px 居中限制，内容区随窗口铺满；
     2) 统一留白、栅格间距、卡片内边距，视觉更舒展；
     3) 只在超宽屏给一个很大的上限，避免 2K/4K 下行过长；
     4) 1366 / 1440 / 1920 等常见桌面分辨率下全部用 fr / minmax 栅格，
        并对网格子项加 min-width:0，杜绝长网址把列撑破导致溢出或错位。
   仅作用于 body[data-view=work|admin]，登录页 / 营销首页保持原样。
   ============================================================ */
body[data-view="work"] .site,
body[data-view="admin"] .site { max-width: none; width: 100%; margin: 0; }

body[data-view="work"] .app-shell,
body[data-view="admin"] .app-shell { width: 100%; }

body[data-view="work"] .sidebar,
body[data-view="admin"] .sidebar {
  width: 232px; flex: 0 0 232px; padding: 24px 16px 18px;
}
body[data-view="work"] .side-nav .wt,
body[data-view="admin"] .side-nav .wt { padding: 10px 12px; gap: 10px; }

body[data-view="work"] .main-area,
body[data-view="admin"] .main-area { padding: 30px 40px 76px; }
body[data-view="work"] .view-host,
body[data-view="admin"] .view-host { width: 100%; max-width: 1720px; min-width: 0; margin: 0 auto; }

body[data-view="work"] .main-head,
body[data-view="admin"] .main-head { margin-bottom: 26px; gap: 20px; }
body[data-view="work"] .main-head h1,
body[data-view="admin"] .main-head h1 { font-size: 24px; }
body[data-view="work"] .main-head p,
body[data-view="admin"] .main-head p { font-size: 13px; margin-top: 5px; }

/* 统一栅格：更大的列间距 + 更舒展的卡片内边距 */
body[data-view="work"] .kpi-grid,
body[data-view="admin"] .kpi-grid { gap: 20px; margin-bottom: 24px; }
body[data-view="work"] .kpi-card,
body[data-view="admin"] .kpi-card { padding: 22px 24px 20px; border-radius: 20px; }
body[data-view="work"] .kpi-value,
body[data-view="admin"] .kpi-value { font-size: 32px; margin-top: 14px; }
body[data-view="work"] .grid-2,
body[data-view="admin"] .grid-2 { gap: 24px; }
body[data-view="work"] .grid,
body[data-view="admin"] .grid { grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 16px; }
body[data-view="work"] .tile,
body[data-view="admin"] .tile { padding: 18px; gap: 9px; border-radius: 14px; }

body[data-view="work"] .panel,
body[data-view="admin"] .panel { padding: 24px 28px; margin-bottom: 22px; border-radius: 18px; }
body[data-view="work"] .panel-head,
body[data-view="admin"] .panel-head { margin: 0 0 18px; gap: 14px; }
body[data-view="work"] .panel-title,
body[data-view="admin"] .panel-title { font-size: 15.5px; }
body[data-view="work"] .panel,
body[data-view="admin"] .panel,
body[data-view="work"] .kpi-grid,
body[data-view="admin"] .kpi-grid,
body[data-view="work"] .grid-2,
body[data-view="admin"] .grid-2 { min-width: 0; }

body[data-view="work"] .table,
body[data-view="admin"] .table { border-radius: 14px; }
body[data-view="work"] .row,
body[data-view="admin"] .row { padding: 13px 18px; gap: 14px; }
body[data-view="work"] .row > *,
body[data-view="admin"] .row > * { min-width: 0; }
body[data-view="work"] .notice-strip,
body[data-view="admin"] .notice-strip { padding: 12px 16px 12px 38px; margin-bottom: 20px; border-radius: 12px; }
body[data-view="work"] .project-list,
body[data-view="admin"] .project-list { gap: 14px; }
body[data-view="work"] .project-card,
body[data-view="admin"] .project-card { padding: 16px 22px; gap: 18px; border-radius: 16px; }
body[data-view="work"] .stack-form,
body[data-view="admin"] .stack-form { gap: 16px; }
body[data-view="work"] .stack-form label,
body[data-view="admin"] .stack-form label { font-size: 13px; }
body[data-view="work"] input,
body[data-view="admin"] input,
body[data-view="work"] select,
body[data-view="admin"] select { padding: 11px 14px; }
body[data-view="work"] .stack-form textarea,
body[data-view="admin"] .stack-form textarea { padding: 11px 14px; }
body[data-view="work"] .hint-box,
body[data-view="admin"] .hint-box { padding: 12px 15px; margin-bottom: 12px; font-size: 12.5px; border-radius: 12px; }
body[data-view="work"] .timeline,
body[data-view="admin"] .timeline { gap: 14px; }
body[data-view="work"] .kv,
body[data-view="admin"] .kv { gap: 11px; }
body[data-view="work"] .segmented,
body[data-view="admin"] .segmented { gap: 8px; margin-bottom: 16px; }
body[data-view="work"] .search-row input,
body[data-view="admin"] .search-row input { max-width: 420px; }
body[data-view="work"] .issued-item,
body[data-view="admin"] .issued-item { padding: 12px 16px; gap: 14px; }
body[data-view="work"] .pay-channel-list,
body[data-view="admin"] .pay-channel-list { gap: 10px; }
body[data-view="work"] .btn-lg,
body[data-view="admin"] .btn-lg { padding: 14px 20px; }
body[data-view="work"] #tenantTable .row,
body[data-view="admin"] #tenantTable .row { gap: 14px; }

/* 套餐对比：宽屏下三卡拉开间距，按钮与说明更从容 */
body[data-view="work"] .compare-panel { padding: 26px 30px; }
body[data-view="work"] .cmp-lead { padding: 14px 18px; margin-bottom: 20px; }
body[data-view="work"] .cmp-grid { gap: 20px; }
body[data-view="work"] .cmp-card { padding: 22px 20px 20px; gap: 10px; border-radius: 16px; }
body[data-view="work"] .cmp-price { font-size: 30px; }
body[data-view="work"] .cmp-desc { min-height: 40px; }
body[data-view="work"] .cmp-btn,
body[data-view="admin"] .cmp-btn { padding: 12px 18px; min-height: 42px; }
body[data-view="work"] .cmp-foot { padding: 12px 16px; margin-top: 16px; font-size: 12px; }

/* 平台后台设置行：标签列 + 自适应输入 + 操作按钮，宽屏下不挤压 */
body[data-view="admin"] .setting-row { grid-template-columns: 220px minmax(0, 1fr) auto; gap: 16px; padding: 14px 0; }
body[data-view="admin"] .setting-row-wide { grid-template-columns: 220px minmax(0, 1fr) auto; }
body[data-view="admin"] #adminOrdersTable .row > div,
body[data-view="admin"] #adminLedgerTable .row > div,
body[data-view="admin"] #adminAuditTable .row > div,
body[data-view="admin"] #adminCardsTable .row > div { min-width: 0; }

/* ---------- 易支付 · 支付配置表单 / 订单查询 / 风险提示 ---------- */
.pay-config-form { display: grid; gap: 18px; max-width: 900px; }
.pay-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.pay-config-grid label { display: grid; gap: 7px; font-size: 12.5px; font-weight: 650; color: #6d6267; }
.pay-config-grid label small { font-weight: 400; font-size: 11px; color: #a89ba0; line-height: 1.5; }
.pay-config-grid .span-2 { grid-column: 1 / -1; }
.pay-config-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pay-config-state { font-size: 12.5px; color: #8d807b; }
.pay-config-state b { color: #3f8b6b; }
.pay-query-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pay-query-row input { max-width: 360px; flex: 1 1 260px; }
.pay-query-result { margin-top: 12px; font-size: 12.5px; line-height: 1.8; color: #6d6267; }
.pay-query-result .mono { color: #d02c58; }
.risk-note { font-size: 11px; line-height: 1.7; color: #b0563f; margin: 8px 0 0; }
.risk-note b { font-weight: 700; }
.protocol-note { font-size: 11.5px; line-height: 1.75; color: #8d807b; margin: 6px 0 0; }
.checkout-risk { font-size: 11px; line-height: 1.6; color: #b0563f; margin: 8px 0 0; text-align: left; }
.checkout-tip { font-size: 12px; line-height: 1.6; color: #8a756d; margin: 8px 0 0; text-align: center; }
.pay-return-tip { padding: 12px 16px; margin-bottom: 14px; border-radius: 10px; font-size: 13px;
  line-height: 1.6; background: #f2f8f4; border: 1px solid #cfe6d8; color: #3f8b6b; }
.pay-return-tip.is-failed { background: #fdf2ee; border-color: #f0d2c8; color: #b0563f; }
.epay-jump { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--red-deep); word-break: break-all; }

/* 商家测评项目完整内容编辑器 */
.editor-head { margin: 0 0 12px; }
.project-panel .panel-body { padding-top: 0; }
.project-heading { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.project-heading .panel-title { color: var(--ink); }
.project-panel .notice-strip { margin-top: 4px; }
body[data-view="work"] .project-panel .panel-head { align-items: center; }
.editor-card { width: 860px; max-width: 100%; padding: 30px 28px 22px; }
.editor-form .editor-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px;
  border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.editor-form .editor-tabs button { border: 1px solid transparent; background: transparent; padding: 6px 12px;
  border-radius: 8px; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.editor-form .editor-tabs button.active { background: #fdeef2; color: #c0395f; border-color: #f3d3dd; font-weight: 700; }
.editor-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink); margin-bottom: 11px; }
.editor-form label em { color: #c0395f; font-style: normal; }
.editor-form label small { font-size: 11px; color: var(--muted); line-height: 1.5; }
.editor-form input, .editor-form select, .editor-form textarea { width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px;
  font-family: inherit; color: var(--ink); background: #fff; }
.editor-form textarea { resize: vertical; line-height: 1.55; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.editor-form .hint { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0 0 12px; }
.editor-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.editor-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fffdfc; }
.editor-item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
  font-size: 12px; font-weight: 700; color: #c0395f; }
.editor-item-head button { border: none; background: transparent; color: #a8707d; cursor: pointer; font-size: 12px; }
.editor-item .form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.editor-item .form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 10px; }
.editor-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px !important; }
.editor-check input { width: auto !important; }
.editor-options { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #faf7f5; }
.editor-option { display: grid; grid-template-columns: 1fr 76px 100px 26px; gap: 6px; align-items: center; margin-bottom: 6px; }
.editor-option input { font-size: 12px; padding: 6px 8px; }
.editor-option button { border: none; background: transparent; color: #a8707d; cursor: pointer; }
.editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
.editor-actions .msg { margin: 0 auto 0 0; }

/* 常见桌面分辨率：逐级收放内边距，保证不溢出、不错位 */
@media (min-width: 1600px) {
  body[data-view="work"] .sidebar,
  body[data-view="admin"] .sidebar { width: 244px; flex-basis: 244px; }
  body[data-view="work"] .main-area,
  body[data-view="admin"] .main-area { padding: 34px 56px 84px; }
}
@media (max-width: 1400px) {
  body[data-view="work"] .sidebar,
  body[data-view="admin"] .sidebar { width: 220px; flex-basis: 220px; }
  body[data-view="work"] .main-area,
  body[data-view="admin"] .main-area { padding: 26px 30px 64px; }
  body[data-view="work"] .panel,
  body[data-view="admin"] .panel { padding: 22px 24px; }
}
@media (max-width: 1180px) {
  body[data-view="work"] .cmp-grid,
  body[data-view="admin"] .cmp-grid { gap: 12px; }
  body[data-view="work"] .cmp-card,
  body[data-view="admin"] .cmp-card { padding: 18px 15px 16px; }
  .pay-config-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  body[data-view="work"] .grid-2,
  body[data-view="admin"] .grid-2 { gap: 18px; }
  body[data-view="work"] .panel,
  body[data-view="admin"] .panel { padding: 20px; }
}
/* 小屏仍沿用原工作台的「侧栏变横向」布局：这里用同等特异性把宽屏规则收回去 */
@media (max-width: 760px) {
  body[data-view="work"] .app-shell,
  body[data-view="admin"] .app-shell { flex-direction: column; }
  body[data-view="work"] .sidebar,
  body[data-view="admin"] .sidebar {
    width: 100%; flex: none; height: auto; position: static; padding: 12px;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  body[data-view="work"] .side-nav,
  body[data-view="admin"] .side-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  body[data-view="work"] .side-nav .wt,
  body[data-view="admin"] .side-nav .wt { width: auto; white-space: nowrap; padding: 7px 11px; font-size: 12px; }
  body[data-view="work"] .side-bottom,
  body[data-view="admin"] .side-bottom { display: none; }
  body[data-view="work"] .main-area,
  body[data-view="admin"] .main-area { padding: 18px 14px 40px; }
  body[data-view="work"] .main-head h1,
  body[data-view="admin"] .main-head h1 { font-size: 21px; }
}

/* ---------- 平台管理员独立入口（admin.php） ---------- */
.admin-login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px;
  background: radial-gradient(circle at 20% 15%, #fdeef1 0, transparent 40%), radial-gradient(circle at 85% 85%, #f0f6f2 0, transparent 40%), var(--bg); }
.admin-login-card { width: 420px; max-width: 100%; background: #fff; border: 1px solid var(--line);
  border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow); }
.admin-login-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; color: var(--ink); }
.admin-login-sub { color: var(--muted); font-size: 12.5px; margin: 8px 0 24px; }
.admin-login-card .captcha-box { width: 150px; }
.admin-back { text-align: center; margin: 16px 0 0; font-size: 12px; }
.admin-back a { color: var(--muted); text-decoration: none; }
.admin-back a:hover { color: #d4537e; }

/* ---------- 完整编辑器：模板快捷选择与结果页 CTA（商家 / 管理员共用） ---------- */
.editor-tpl-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.editor-tpl-chips .chip { appearance: none; cursor: pointer; background: #f7f5f6; color: #6d6066;
  border: 1px solid transparent; padding: 5px 10px; font-family: inherit; }
.editor-tpl-chips .chip:hover { border-color: #f0c3d2; color: #c0395f; }
.editor-tpl-chips .chip.active { background: #fdeef2; color: #c0395f; border-color: #f3d3dd; }
.cta-box { margin-top: 14px; padding: 14px 16px; border: 1px solid #f3d3dd; border-radius: 12px;
  background: #fff8fa; }
.cta-title { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: #b3476b; }
.cta-box .hint { margin-bottom: 12px; }
.cta-box label { margin-bottom: 4px; }

/* ---------- 联系我们 / 联系客服：后台配置，前台与会员工作台共用 ---------- */
.lp-contact { padding-top: 18px; }
.lp-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px;
  max-width: 1120px; margin: 0 auto; }
.lp-contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px; box-shadow: 0 3px 14px rgba(96, 71, 60, .05); }
.lp-contact-card .lp-contact-k { display: block; font-size: 11.5px; font-weight: 700; color: #c9756b;
  letter-spacing: .4px; margin-bottom: 7px; }
.lp-contact-card b { display: block; font-size: 15px; color: var(--ink); line-height: 1.55; word-break: break-all; }
.lp-contact-card a { color: #c0395f; text-decoration: none; }
.lp-contact-card a:hover { text-decoration: underline; }
.lp-contact-card .lp-contact-note { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 6px; }
.lp-contact-empty { grid-column: 1 / -1; text-align: center; padding: 26px 18px; border: 1px dashed var(--line);
  border-radius: 14px; color: var(--muted); font-size: 12.5px; }

.side-support { display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  background: #fdeef2; color: #b83a60; font-weight: 700; }
.side-support:hover { background: #fbe1e8; }
.side-support small { font-size: 10.5px; font-weight: 400; color: #a9556e; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; max-width: 118px; }

.support-alert { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 12px 16px; border: 1px solid #f3b9c8; border-radius: 12px;
  background: linear-gradient(90deg, #fff2f5, #fff9f3); font-size: 13px; color: #8b3c56; }
.support-alert-q { font-weight: 800; color: #b62c50; }
.support-alert-btn { cursor: pointer; border: 0; border-radius: 999px; padding: 6px 14px;
  background: #e23462; color: #fff; font: inherit; font-weight: 700; }
.support-alert-btn:hover { background: #c72a54; }
.support-alert-summary { color: var(--muted); font-size: 12px; }

/* 卡密兑换面板：表单在左、充值未到账入口在右。
   仅调整入口的位置（靠右对齐、取消原底部外边距），其文字/字体/字号/颜色/背景/按钮样式全部沿用 .support-alert 原定义。 */
.redeem-row { display: flex; align-items: center; gap: 20px; flex-wrap: nowrap; }
.redeem-row .inline-form { margin-bottom: 0; flex: 0 1 auto; min-width: 0; }
.redeem-row .support-alert { flex: 0 0 auto; margin: 0 0 0 auto; }

.support-card h3 { margin: 0 0 6px; font-size: 19px; color: var(--ink); }
.support-card-lead { margin: 0 0 16px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.support-body { display: grid; gap: 10px; }
.support-row { display: flex; align-items: baseline; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fffafb; }
.support-row span { flex: none; width: 72px; font-size: 12px; color: var(--muted); }
.support-row b { font-size: 13.5px; color: var(--ink); word-break: break-all; }
.support-row a { color: #c0395f; text-decoration: none; }
.support-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 12.5px;
  border: 1px dashed var(--line); border-radius: 10px; }

body[data-view="admin"] .support-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
body[data-view="admin"] .support-form label { display: flex; flex-direction: column; gap: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--ink); }
body[data-view="admin"] .support-form input,
body[data-view="admin"] .support-form textarea { width: 100%; padding: 9px 11px; font: inherit; }
body[data-view="admin"] .support-form small { font-size: 11px; color: var(--muted); font-weight: 400; }
body[data-view="admin"] .support-form .span-2 { grid-column: 1 / -1; }
.support-form-actions { display: flex; align-items: center; gap: 12px; }
@media (max-width: 720px) {
  body[data-view="admin"] .support-form { grid-template-columns: 1fr; }
  body[data-view="admin"] .support-form .span-2 { grid-column: auto; }
}
