/* ============================================================
   促连LBS 控制台样式
   设计基准与首页 landing.html 同源：
   纸白 #fbfbfa、墨 #101418、信号蓝 #1d6fe8、等宽字承接代码
   ============================================================ */

:root {
  /* surface：白与墨都往蓝灰锚点偏一点点，不用纯 #fff / #000 */
  --bg: #fbfbfa;
  --surface: #fefefd;
  --surface-2: #fdfdfc;
  --surface-3: #fcfcfb;
  --surface-4: #f7f7f5;
  --surface-5: #f2f2ee;
  --field: #fdfdfb;
  --ink: #101418;
  --ink-press: #05080b;
  --ink-2: #4a5560;
  --ink-3: #8a939e;
  --ink-4: #9aa2ab;
  --line: #e6e6e2;
  --line-2: #d8d8d2;
  --line-3: #d5e3fb;
  --dot: #e2e2dd;
  --grid: #eeeeea;
  /* brand */
  --brand: #1d6fe8;
  --brand-ink: #14539f;
  --brand-soft: #eef4fe;
  /* deep：深色区块与代码窗 */
  --deep: #101418;
  --deep-2: #1b222b;
  --deep-line: #2b3542;
  --deep-mute: #a9b4bf;
  /* ok */
  --ok: #0f9b6c;
  --ok-ink: #0a6b4b;
  --ok-soft: #e9f8f1;
  --ok-line: #bfe3d2;
  --ok-wash: #f6fdf9;
  /* warn / danger */
  --warn: #8a5205;
  --warn-ink: #7d4f08;
  --warn-soft: #fdf3e2;
  --warn-line: #f2ddb6;
  --danger: #c0392f;
  --danger-ink: #96271f;
  --danger-soft: #fdeceb;
  --danger-line: #f2c9c5;
  /* 阴影与圆角、字体 */
  --sh-1: 0 1px 2px rgba(16, 20, 24, .04);
  --sh-2: 0 24px 60px -24px rgba(16, 20, 24, .16);
  --sh-3: 0 12px 32px -18px rgba(16, 20, 24, .2);
  --sh-4: 0 20px 60px -30px rgba(16, 20, 24, .2);
  --radius: 16px;
  --radius-sm: 10px;
  --mono: 'SF Mono', ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
  --sans: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); }

:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ---------------- 品牌 ---------------- */
.brand-mark { display: flex; align-items: center; gap: 9px; margin-bottom: 26px; }
.brand-dot {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--ink);
  display: grid; place-items: center;
  color: var(--surface); font-size: 12px; font-weight: 700;
  position: relative; flex: 0 0 auto;
}
.brand-dot::after {
  content: ""; position: absolute; inset: 7px;
  border: 2px solid var(--brand-soft); border-radius: 50%;
  border-top-color: transparent;
  transform: rotate(35deg);
}
.brand-name { font-weight: 650; letter-spacing: -.01em; font-size: 15.5px; color: var(--ink); }
.brand-mark.small { margin-bottom: 22px; padding: 0 2px; }

/* ============================================================
   登录 / 注册页
   ============================================================ */
body.on-auth { background: var(--bg); }
.auth-wrap {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* 左栏保持首页的纸白排版，右栏用深色承载表单，形成对照 */
.auth-bg { position: absolute; inset: 0; pointer-events: none; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(96px); opacity: .05; }
.auth-orb-1 { width: 480px; height: 480px; left: -130px; top: -150px; background: var(--brand); }
.auth-orb-2 { width: 400px; height: 400px; right: -110px; bottom: -130px; background: var(--ok); }
.auth-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at 28% 34%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 28% 34%, #000 0%, transparent 72%);
}

