/* =========================================================================
   LinkedIn 查询平台 —— 浅色现代主题
   设计要点：清晰的层次 / 克制的配色 / 关键数据突出 / 响应式
   ========================================================================= */
:root {
  --bg: #f4f6fb;
  --bg-soft: #eef2f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e4e9f2;
  --line-strong: #cfd8e6;
  --text: #0f1b2d;
  --text-2: #475467;
  --muted: #7b8798;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eaf1ff;
  --ok: #12925a;
  --ok-soft: #e4f7ed;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --danger: #d92d20;
  --danger-soft: #fdecea;
  --info: #1d4ed8;
  --info-soft: #e8effe;
  --money: #e0341f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --ring: 0 0 0 3px rgba(37, 99, 235, .18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(1200px 500px at 50% -220px, #e8efff 0%, var(--bg) 55%) no-repeat, var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: "JetBrains Mono", Consolas, Menlo, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.empty { text-align: center; color: #9aa5b4; padding: 28px 0 !important; background: var(--surface-2); }
.pos { color: var(--danger); font-weight: 600; }
.neg { color: var(--ok); font-weight: 600; }
.inline { display: inline; }
.money { color: var(--money); font-weight: 700; }
b.money { font-variant-numeric: tabular-nums; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: flex; align-items: center; gap: 26px; height: 60px;
  position: sticky; top: 0; z-index: 40;
}
.brand {
  font-weight: 800; font-size: 15.5px; white-space: nowrap; color: var(--text);
  display: flex; align-items: center; gap: 9px; letter-spacing: .2px;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; background: #0a66c2; color: #fff;
  font-weight: 800; font-size: 14px; letter-spacing: -.5px;
}
.topbar nav { display: flex; gap: 3px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: var(--radius-sm); color: var(--text-2);
  font-size: 13.5px; transition: background .15s, color .15s;
}
.topbar nav a i { font-style: normal; opacity: .75; font-size: 13px; }
.topbar nav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--text); }
.topbar nav a.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.topbar nav a.active i { opacity: 1; }
.userbox { display: flex; align-items: center; gap: 12px; }
.userbox .bal {
  display: inline-flex; align-items: baseline; gap: 6px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px;
}
.userbox .bal em { font-style: normal; color: var(--muted); font-size: 12px; }
.userbox .bal b { color: var(--money); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.userbox .frozen { color: var(--muted); font-style: normal; font-size: 11.5px; margin-left: 4px; }
.uname { font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkbtn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 13px; font-family: inherit; padding: 4px;
}
.linkbtn:hover { color: var(--danger); }

.mock-banner, .live-banner {
  padding: 8px 24px; font-size: 13px; border-bottom: 1px solid;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.mock-banner { background: #fffbea; border-color: #fde68a; color: #92600a; }
.live-banner { background: var(--ok-soft); border-color: #bfe8d2; color: #0b6b43; }
.mock-banner a, .live-banner a { font-weight: 600; }
.mock-banner b, .live-banner b { font-weight: 700; }

.container { max-width: 1200px; margin: 26px auto; padding: 0 20px; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.card.narrow { max-width: 620px; margin: 0 auto 20px; }
.card h3 { font-size: 16px; margin-bottom: 14px; letter-spacing: .2px; }
.card h3.sect { margin-top: 24px; }
.card h4 { font-size: 13.5px; margin: 10px 0 10px; color: var(--text-2); font-weight: 700; }
.page-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px; flex-wrap: wrap; gap: 12px;
}
.page-head h3 { font-size: 19px; }
.page-head p { margin-top: 2px; }
.page-head .actions { gap: 8px; }
.row-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 30px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------------- 管理页子板块导航 ---------------- */
.section-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; padding: 9px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.section-tab {
  border: 1px solid transparent; border-radius: 8px; padding: 7px 13px;
  background: var(--primary-soft); color: var(--primary-dark); font: inherit;
  font-size: 13px; font-weight: 650; cursor: pointer; transition: all .15s;
}
.section-tab:hover { background: #dce8ff; border-color: #b7cdf8; }
.section-tab.active {
  background: linear-gradient(135deg, var(--primary), #4f46e5); color: #fff;
  border-color: var(--primary); box-shadow: 0 3px 10px rgba(37, 99, 235, .24);
}
.section-tab:focus-visible { outline: none; box-shadow: var(--ring); }
.email-code-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
.email-code-row .btn { white-space: nowrap; min-height: 42px; }
.section-panel[hidden] { display: none; }
.section-panel:not([hidden]) { animation: section-panel-in .16s ease-out; }
@keyframes section-panel-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- 表单 ---------------- */
.form label, .inline-form label, .upload-row label {
  display: block; font-size: 13px; color: var(--text-2); margin: 12px 0 5px; font-weight: 500;
}
input, textarea, select {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 12px;
  font-size: 14px; width: 100%; background: #fff; color: var(--text); font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--ring);
}
input::placeholder, textarea::placeholder { color: #a9b4c4; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form label { margin: 0; white-space: nowrap; }
.inline-form input, .inline-form select { width: auto; }
.inline-form.wrap { row-gap: 8px; }
textarea { resize: vertical; font-family: "JetBrains Mono", Consolas, Menlo, monospace; font-size: 13px; line-height: 1.7; }
.seg { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }
.seg label {
  display: flex; align-items: center; gap: 9px; margin: 0; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 13px;
  transition: all .15s; background: #fff;
}
.seg label:hover { border-color: #a9bdd9; }
.seg label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.seg input { width: auto; accent-color: var(--primary); }
.seg label span { font-weight: 600; color: var(--text); }
.seg label i { font-style: normal; display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.upload-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.upload-row .filebtn { margin: 0; display: inline-flex; padding: 8px 14px; cursor: pointer; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.form-err {
  color: #b42318; background: var(--danger-soft); border: 1px solid #f7d3cf;
  border-radius: var(--radius-sm); padding: 9px 13px; margin: 12px 0 0; font-size: 13px;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 9px 17px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .15s;
  font-family: inherit; white-space: nowrap; line-height: 1.2;
}
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .3); }
.btn.primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.ok:hover { background: #0d7a4b; text-decoration: none; }
.btn.ghost { background: #fff; border-color: var(--line-strong); color: var(--text-2); }
.btn.ghost:hover { border-color: #9fb2cc; color: var(--text); text-decoration: none; background: var(--surface-2); }
.btn.bad { background: var(--danger-soft); color: #b42318; border-color: #f5c7c2; }
.btn.bad:hover { background: #fbdfdb; text-decoration: none; }
.btn.small { padding: 5px 11px; font-size: 12.5px; }
.btn.big { padding: 13px 34px; font-size: 15px; border-radius: 11px; }
.btn.block { width: 100%; margin-top: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------------- 表格 ---------------- */
.tablewrap { overflow-x: auto; border-radius: var(--radius-sm); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .4px;
  padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; background: var(--surface);
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid #f0f3f8; vertical-align: top; }
.tbl tbody tr:hover, .tbl tr.click:hover { background: #f7faff; }
.tbl tr.click { cursor: pointer; }
.tbl tr:last-child td { border-bottom: none; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.go { color: var(--primary); font-weight: 600; white-space: nowrap; }
.urlcell { max-width: 260px; word-break: break-all; }
.cellprog { display: flex; flex-direction: column; gap: 4px; min-width: 110px; }

/* ---------------- 徽标 / 标签 ---------------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.run { background: var(--info-soft); color: var(--info); }
.badge.wait { background: #eef1f6; color: #5b6a80; }
.badge.miss { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--danger-soft); color: #b42318; }
.tag {
  display: inline-block; background: #eef1f6; color: #5b6a80; border-radius: 6px;
  padding: 1px 7px; font-size: 11px; margin-left: 5px; white-space: nowrap;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft);
  color: var(--primary-dark); border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 500;
}
.pill b { font-weight: 700; }

/* ---------------- 统计块（KPI） ---------------- */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.stat {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 18px; min-width: 116px; transition: box-shadow .15s, transform .15s;
}
.stat:hover { box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.stat span { font-size: 11.5px; color: var(--muted); }
.stat.ok { background: var(--ok-soft); border-color: #c7ebd8; }
.stat.ok b { color: var(--ok); }
.stat.bad { background: var(--danger-soft); border-color: #f7d3cf; }
.stat.bad b { color: var(--danger); }
.stat.miss { background: var(--warn-soft); border-color: #f7e2ad; }
.stat.miss b { color: var(--warn); }
.stat.profit-ok { background: #eafaf1; border-color: #c7ebd8; }
.stat.profit-ok b { color: var(--ok); }

.prog { appearance: none; border: 0; background: #e5e9f1; border-radius: 999px;
  height: 8px; width: 100%; overflow: hidden; vertical-align: middle; }
.prog::-webkit-progress-bar { background: #e5e9f1; border-radius: 999px; }
.prog::-webkit-progress-value { background: linear-gradient(90deg, #3b82f6, #2563eb); border-radius: 999px; }
.prog::-moz-progress-bar { background: linear-gradient(90deg, #3b82f6, #2563eb); border-radius: 999px; }

/* ---------------- 键值表 ---------------- */
.kv { width: 100%; font-size: 13.5px; }
.kv th { text-align: left; color: var(--muted); font-weight: 500; padding: 7px 12px 7px 0; width: 132px; white-space: nowrap; vertical-align: top; }
.kv td { padding: 7px 0; }

/* ---------------- 认证页 ---------------- */
.auth-wrap { min-height: 64vh; display: flex; align-items: center; justify-content: center; }
.auth-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  width: 100%; max-width: 408px; padding: 34px 36px; box-shadow: var(--shadow);
}
.auth-card.admin-auth { border-top: 4px solid #1e3a8a; }
.auth-card h2 { margin-bottom: 4px; font-size: 20px; }
.auth-card .form label { display: block; margin: 13px 0 5px; }
.auth-card > p { margin-top: 12px; }
.admin-link { text-align: right; margin-top: 14px; }

/* ---------------- 预览框 ---------------- */
.preview-box {
  display: none; background: var(--surface-2); border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm); padding: 14px 16px; margin: 14px 0 2px; font-size: 13px; line-height: 1.9;
}
.preview-box.show { display: block; }
.preview-box b { color: var(--text); }
.preview-box .warn { color: var(--warn); font-weight: 600; }
.price-side { border-left: 1px solid var(--line); padding-left: 26px; }
@media (max-width: 900px) { .price-side { border: none; padding: 0; } }

/* ---------------- 收银台 ---------------- */
.center { text-align: center; }
.paycard { padding: 34px 32px; }
.pay-amount { font-size: 42px; font-weight: 800; color: var(--money); margin: 16px 0 6px; letter-spacing: -.5px; }
.pay-state { font-size: 18px; font-weight: 700; color: var(--primary-dark); margin-top: 10px; }
.pay-actions { display: flex; gap: 14px; justify-content: center; margin: 24px 0 10px; flex-wrap: wrap; }
.bal-big b { color: var(--money); font-size: 19px; }

/* ---------------- 服务商卡片 / 运行提示 ---------------- */
.btn.api-tab {
  background: var(--primary-soft); border-color: #b9cdf7; color: var(--primary-dark);
  font-weight: 700; box-shadow: none;
}
.btn.api-tab:hover { background: #dce8ff; border-color: #8eb0f2; color: var(--primary-dark); }
.btn.api-tab.active,
.btn.api-tab.active:hover {
  background: linear-gradient(135deg, var(--primary), #4f46e5); border-color: var(--primary);
  color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .28);
}
.prov-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px;
  margin-bottom: 10px; background: var(--surface-2);
}
.prov-card .tag { margin-left: 6px; }
.prov-links { display: inline-flex; gap: 9px; margin-left: 10px; vertical-align: middle; }
.prov-links a { color: var(--primary); font-size: 12px; font-weight: 650; text-decoration: none; }
.prov-links a:hover { text-decoration: underline; }
.prov-note-trigger {
  appearance: none; border: 0; padding: 0; background: transparent; color: var(--primary);
  display: inline-flex; align-items: center; min-width: 0; max-width: 260px;
  font: inherit; font-size: 12px; font-weight: 650; cursor: pointer;
}
.prov-note-trigger:hover { text-decoration: underline; }
.prov-note-label { flex: none; }
.prov-note-text {
  display: inline-block; min-width: 0; max-width: 190px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.prov-note-trigger.has-note::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 4px;
  border-radius: 50%; background: var(--ok); vertical-align: 1px;
}
.prov-note-trigger:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 3px; }
@media (max-width: 720px) { .prov-note-text { max-width: 120px; } }
.running { background: var(--info-soft); border-color: #c3d6fb; color: var(--info); font-weight: 600; }

/* ---------------- 公开落地页 ---------------- */
.hero { text-align: center; padding: 64px 16px 40px; }
.hero-badge {
  display: inline-block; background: var(--primary-soft); color: var(--primary-dark);
  border-radius: 999px; padding: 6px 16px; font-size: 12.5px; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: 40px; line-height: 1.25; letter-spacing: -.5px; }
.hero h1 span {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { color: var(--text-2); max-width: 720px; margin: 18px auto 30px; font-size: 15px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.land-stats { display: flex; gap: 16px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.land-stats .stat { min-width: 150px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 32px 0; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; font-size: 13.5px; color: var(--text-2); transition: transform .15s, box-shadow .15s;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature .fi { font-size: 22px; margin-bottom: 8px; }
.feature b { display: block; margin-bottom: 6px; color: var(--text); font-size: 14.5px; }
.land-use { max-width: 780px; margin: 0 auto; }
.steps { display: grid; gap: 14px; margin-top: 6px; }
.steps div { display: flex; align-items: center; gap: 14px; color: var(--text-2); }
.steps p { margin: 0; }
.steps span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft);
  color: var(--primary); font-weight: 700; font-size: 14px; flex: none;
}

/* ---------------- toast ---------------- */
#toast {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%) translateY(-12px);
  background: #101828; color: #fff; border-radius: 11px; padding: 11px 24px;
  font-size: 14px; z-index: 99; display: none; max-width: 84vw;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .28); opacity: 0;
  transition: opacity .2s, transform .2s;
}
#toast.show { display: block; opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: #b42318; }

/* ---------------- 错误页 ---------------- */
.errpage { max-width: 520px; margin: 90px auto; text-align: center; }
.errcode { font-size: 64px; font-weight: 800; color: var(--primary); letter-spacing: -2px; }
.errpage h1 { font-size: 20px; margin: 4px 0 8px; }
.errpage p { margin-bottom: 18px; }

/* ---------------- 游客模式 / 注册引导弹窗 ---------------- */
/* 首页首屏：输入查询区是绝对主角，且关键按钮与上传区尽量同屏可见 */
.hero.hero-slim { padding: 10px 16px 4px; }
.hero.hero-slim .hero-badge { margin-bottom: 8px; padding: 4px 12px; font-size: 11.5px; }
.hero.hero-slim h1 { font-size: 25px; letter-spacing: -.3px; }
.hero.hero-slim .sub { margin: 6px auto 0; font-size: 13px; }

.card.card-query {
  padding: 20px 24px 22px; border-color: #cfe0ff;
  box-shadow: 0 2px 4px rgba(37,99,235,.05), 0 14px 34px rgba(16,24,40,.07);
}
.card.card-query h3 { font-size: 16.5px; margin-bottom: 10px; }
.card.card-query .guest-note { margin-bottom: 10px; }
.card.card-query .seg { margin: 4px 0 2px; }
.card.card-query .seg label { padding: 7px 12px; }

/* 大输入框：首页输入区明显放大，成为页面核心 */
textarea#urls { min-height: 170px; font-size: 13.5px; line-height: 1.85; }
textarea#urls.ta-big { min-height: 236px; font-size: 14px; }
@media (max-width: 720px) { textarea#urls.ta-big { min-height: 190px; } }

/* 拖拽 / 点击上传区（紧凑横向条） */
.dropzone {
  display: flex; align-items: center; gap: 14px; margin-top: 10px;
  border: 2px dashed var(--line-strong); border-radius: 12px; padding: 13px 18px;
  cursor: pointer; background: var(--surface-2);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.dropzone:hover { border-color: var(--primary); background: var(--primary-soft); }
.dropzone.over { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--ring); }
.dropzone .dz-icon { font-size: 24px; line-height: 1; flex: none; }
.dropzone .dz-body { min-width: 0; }
.dropzone .dz-main { font-size: 13.5px; color: var(--text); }
.dropzone .dz-link { color: var(--primary); font-weight: 600; text-decoration: underline; }
.dropzone .dz-hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* 价格与承诺条带 */
.price-chips { display: flex; gap: 9px; flex-wrap: wrap; margin: 14px 0 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font-size: 12.5px; color: var(--text-2);
}
.chip b { font-weight: 700; }
.chip.ok { background: var(--ok-soft); border-color: #c7ebd8; color: var(--ok); }

.stat-row.mini { margin: 16px 0 0; }
.stat-row.mini .stat { padding: 10px 16px; min-width: 128px; }
.stat-row.mini .stat b { font-size: 17px; }

.pill.guest { background: #fff7e6; color: #92600a; border: 1px solid #f7e2ad; }
.guest-note {
  background: var(--primary-soft); border: 1px solid #cfe0ff; border-radius: var(--radius-sm);
  padding: 9px 13px; margin: 0 0 14px;
}
.guest-note b { color: var(--primary-dark); }
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 27, 45, .48); z-index: 120;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask[hidden] { display: none; }
.modal {
  background: var(--surface); border-radius: 16px; box-shadow: 0 24px 60px rgba(16, 24, 40, .28);
  max-width: 440px; width: 100%; padding: 26px 28px;
}
.modal h3 { font-size: 18px; margin-bottom: 8px; }
.modal p { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 auto; }

/* API 密钥编辑弹窗 */
body.modal-open { overflow: hidden; }
.api-key-modal-mask {
  background: rgba(15, 27, 45, .58); backdrop-filter: blur(4px);
  animation: modal-mask-in .16s ease-out;
}
.api-key-modal {
  max-width: 540px; padding: 0; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: 0 28px 80px rgba(15, 27, 45, .32), 0 8px 24px rgba(15, 27, 45, .14);
  animation: modal-card-in .2s cubic-bezier(.2, .8, .2, 1);
}
.api-key-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding: 22px 24px 19px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f8fbff 0%, #f1f6ff 100%);
}
.api-key-modal-title { display: flex; gap: 13px; align-items: center; min-width: 0; }
.api-key-modal-icon {
  width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--primary); color: #fff; font-size: 18px; font-weight: 700;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .23);
}
.api-key-modal-title h3 { margin: 0; font-size: 18px; line-height: 1.35; }
.api-key-modal-title p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.modal-close {
  width: 34px; height: 34px; flex: none; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font-size: 25px; line-height: 1; cursor: pointer; transition: all .15s;
}
.modal-close:hover { color: var(--text); background: rgba(15, 27, 45, .07); }
.modal-close:focus-visible { outline: none; box-shadow: var(--ring); }
.api-key-modal-body { padding: 22px 24px 24px; }
.api-key-modal-body > label {
  display: block; margin: 16px 0 6px; color: var(--text-2); font-size: 13px; font-weight: 650;
}
.api-key-current {
  display: grid; grid-template-columns: .85fr 1.4fr; gap: 10px; padding: 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px;
}
.api-key-current span { min-width: 0; padding: 2px 5px; }
.api-key-current small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.api-key-current b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.field-help { margin: 5px 0 0 !important; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.secret-field { position: relative; }
.secret-field input { padding-right: 62px; }
.secret-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; border-radius: 7px; padding: 5px 9px; background: var(--surface-2);
  color: var(--primary-dark); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer;
}
.secret-toggle:hover { background: var(--primary-soft); }
.secret-toggle:focus-visible { outline: none; box-shadow: var(--ring); }
.modal-inline-error {
  margin-top: 14px; padding: 9px 12px; border: 1px solid #f5c7c2; border-radius: 9px;
  background: var(--danger-soft); color: #b42318; font-size: 12.5px;
}
.api-key-modal .modal-actions {
  justify-content: flex-end; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
}
.api-key-modal .modal-actions .btn { flex: 0 0 auto; min-width: 104px; }
.provider-note-modal { max-width: 480px; }
.provider-note-icon { background: #7c3aed; box-shadow: 0 6px 14px rgba(124, 58, 237, .23); }
.provider-note-modal textarea { min-height: 108px; max-height: 260px; resize: vertical; line-height: 1.6; }
.provider-note-counter { margin-top: 5px; color: var(--muted); font-size: 11.5px; text-align: right; }
@keyframes modal-mask-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-card-in {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 560px) {
  .api-key-modal-mask { padding: 12px; align-items: flex-end; }
  .api-key-modal { max-width: none; border-radius: 16px 16px 10px 10px; }
  .api-key-modal-head, .api-key-modal-body { padding-left: 18px; padding-right: 18px; }
  .api-key-current { grid-template-columns: 1fr; }
  .api-key-modal .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .api-key-modal .modal-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .api-key-modal-mask, .api-key-modal { animation: none; }
}

/* ---------------- 管理端数据分析 / 转化漏斗 ---------------- */
.analytics-grid {
  display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr);
  gap: 18px; align-items: start;
}
.funnel { display: grid; gap: 14px; margin-top: 18px; }
.funnel-stage { min-width: 0; }
.funnel-meta { display: grid; grid-template-columns: minmax(130px, 1fr) auto minmax(118px, auto);
  align-items: baseline; gap: 12px; margin-bottom: 6px; }
.funnel-meta span { font-weight: 650; color: var(--text); }
.funnel-meta b { font-size: 20px; color: var(--primary-dark); }
.funnel-meta em { font-size: 11.5px; color: var(--muted); font-style: normal; text-align: right; }
.funnel-track { appearance: none; border: 0; width: 100%; height: 12px;
  background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.funnel-track::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.funnel-track::-webkit-progress-value { background: linear-gradient(90deg, var(--primary), #6ea1ff); border-radius: 999px; }
.funnel-track::-moz-progress-bar { background: linear-gradient(90deg, var(--primary), #6ea1ff); border-radius: 999px; }
.analytics-table th, .analytics-table td { white-space: nowrap; text-align: right; }
.analytics-table th:first-child, .analytics-table td:first-child { text-align: left; }
@media (max-width: 1100px) { .analytics-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .funnel-meta { grid-template-columns: 1fr auto; }
  .funnel-meta em { grid-column: 1 / -1; text-align: left; }
}

/* ---------------- 页脚 ---------------- */
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 20px 24px; }
.foot-inner { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; }
.foot-inner .dot { color: var(--line-strong); }

@media (max-width: 720px) {
  .topbar { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .topbar nav { order: 3; width: 100%; }
  .hero h1 { font-size: 30px; }
  .container { padding: 0 14px; margin: 18px auto; }
  .card { padding: 18px 16px; }
}

/* ---------------- 会员权益板块 ---------------- */
.benefit-card {
  border: 1px solid #f3e3b0;
  background: linear-gradient(150deg, #fffdf4 0%, #fff9e6 60%, #ffffff 100%);
}
.benefit-card.compact { margin-top: 14px; padding: 16px 18px; }
.benefit-card h3 { margin-bottom: 10px; }
.benefit-list, .benefit-tiers { list-style: none; margin: 8px 0; padding: 0; }
.benefit-list li, .benefit-tiers li {
  position: relative; padding: 4px 0 4px 22px; font-size: 13.5px; color: var(--text-2); line-height: 1.6;
}
.benefit-list li::before { content: "✔"; position: absolute; left: 0; color: var(--ok); font-size: 12px; }
.benefit-tiers li::before { content: "🎁"; position: absolute; left: 0; font-size: 12px; }
.benefit-list b, .benefit-tiers b { color: var(--warn); }
.bonus-line {
  background: var(--warn-soft); border: 1px solid #f3dfae; border-radius: var(--radius-sm);
  padding: 9px 13px; margin: 2px auto 6px; display: inline-block; color: var(--warn);
}
.bonus-line .money { font-weight: 700; }

/* ---------------- 注册赠送提示 ---------------- */
.gift-hint {
  background: linear-gradient(120deg, #fffdf4, #fff5d8);
  border: 1px solid #f3e3b0; border-radius: var(--radius-sm);
  padding: 9px 13px; margin: 0 0 14px; color: var(--warn); font-size: 13px;
}
.gift-hint b { font-weight: 700; }

/* ---------------- CSP 安全工具类（替代行内 style） ---------------- */
.text-danger { color: var(--danger); }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.ml-8 { margin-left: 8px; }
.ml-12 { margin-left: 12px; }
.w-80 { width: 80px !important; }
.w-100 { width: 100px !important; }
.w-110 { width: 110px !important; }
.w-120 { width: 120px !important; }
.w-140 { width: 140px !important; }
.w-150 { width: 150px !important; }
.w-190 { width: 190px !important; }
.w-220 { width: 220px !important; }
.w-320 { width: 320px !important; }
.max-w-460 { max-width: 460px; }
.check-label { display: flex !important; align-items: center; gap: 8px; }
.check-auto { width: auto !important; }