.auth-side {
  position: relative;
  flex: 1 1 54%;
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  z-index: 1;
  max-width: 720px;
}
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand .brand-dot {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ink);
}
.auth-brand .brand-dot::after { inset: 8px; border-color: var(--brand-soft); }
.auth-date { display: flex; flex-direction: column; line-height: 1.35; }
.auth-date-main { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.auth-date-sub { font-size: 12px; color: var(--ink-3); letter-spacing: .2px; }

.auth-side h1 {
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.16;
  font-weight: 660;
  margin: 48px 0 16px;
  letter-spacing: -.03em;
}
.auth-lead {
  margin: 0 0 36px;
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 430px;
  line-height: 1.7;
}

.auth-points {
  list-style: none; padding: 22px 0 0; margin: 0;
  display: grid; gap: 15px; max-width: 460px;
  border-top: 1px solid var(--line);
}
.auth-points li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.6;
}
.auth-points li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--ok-soft);
  border: 1px solid var(--ok-line);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f9b6c' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><path d='m5 13 4 4L19 7'/></svg>");
  background-size: 9px 9px;
  background-position: center;
  background-repeat: no-repeat;
}
.auth-points b {
  color: var(--ink); font-weight: 600;
  display: inline-block; margin-right: 8px;
}

.auth-foot {
  margin-top: auto;
  padding-top: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.auth-foot-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  animation: auth-pulse 2.4s ease-out infinite;
}
@keyframes auth-pulse {
  0% { box-shadow: 0 0 0 0 rgba(15, 155, 108, .4); }
  70% { box-shadow: 0 0 0 9px rgba(15, 155, 108, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 155, 108, 0); }
}

.auth-main {
  position: relative;
  flex: 1 1 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 40px 40px 0;
  z-index: 1;
}
.auth-card {
  width: 100%;
  max-width: 408px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--sh-2);
  padding: 32px 30px;
  animation: auth-rise .5s ease both;
}
.auth-card-head { margin-bottom: 24px; }
.auth-card-head h2 {
  margin: 0 0 6px; font-size: 21px; font-weight: 640;
  color: var(--ink); letter-spacing: -.02em;
}
.auth-card-head p { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.6; }

.auth-side h1, .auth-lead, .auth-points { animation: auth-rise .55s ease both; }
.auth-lead { animation-delay: .06s; }
.auth-points { animation-delay: .12s; }
.auth-foot { animation: auth-rise .6s ease both; animation-delay: .18s; }
@keyframes auth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-card, .auth-side h1, .auth-lead, .auth-points, .auth-foot { animation: none; }
  .auth-foot-dot { animation: none; }
}

/* 登录 / 注册切换 */
.auth-tabs {
  display: flex; gap: 4px; padding: 4px;
  margin-bottom: 22px;
  background: var(--surface-4);
  border-radius: var(--radius-sm);
}
.auth-tab {
  flex: 1; padding: 8px 0;
  font-size: 14px; font-family: inherit; font-weight: 520;
  color: var(--ink-2);
  background: transparent; border: 0;
  border-radius: 7px; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.auth-tab:hover { color: var(--ink); }
.auth-tab.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 20, 24, .06), 0 2px 8px -4px rgba(16, 20, 24, .12);
}

/* 表单输入框（带图标） */
.form .field-label { display: block; margin-bottom: 15px; font-size: 13px; color: var(--ink-2); font-weight: 520; }
.form .input-wrap { position: relative; display: block; margin-top: 7px; }
.form .input-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--ink-4); pointer-events: none;
}
.form .input-wrap input { padding: 11px 14px 11px 41px; }

/* 获取验证码按钮 */
.form .input-wrap.has-btn input { padding-right: 118px; }
.sms-btn {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  height: 30px; padding: 0 11px;
  font-size: 12.5px; font-family: inherit; font-weight: 520;
  color: var(--brand-ink);
  background: var(--brand-soft);
  border: 1px solid var(--line-3);
  border-radius: 7px;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, opacity .15s;
}
.sms-btn:hover:not(:disabled) { background: #e4eefd; }
.sms-btn:disabled {
  color: var(--ink-4);
  background: var(--surface-4);
  border-color: var(--line);
  cursor: not-allowed;
}

/* 邮箱密码登录折叠区 */
.auth-alt { margin: 2px 0 14px; font-size: 13px; color: var(--ink-2); }
.auth-alt summary {
  cursor: pointer; color: var(--ink-3); list-style: none;
  user-select: none; transition: color .15s;
}
.auth-alt summary::-webkit-details-marker { display: none; }
.auth-alt summary::before { content: "＋ "; }
.auth-alt[open] summary::before { content: "－ "; }
.auth-alt summary:hover { color: var(--ink); }
.auth-alt-body { margin-top: 12px; }
.auth-alt-body label { margin-bottom: 10px; }
.auth-alt-body .btn { margin-top: 4px; }

/* 试用额度说明 */
.trial-note {
  margin: 4px 0 16px;
  padding: 13px 15px;
  background: var(--ok-wash);
  border: 1px solid var(--ok-line);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.trial-note b { display: block; color: var(--ok-ink); font-size: 13px; margin-bottom: 4px; font-weight: 600; }
.trial-note span { display: block; }
.trial-note span b { display: inline; color: var(--ok-ink); font-weight: 600; }

.link { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

/* ---------------- 表单 ---------------- */
.form label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink-2);
}
.form input, .form select, .form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form input::placeholder, .form textarea::placeholder { color: var(--ink-4); }
.form input:focus, .form select:focus, .form textarea:focus {
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(29, 111, 232, .11);
}
.form-hint {
  font-size: 12.5px;
  color: var(--ink-3);
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.7;
}
.form-hint .link { color: var(--brand); cursor: pointer; }
.form-hint a { color: var(--brand); }
.auth-card .btn-block { margin-top: 6px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 520;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, transform .16s, opacity .16s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--surface); }
.btn-primary:hover:not(:disabled) { background: var(--ink-press); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-3); }
.btn-ghost:active:not(:disabled) { background: var(--surface-4); }
.btn-danger-ghost { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); }
.btn-block { width: 100%; padding: 12px; font-size: 15px; border-radius: var(--radius-sm); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }

.icon-btn {
  border: 0; background: transparent;
  width: 30px; height: 30px; border-radius: 8px;
  font-size: 20px; line-height: 1;
  color: var(--ink-3); cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.icon-btn:hover { color: var(--ink); background: var(--surface-4); }

/* ============================================================
   主框架
   ============================================================ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 24px 16px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface-4); color: var(--ink); text-decoration: none; }
.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 560;
}
.ni {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--surface-5); color: var(--ink-3);
  font-size: 11.5px; font-weight: 520;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  transition: background .15s, color .15s;
}
.nav-item.active .ni { background: var(--brand); color: #fff; }

.sidebar-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.who { font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px; word-break: break-all; line-height: 1.6; }
.who b { display: block; color: var(--ink); font-weight: 560; font-size: 13px; }

.content { flex: 1 1 auto; padding: 32px 40px 72px; max-width: 1200px; min-width: 0; }

/* ---------------- 页头 ---------------- */
.page-head { margin-bottom: 26px; }
.page-head h2 {
  font-size: 25px; font-weight: 640; margin: 0 0 8px;
  letter-spacing: -.02em; line-height: 1.3;
}
.page-head p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 680px; line-height: 1.65; }
.page-head .row-between {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--sh-1);
}
.card-pad { padding: 22px 24px; }
.card + .card { margin-top: 18px; }
.card-title {
  font-size: 15px; font-weight: 600; margin: 0 0 16px;
  letter-spacing: -.01em;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
.card-title .sub { font-weight: 400; font-size: 12.5px; color: var(--ink-3); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* 概览数字：参照首页 .stat 的 tabular-nums 与内嵌分隔线 */
.stat { padding: 20px 22px; }
.stat .k { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; }
.stat .v {
  font-size: 28px; font-weight: 640; letter-spacing: -.03em;
  line-height: 1.2; font-variant-numeric: tabular-nums;
}
.stat .s { font-size: 12px; color: var(--ink-4); margin-top: 6px; }
.stat .v small { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-left: 4px; letter-spacing: 0; }

/* ---------------- 表格 ---------------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th {
  color: var(--ink-3); font-weight: 520; font-size: 12.5px;
  white-space: nowrap; letter-spacing: .01em;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-3); }
td.mono, .mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  font-size: 11.5px; line-height: 19px; font-weight: 520;
  white-space: nowrap;
}
.tag-ok { background: var(--ok-soft); color: var(--ok-ink); }
.tag-off { background: var(--surface-5); color: var(--ink-3); }
.tag-warn { background: var(--warn-soft); color: var(--warn-ink); }
.tag-js { background: #f3edfd; color: #6b40c4; }
.tag-srv { background: var(--surface-5); color: var(--ink-2); }
/* 调用端标记：小程序 / App。用中性色，避免与状态标签（生效/停用）抢视觉。 */
.tag-client { background: #e8f5ec; color: #1a7f45; }

.key-cell { display: flex; align-items: center; gap: 8px; }
.key-text {
  font-family: var(--mono);
  font-size: 12.5px; color: var(--ink-2);
  background: var(--surface-4); border: 1px solid var(--line);
  padding: 3px 9px; border-radius: 7px;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

.empty {
  text-align: center; padding: 52px 20px; color: var(--ink-3); font-size: 13.5px;
}
.empty b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 6px; font-size: 15px; }

/* ---------------- 迷你柱状图 ---------------- */
.bar-wrap {
  display: flex; align-items: flex-end; gap: 8px;
  height: 132px; margin-top: 12px;
  border-bottom: 1px solid var(--line); padding-bottom: 1px;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar {
  width: 100%; background: var(--brand);
  border-radius: 4px 4px 0 0; min-height: 3px;
  transition: opacity .15s;
}
.bar.err { background: var(--danger); }
.bar:hover { opacity: .78; }
.bar-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-4); margin-top: 8px; }
.bar-empty { margin-top: 10px; font-size: 12.5px; color: var(--ink-4); }

.progress { height: 8px; background: var(--surface-5); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s; }
.progress.warn > i { background: #d9992b; }
.progress.danger > i { background: var(--danger); }

/* ---------------- 文档区 ---------------- */
.doc-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.doc-tab {
  appearance: none; background: none; border: 0;
  padding: 11px 15px; margin-bottom: -1px;
  font: inherit; font-size: 14px; font-weight: 500;
  color: var(--ink-3); cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.doc-tab:hover { color: var(--ink); }
.doc-tab.is-on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

.doc-panel[hidden] { display: none; }
.doc-lede {
  font-size: 14.5px; line-height: 1.8; color: var(--ink-2);
  background: var(--field); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 22px;
}
.doc-lede b { color: var(--ink); font-weight: 600; }
.doc-step {
  display: flex; align-items: center; gap: 9px;
  font-size: 15.5px; color: var(--ink); font-weight: 600;
  margin: 26px 0 10px;
}
.doc-step:first-of-type { margin-top: 0; }
.doc-step > i {
  flex: 0 0 auto; width: 21px; height: 21px; border-radius: 50%;
  background: var(--ink); color: var(--surface);
  font-size: 11.5px; font-style: normal; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.doc-note { font-size: 12.5px; color: var(--ink-3); line-height: 1.75; margin: -4px 0 16px; }
.doc-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; margin: 0 0 16px; }
.doc-kv dt { color: var(--ink-3); }
.doc-kv dd { margin: 0; color: var(--ink); }
.doc-frame {
  width: 100%; height: calc(100vh - 260px); min-height: 520px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}

.doc { font-size: 14.5px; line-height: 1.85; color: var(--ink-2); }
.doc h3 {
  font-size: 16px; color: var(--ink); font-weight: 600;
  margin: 30px 0 12px; letter-spacing: -.01em;
}
.doc h3:first-child { margin-top: 0; }
.doc p { margin: 0 0 12px; }
.doc ol, .doc ul { padding-left: 20px; margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }
.doc code {
  font-family: var(--mono);
  font-size: 12.5px; background: var(--surface-4);
  border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; color: #a33d5c;
}

pre {
  background: var(--deep); color: #d8e0ea;
  padding: 16px 18px; border-radius: var(--radius-sm);
  overflow-x: auto; font-size: 12.5px; line-height: 1.8;
  font-family: var(--mono);
  margin: 0 0 16px;
}
pre .cm { color: var(--deep-mute); }
pre .hl { color: #7fd1a8; }
pre.key-reveal {
  background: var(--brand-soft);
  color: var(--brand-ink);
  border: 1px solid var(--line-3);
  font-size: 13.5px;
  letter-spacing: .4px;
  word-break: break-all;
  user-select: all;
}

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--warn-soft); border: 1px solid var(--warn-line);
  color: var(--warn-ink); border-radius: var(--radius-sm);
  padding: 13px 15px; font-size: 13.5px; margin-bottom: 16px;
  line-height: 1.7;
}
/* 左侧标签（「提示」「怎么看」）必须不换行、不被压缩。
 * flex 子项默认 flex-shrink:1，遇到长文案时会把「提示」挤成竖排，
 * 而且行高不够时「示」直接被裁掉——截图里就是这个现象。 */
.notice > span { flex: 0 0 auto; white-space: nowrap; }
.notice.blue { background: var(--brand-soft); border-color: var(--line-3); color: var(--brand-ink); }

/* ---------------- 弹窗 / Toast ---------------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(16, 20, 24, .38);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 50;
  animation: mask-in .18s ease both;
}
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 470px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--sh-2);
  overflow: hidden;
  animation: modal-rise .22s ease both;
}
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 16px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.modal-body { padding: 20px 22px; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--surface-3);
}

/* 截屏时会长期停留在画面里，所以放右下角，不压页面标题 */
.toast {
  position: fixed; right: 28px; bottom: 28px;
  transform: translateY(12px);
  background: var(--ink); color: var(--surface);
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; line-height: 1.5;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 60; max-width: min(420px, 80vw);
  box-shadow: var(--sh-3);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--danger-ink); }

/* ---------------- 分功能额度弹窗 ---------------- */
.modal.wide { max-width: 980px; }
.modal.wide .modal-body { max-height: 66vh; overflow: auto; padding: 16px 22px; }

.q-table { width: 100%; border-collapse: collapse; }

/* 额度表在窄屏放不下三列（接口说明 + 勾选/额度/并发 + 用量），
 * 让表格自己在容器内横向滚动，而不是把整个弹窗撑出屏幕——
 * 弹窗整体横滚会把「取消/保存」也一起拖走，更容易误操作。 */
.q-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 560px) {
  .q-table { min-width: 380px; }
  .q-table th, .q-table td { padding: 7px 6px; }
  /* 手机上额度/并发输入框收窄，并把「今日 x」藏掉：
   * 同一行末尾已经有累计用量，「今日」在这个宽度下挤不出位置。 */
  .q-table .q-in { width: 52px; padding: 4px 6px; }
  .q-table .q-fields { gap: 4px; }
  .q-table .q-used { display: none; }
  .q-table .q-field { font-size: 11.5px; gap: 3px; }
  .q-scroll-hint { display: block; }
}
/* 横滑提示：只在真的放不下时才出现，桌面上不占位置 */
.q-scroll-hint { display: none; font-size: 11.5px; color: var(--ink-4); margin: 6px 0 0; }
.q-table th {
  font-size: 12px; color: var(--ink-3); font-weight: 520; text-align: left;
  padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.q-table td { padding: 7px 8px; border-bottom: 1px solid var(--surface-5); font-size: 13px; vertical-align: middle; }
.q-cell { display: flex; align-items: center; gap: 6px; }
.q-fields { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.q-field { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-4); white-space: nowrap; }
.q-in {
  width: 74px; padding: 5px 7px;
  border: 1px solid var(--line-2); border-radius: 7px;
  font-size: 12.5px; font-family: inherit; color: var(--ink);
  background: var(--field);
}
.q-in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 111, 232, .11); background: var(--surface); }
.q-in-qps { width: 56px; }
.q-used { font-size: 11.5px; color: var(--ink-4); white-space: nowrap; }

/* 额度池：几个接口共用一份额度时，池这一行下面挂各成员自己的用量。
   额度合并了，明细不能一起消失——否则客户看到「今天用了 3000」却不知道是谁用的。 */
.q-pool-tag {
  font-size: 10.5px; margin-left: 6px; padding: 1px 6px;
  background: rgba(29, 111, 232, .1); color: var(--brand-ink);
  border: 1px solid rgba(29, 111, 232, .22); border-radius: 4px;
  font-weight: 500; vertical-align: 1px;
}
.q-pool-members {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px;
  font-size: 11.5px; color: var(--ink-3);
}
.q-member { display: inline-flex; align-items: baseline; gap: 5px; }
.q-member b { color: var(--ink-2); font-weight: 560; font-size: 11.5px; }
.q-member i { font-style: normal; color: var(--ink-4); font-size: 11px; }
.q-sw input { width: 14px; height: 14px; cursor: pointer; accent-color: var(--brand); }
.q-na { color: var(--ink-4); font-size: 12.5px; }
.quota-legend { font-size: 12.5px; color: var(--ink-3); line-height: 1.85; margin: 0 0 12px; }

/* KEY 设置弹窗：把「基本信息」和「接口额度」分成两块。
 * 用一条淡分隔线 + 小标题，让用户一眼看出这次保存会同时改哪些东西。 */
.ks-block + .ks-block {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}
.ks-title {
  font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.ks-title::before {
  content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--brand);
}
/* 基本信息用两列排：宽弹窗下单列输入框会拉成 1000px 宽，
 * 「KEY 名称」这种十几个字的字段配一条长条输入框既难看也容易点错。
 * 白名单和 AppID 跨两列（内容本来就长）。 */
.ks-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px;
}
.ks-form > * { min-width: 0; }
.ks-form .ks-span2 { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .ks-form { grid-template-columns: 1fr; }
  .ks-form .ks-span2 { grid-column: auto; }
}

/* 客户链接弹窗顶部的 AK 块：与下面两张链接卡区分开，用品牌浅底强调
   「这是要复制给客户的东西」，同时和链接卡之间留出间距。 */
.vl-ak {
  background: var(--brand-soft); border: 1px solid var(--line-3);
  border-radius: 10px; padding: 11px 13px; margin-bottom: 14px;
}
.vl-ak-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.vl-ak-head b { font-size: 13.5px; color: var(--brand-ink); }
.vl-ak-row { display: flex; gap: 8px; align-items: center; }
.vl-ak-row input {
  flex: 1 1 auto; min-width: 0;
  font-size: 12.5px; padding: 7px 10px; border: 1px solid var(--line-3); border-radius: 6px;
  background: #fff; color: var(--ink);
}
.vl-ak-row .btn { flex: 0 0 auto; }
@media (max-width: 480px) {
  /* 手机上 AK 值 + 按钮并排会把 AK 挤成省略号，改成上下两行 */
  .vl-ak-row { flex-direction: column; align-items: stretch; }
}

.q-days { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.q-days .q-in { width: 56px; }
.q-dates { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.q-date {
  border: 1px solid var(--line-2); border-radius: 7px; padding: 4px 6px;
  font-size: 12px; font-family: inherit; color: var(--ink-2); background: var(--field);
}
.q-date:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 111, 232, .11); }
.q-dash { color: var(--ink-4); font-size: 12px; }
.q-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.q-tools-tip { font-size: 12px; color: var(--ink-4); }
/* 「KEY 有效期（剩余天数）」这类行内标签不能被压成竖排，
 * 后面的说明文字要能折行而不是撑出弹窗（手机上原来横向溢出）。 */
.q-tools > label { flex-wrap: wrap; }
.q-tools > label > b { flex: 0 0 auto; white-space: nowrap; }
.q-tools .q-used { min-width: 0; }
.q-keydays {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px;
}
.q-keydays > b { flex: 0 0 auto; white-space: nowrap; }
.q-keydays .q-in { width: 90px; }
@media (max-width: 560px) {
  /* 窄屏下说明文字放不下与输入框同一行，改成上下：标题一行、输入框+单位一行、说明换行 */
  .q-keydays { align-items: flex-start; }
  .q-keydays .q-used { flex-basis: 100%; line-height: 1.7; }
}

/* ---------------- 密钥卡片（一 KEY 一卡，一接口一行） ---------------- */
.keycard { margin-bottom: 16px; overflow: hidden; }
.keycard + .keycard { margin-top: 0; }

.kc-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px 13px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.kc-id { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kc-name { font-size: 15.5px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.kc-owner { font-size: 12px; color: var(--ink-4); }
.kc-meta { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
.kc-meta b { color: var(--ink-2); font-weight: 560; }
.kc-dot { color: var(--line-2); }
.kc-head .actions { margin-left: auto; }
.kc-progress { padding: 0 20px; }
.kc-progress .progress { height: 3px; background: var(--surface-5); }

.kc-table-wrap { overflow-x: auto; padding: 4px 12px 12px; }

/* 调用来源表的窄屏适配：5 列在手机上挤到只剩前两列，
   而 IP 恰恰是这一页最想看的。手机上把「最后调用」收掉（这张表按次数排序，
   时间只是辅助信息），   保留「调用端 / 域名 / IP / 次数」，并让域名可以折行。 */
@media (max-width: 560px) {
  /* 表格自己滚动，而不是让整个弹窗横滚：弹窗横滚会连标题和按钮一起拖走，
     手机上很容易划丢「关闭」。这里给表格一个最小宽度，超出部分在容器内横滑。 */
  .origins-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
  .origins-table { font-size: 12px; min-width: 520px; }
  /* 手机上 5 列必然放不下，给出「可以左右滑」的提示，否则客户只会看到前两列 */
  .origins-scroll-hint { display: block !important; color: var(--ink-4); font-size: 11.5px; }
  .origins-table th, .origins-table td { padding: 8px 6px; white-space: nowrap; }
  .origins-table .col-time { display: none; }
  .origins-table td:nth-child(2) { word-break: break-all; }
  /* 顶部两个提示块：「怎么看」这类两字标签在窄屏会被挤成竖排，改成上下布局 */
  .notice { flex-direction: column; gap: 4px; }
  .notice > span { font-weight: 600; }
}
/* 接口明细默认收起：一屏 30 多行表格会把密钥卡片撑成一面墙，
   先把「几个接口开着、今天用了多少」放在摘要里，要点进去才展开细账。 */
.kc-detail-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 20px; border-top: 1px solid var(--line); background: var(--surface);
}
.kc-toggle {
  display: flex; align-items: center; gap: 7px;
  background: transparent; border: 0; cursor: pointer; font: inherit;
  color: var(--ink-2); font-size: 12.5px; font-weight: 540; padding: 2px 0;
}
.kc-toggle:hover { color: var(--ink); }
.kc-caret { color: var(--ink-4); font-size: 10px; width: 9px; display: inline-block; }
.kc-sum { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.kc-detail-hint { font-size: 11.5px; color: var(--ink-4); margin-left: auto; }
.kc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 900px; }
.kc-table th {
  font-size: 11.5px; color: var(--ink-4); font-weight: 520;
  padding: 9px 8px 7px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.kc-table td { padding: 9px 8px; border-bottom: 1px solid var(--surface-5); vertical-align: middle; }
.kc-table tbody tr:last-child td { border-bottom: 0; }
.kc-table tbody tr:hover { background: var(--surface-3); }
.kc-table .kc-time { color: var(--ink-4); font-size: 11.5px; white-space: nowrap; }
.kc-table .progress { height: 5px; }
.kc-used { font-size: 11px; color: var(--ink-4); margin-top: 3px; white-space: nowrap; }
.kc-other td { background: var(--surface-3); color: var(--ink-4); }
/* 来源域名不在白名单：整行淡红，配合右侧「不在白名单」标签，一眼能定位 */
.kc-table tbody tr.kc-warn td { background: #fff6f5; }
.kc-table tbody tr.kc-warn:hover td { background: #ffefed; }
.kc-tip { text-align: center; color: var(--ink-4); font-size: 12.5px; padding: 12px 0; }

.ak-link {
  font-family: var(--mono);
  font-size: 11.5px; color: var(--brand); cursor: pointer;
  border-bottom: 1px dashed currentColor; padding-bottom: 1px;
  text-decoration: none !important;
}
.ak-link:hover { color: var(--brand-ink); }
/* 同一 KEY 的接口行：AK 只在首行显示，其余行标「同上」，避免重复的等宽长串 */
.kc-same { font-size: 11.5px; color: var(--ink-4); }

/* 账户信息表：左列字段名 */
.acc-k { color: var(--ink-3); width: 42%; white-space: nowrap; }

/* ---------------- 分接口用量趋势图表 ---------------- */
.uc-filters {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px; margin: 14px 0 6px;
}
.uc-sel {
  height: 36px; padding: 0 11px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--field); color: var(--ink); font-size: 13px;
  max-width: 280px; font-family: inherit;
}
.uc-sel:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 111, 232, .11); }
.uc-tabs {
  display: inline-flex; border: 1px solid var(--line-2);
  border-radius: 9px; overflow: hidden; background: var(--field);
}
.uc-tabs button {
  border: none; background: transparent; padding: 8px 16px;
  font-size: 13px; font-family: inherit; color: var(--ink-2); cursor: pointer;
  transition: background .15s, color .15s;
}
.uc-tabs button + button { border-left: 1px solid var(--line-2); }
.uc-tabs button:hover { background: var(--surface-4); }
.uc-tabs button.on { background: var(--ink); color: var(--surface); font-weight: 560; }
.uc-chart { margin-top: 8px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1120px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .content { padding: 28px 28px 64px; }
}

@media (max-width: 900px) {
  .auth-side { display: none; }
  .auth-main { flex: 1 1 100%; padding: 32px 20px; }
}

@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: static;
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: 14px 16px 12px;
  }
  .sidebar .brand-mark { margin-bottom: 12px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
  .nav-item { white-space: nowrap; padding: 8px 12px; }
  .sidebar-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 12px; padding-top: 12px; gap: 12px;
  }
  .who { margin-bottom: 0; }
  .content { padding: 20px 16px 56px; max-width: none; }
  .page-head h2 { font-size: 21px; }
  .grid-4 { grid-template-columns: 1fr; }
  .stat .v { font-size: 25px; }
  th:nth-child(4), td:nth-child(4) { display: none; }
  .kc-head .actions { margin-left: 0; width: 100%; }
  .kc-table { min-width: 780px; }
  .modal.wide .modal-body { max-height: 72vh; }
}

@media (max-width: 480px) {
  .auth-card { padding: 26px 20px; border-radius: 14px; }
  .auth-card-head h2 { font-size: 19px; }
  .card-pad { padding: 18px 16px; }
  .btn { padding: 9px 14px; font-size: 13.5px; }
  .toast { max-width: calc(100vw - 32px); right: 16px; bottom: 20px; }
}

/* ---------------- 审核中页面 ----------------
   申请制的落地面：只展示提交信息与联系方式，不带任何功能入口。
   视觉上沿用 auth 卡片，避免出现"第三种界面风格"让客户以为进了别的系统。 */
.pending-body { display: grid; gap: 14px; }
.pending-list { margin: 0; padding: 14px 16px; display: grid; gap: 11px;
  background: var(--bg-soft, #f7f8fa); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pending-row { display: flex; gap: 12px; align-items: baseline; font-size: 13px; }
.pending-row dt { flex: 0 0 84px; margin: 0; color: var(--ink-3); }
.pending-row dd { margin: 0; color: var(--ink); font-weight: 520; word-break: break-all; }
.pending-note {
  padding: 13px 15px; border-radius: var(--radius-sm);
  background: rgba(240, 180, 60, .08); border: 1px solid rgba(240, 180, 60, .28);
  font-size: 12.5px; line-height: 1.75; color: var(--ink-2);
}
.pending-body .btn-block + .btn-block { margin-top: 2px; }

/* ---------------- 回收站 ----------------
   删除 KEY 改为软删除后，密钥页底部多一个折叠区。
   默认收起（避免占版面），标题行本身就是展开按钮。 */
.trash-zone {
  margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.trash-head {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 13px 16px; background: transparent; border: 0; cursor: pointer;
  font: inherit; text-align: left; color: var(--ink);
}
.trash-head:hover { background: var(--surface-5); }
.trash-caret { color: var(--ink-3); font-size: 11px; width: 10px; }
.trash-title { font-weight: 560; font-size: 13.5px; }
.trash-hint { font-size: 12.5px; color: var(--ink-3); }
.trash-body { border-top: 1px solid var(--line); }
.trash-body .kc-table { width: 100%; }
.trash-empty { padding: 22px 16px; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.kc-masked { cursor: pointer; letter-spacing: 1px; color: var(--ink-3); }
.kc-masked:hover { color: var(--ink-2); }
.trash-body td.actions { display: flex; gap: 6px; white-space: nowrap; }
