:root {
  --indigo: #4f46e5;
  --indigo-dark: #3730a3;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f7fb;
  --card: #ffffff;
  --green: #10b981;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
code { font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; font-size: 0.92em; }

/* 导航 */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.2px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--indigo), #7c3aed);
  display: grid;
  place-items: center;
}
.brand-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a:hover { color: var(--indigo); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-primary { background: var(--indigo); color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, 0.24); }
.btn-primary:hover { background: var(--indigo-dark); }
.btn-light { background: #fff; color: var(--indigo-dark); }
.btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }

/* 首屏 */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, #312e81 0%, #4338ca 52%, #6366f1 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 72%);
}
.hero-inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px 84px;
}
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 12px;
  letter-spacing: 0.4px;
}
.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -1.5px;
}
.hero-sub {
  margin: 0;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.8;
}
.hero-actions { display: flex; gap: 12px; margin-top: 30px; }
.hero-stats {
  display: flex;
  gap: 44px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 600px;
}
.hero-stats div { display: flex; flex-direction: column; gap: 4px; }
.hero-stats strong { font-size: 20px; }
.hero-stats span { font-size: 12px; color: rgba(255, 255, 255, 0.66); }

/* 区块 */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 24px 8px;
}
.section-head { margin-bottom: 26px; }
.section-head h2 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -0.5px;
}
.section-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.section-head p a { color: var(--indigo); font-weight: 600; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 演示区 */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.demo-grid > .card { padding: 24px; }

.field-label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.field-label:not(:first-child) { margin-top: 18px; }

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fbfcfe;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus,
.textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  background: #fff;
}
.textarea { resize: vertical; line-height: 1.6; }

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}
.hint { font-size: 12px; color: var(--muted); }

/* 结果 */
.result-card { min-height: 300px; display: flex; flex-direction: column; }
.empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
}
.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--indigo);
  background: rgba(79, 70, 229, 0.1);
}
.empty p { margin: 0 0 6px; font-weight: 600; color: #334155; }
.empty span { font-size: 12px; }

.result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.tag {
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--indigo-dark);
  font-size: 12px;
  font-weight: 600;
}
.result-meta { margin-left: auto; font-size: 12px; color: var(--muted); }

.cover {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #eef2f7;
  display: block;
}
.result-title {
  margin: 14px 0 6px;
  font-size: 16px;
  line-height: 1.5;
  word-break: break-word;
}
.result-author { margin: 0 0 16px; font-size: 13px; color: var(--muted); }

.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1; font-size: 12px; }
.copy-row .btn { white-space: nowrap; padding: 10px 14px; }
.link-row { display: flex; gap: 10px; margin-top: 16px; }
.link-row a { font-size: 13px; color: var(--indigo); font-weight: 600; }
.link-row a:hover { text-decoration: underline; }

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.image-grid figure {
  position: relative;
  margin: 0;
}
.image-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.image-download {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
}
.image-download:hover {
  background: rgba(17, 24, 39, 0.9);
  text-decoration: none !important;
}

.error-box {
  margin: auto;
  text-align: center;
  max-width: 320px;
}
.error-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fef2f2;
  color: #dc2626;
  font-size: 22px;
  font-weight: 700;
}
.error-box h3 { margin: 0 0 8px; font-size: 15px; }
.error-box p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* 文档 */
.doc-card { padding: 26px; }
.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.endpoint code { font-size: 15px; font-weight: 600; }
.method {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.method.post { background: var(--green); }
.tag-soft {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 999px;
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 6px 0 20px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--muted); font-weight: 600; background: #fafbfd; white-space: nowrap; }
td code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 5px;
  color: #334155;
}

.code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.code-block {
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
}
.code-title {
  padding: 10px 16px;
  font-size: 12px;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.7;
}
.code-block code { font-size: 12px; }

.doc-note {
  padding: 14px 16px;
  border-radius: 10px;
  background: #f8faff;
  border: 1px solid #e0e7ff;
  font-size: 13px;
  color: #475569;
  line-height: 1.8;
}
.doc-note code {
  background: #eef2ff;
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--indigo-dark);
}

/* 套餐 */
.pricing-groups { display: flex; flex-direction: column; gap: 30px; }
.pricing-group-title { margin: 0; font-size: 18px; letter-spacing: -0.3px; }
.pricing-group-sub { margin: 6px 0 14px; color: var(--muted); font-size: 13px; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.plan {
  padding: 26px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.plan.featured { border-color: var(--indigo); box-shadow: 0 16px 40px rgba(79, 70, 229, 0.14); }
.plan-flag {
  position: absolute;
  top: -11px;
  right: 20px;
  background: var(--indigo);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.plan-name { font-size: 14px; color: var(--muted); font-weight: 600; }
.plan-limit {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 12px 0 18px;
}
.plan-limit strong { font-size: 34px; letter-spacing: -1px; }
.plan-limit span { font-size: 13px; color: var(--muted); }
.plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  font-size: 13px;
  color: #475569;
  line-height: 2.1;
  flex: 1;
}
.plan ul li::before { content: "✓"; color: var(--green); margin-right: 8px; font-weight: 700; }

/* 控制台 */
.console-card { padding: 24px; }
.console-row { display: flex; gap: 10px; }
.console-row .input { flex: 1; }
.usage-result { margin-top: 18px; }
.usage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.usage-item {
  padding: 16px;
  border-radius: 10px;
  background: #f8faff;
  border: 1px solid #e8edf7;
}
.usage-item span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.usage-item strong { font-size: 18px; }

/* 页脚 */
.footer {
  margin-top: 72px;
  background: #0f172a;
  color: #cbd5e1;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer strong { color: #fff; font-size: 15px; }
.footer p { margin: 6px 0 0; font-size: 12px; }
.disclaimer { max-width: 560px; line-height: 1.8; color: #94a3b8; }

/* 提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  background: #0f172a;
  color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 响应式 */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .demo-grid, .code-grid, .pricing-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .usage-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; }
}
@media (max-width: 560px) {
  .hero-inner { padding: 52px 20px 64px; }
  .hero-actions { flex-wrap: wrap; }
  .section { padding-top: 48px; }
  .usage-grid { grid-template-columns: 1fr; }
  .console-row { flex-direction: column; }
}

/* 登录 / 注册 */
.auth-main {
  min-height: calc(100vh - 61px);
  display: grid;
  place-items: center;
  padding: 48px 20px;
}
.auth-card { width: 100%; max-width: 420px; padding: 28px; }
.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 10px;
  background: #f1f5f9;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  border: 0;
  padding: 9px 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.auth-tab.active { background: #fff; color: var(--indigo-dark); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08); }
.btn-block { width: 100%; margin-top: 22px; }
.auth-msg { margin: 14px 0 0; min-height: 18px; font-size: 13px; color: #dc2626; }
.auth-msg.ok { color: var(--green); }
.auth-foot { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--indigo); font-weight: 600; }

/* 控制台 / 后台 */
.page-shell { max-width: 1120px; margin: 0 auto; padding: 40px 24px 72px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-head h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.5px; }
.page-head p { margin: 0; font-size: 14px; color: var(--muted); }
.user-chip { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--indigo), #7c3aed);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card { padding: 18px 20px; }
.stat-card span { display: block; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.stat-card strong { font-size: 24px; letter-spacing: -0.5px; }
.stat-card.brand strong { color: var(--indigo); }

.progress { height: 8px; margin-top: 12px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--indigo), #7c3aed); }

.card-block { padding: 22px 24px; margin-bottom: 20px; }
.card-block h2 { margin: 0 0 6px; font-size: 17px; }
.card-block .sub { margin: 0 0 16px; font-size: 13px; color: var(--muted); line-height: 1.7; }

.key-display { display: flex; gap: 8px; flex-wrap: wrap; }
.key-display .input {
  flex: 1;
  min-width: 240px;
  font-family: "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 12px;
}

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { max-width: 280px; }
.toolbar .spacer { flex: 1; }
.select {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.status.off::before { background: #cbd5e1; }
.status.warn { color: #b45309; }
.status.warn::before { background: #f59e0b; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.date-input { padding: 6px 8px; max-width: 150px; font-size: 12px; }
.btn-danger { background: #fff; color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.data-table td { white-space: nowrap; }
.data-table td .email { display: block; font-size: 12px; color: var(--muted); }
.empty-row { padding: 30px 0; text-align: center; color: var(--muted); }
.mono { font-family: "SF Mono", "JetBrains Mono", Menlo, monospace; font-size: 12px; }

.mini-result {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e8edf7;
  border-radius: 10px;
  background: #f8faff;
  font-size: 13px;
}
.mini-result h4 { margin: 0 0 6px; font-size: 14px; word-break: break-word; }
.mini-result p { margin: 0 0 10px; color: var(--muted); }
.mini-result .link-row { margin-top: 10px; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-shell { padding: 28px 20px 56px; }
  .key-display .input { min-width: 0; }
}

/* 管理后台 */
.admin-body { background: #f4f6fb; }
.admin-login[hidden],
.admin-shell[hidden],
.admin-view[hidden] { display: none; }

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 232px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--line);
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 18px;
}
.admin-brand strong { display: block; font-size: 15px; }
.admin-brand span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.admin-nav { display: flex; flex-direction: column; gap: 4px; padding: 6px 12px; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.admin-nav-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-nav-item:hover { background: #f5f7fb; color: var(--indigo); }
.admin-nav-item.active { background: rgba(79, 70, 229, 0.1); color: var(--indigo-dark); }

.admin-sidebar-foot { margin-top: auto; padding: 16px; border-top: 1px solid var(--line); }
.admin-account { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.admin-account strong { display: block; font-size: 13px; }
.admin-account .role { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.admin-sidebar-foot .btn { width: 100%; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.admin-topbar h1 { margin: 0; font-size: 18px; letter-spacing: -0.3px; }
.admin-topbar .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.admin-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  place-items: center;
}
.admin-menu-btn svg { width: 18px; height: 18px; fill: none; stroke: #334155; stroke-width: 2; stroke-linecap: round; }

.admin-content { width: 100%; max-width: 1280px; padding: 24px; }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-columns .card-block { margin-bottom: 20px; }

.admin-stats .stat-card { display: flex; align-items: center; gap: 14px; }
.stat-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
}
.stat-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.stat-icon.indigo { background: rgba(79, 70, 229, 0.1); color: var(--indigo); }
.stat-icon.green { background: rgba(16, 185, 129, 0.12); color: #059669; }
.stat-icon.sky { background: rgba(14, 165, 233, 0.12); color: #0284c7; }
.stat-icon.amber { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.stat-label { margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.admin-stats .stat-card strong { font-size: 22px; }

.block-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.block-head .sub { margin-bottom: 0; }
.block-head + .toolbar,
.block-head + .table-wrap { margin-top: 16px; }

.plan-bars { margin-top: 6px; }
.plan-bar { margin-bottom: 16px; }
.plan-bar:last-child { margin-bottom: 0; }
.plan-bar-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; color: #475569; }
.plan-bar-track { height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.plan-bar-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--indigo), #7c3aed); }

.usage-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.usage-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.usage-rank {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.usage-rank.top { background: rgba(79, 70, 229, 0.12); color: var(--indigo-dark); }
.usage-info { min-width: 0; flex: 1; }
.usage-info strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-info span { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-count { font-size: 13px; font-weight: 600; color: var(--indigo-dark); }

.platform-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 6px; }
.platform-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.platform-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.platform-dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14); }
.platform-item strong { display: block; font-size: 13px; }
.platform-item span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.table-user strong { display: block; font-size: 13px; }
.table-user span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.key-chip {
  padding: 4px 8px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font-family: "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 12px;
  cursor: pointer;
}
.key-chip:hover { border-color: var(--indigo); color: var(--indigo-dark); }

.endpoint-list { display: flex; flex-direction: column; gap: 10px; }
.endpoint-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  flex-wrap: wrap;
}
.endpoint-row code { font-size: 13px; font-weight: 600; }
.endpoint-desc { flex: 1; min-width: 160px; font-size: 12px; color: var(--muted); }
.method.get { background: #0ea5e9; }

/* 后台登录 */
.admin-login {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 46%, #4338ca 100%);
}
.admin-login::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 10%, transparent 72%);
}
.admin-login-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 32px 30px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
}
.admin-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.admin-login-brand strong { display: block; font-size: 17px; }
.admin-login-brand span { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.admin-login-sub { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.admin-login-back { display: block; margin-top: 18px; text-align: center; font-size: 12px; color: var(--muted); }
.admin-login-back:hover { color: var(--indigo); }

.admin-sidebar-close {
  display: none;
  margin-left: auto;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
}
.admin-sidebar-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.admin-overlay { display: none; }

@media (max-width: 960px) {
  .admin-menu-btn { display: grid; }
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 60;
    width: min(280px, 80vw);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 20px 0 50px rgba(15, 23, 42, 0.16);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-close { display: grid; }
  .admin-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(15, 23, 42, 0.44);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .admin-overlay.open { opacity: 1; pointer-events: auto; }
  body.nav-locked { overflow: hidden; }
  .admin-topbar { padding: 0 16px; }
  .admin-content { padding: 16px; }
  .admin-columns { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .admin-topbar h1 { font-size: 16px; }
  .topbar-right .tag-soft { display: none; }
  .admin-stats { grid-template-columns: 1fr; }
  .endpoint-row .method { order: 0; }
}

/* 用户中心 */
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.info-list { display: flex; flex-direction: column; gap: 12px; }
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.info-row:last-child { padding-bottom: 0; border-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row strong { text-align: right; word-break: break-all; }
.usage-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.usage-line strong { font-size: 22px; letter-spacing: -0.5px; }
.usage-line span { font-size: 12px; color: var(--muted); }
.admin-login-card .auth-tabs { margin-top: 2px; }
.admin-login-card .field-label { margin-top: 16px; }
.admin-login-card .field-label:first-child { margin-top: 0; }

.account-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.account-form {
  max-width: 420px;
}
.account-form .input { width: 100%; }
.account-form .btn { margin-top: 22px; }

/* 解析记录 / IP 管理 */
.result-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.result-pill.ok { background: rgba(16, 185, 129, 0.12); color: #047857; }
.result-pill.fail { background: #fef2f2; color: #b91c1c; }
.log-url {
  display: block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}
.ip-cell .mono { display: block; font-size: 12px; }
.ip-cell .ip-region {
  display: block;
  max-width: 240px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: normal;
}
.ip-rules { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 12px;
}
.ip-chip.black { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.ip-chip.white { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.ip-chip button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}
.ip-chip button:hover { opacity: 1; }

/* 视频号登录态 */
.yuanbao-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.yuanbao-qr { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.yuanbao-qr img { width: 200px; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

/* hidden 属性需优先于 .btn / .yuanbao-qr 的 display 规则 */
[hidden] { display: none !important; }

/* 后台告警条 */
.admin-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid #f3c4bf;
  border-radius: 12px;
  background: #fef3f2;
}
.admin-alert::before { content: ''; width: 8px; height: 8px; flex: none; border-radius: 50%; background: #c0392b; }
.admin-alert.ok { border-color: #bfe3cb; background: #f0faf3; }
.admin-alert.ok::before { background: #1f9d55; }
.admin-alert strong { display: block; font-size: 14px; color: #8a2c1d; }
.admin-alert span { display: block; margin-top: 4px; font-size: 13px; color: #a4453a; }
.admin-alert.ok strong { color: #17663a; }
.admin-alert.ok span { color: #2c7a4b; }
.admin-alert .btn { margin-left: auto; background: #c0392b; border-color: #c0392b; color: #fff; }
.admin-alert .btn:hover { background: #a93226; border-color: #a93226; }

/* 会员权益 */
.benefit-cell { display: flex; flex-direction: column; gap: 2px; }
.benefit-cell strong { font-size: 13px; }
.benefit-cell .hint { font-size: 11px; }

/* 套餐商品（后台开通弹窗 / 用户中心购买） */
.product-groups { display: flex; flex-direction: column; gap: 26px; margin-top: 4px; }
.product-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.product-group-head strong { font-size: 15px; }
.product-group-head .hint { font-size: 12px; }
.product-group .product-grid { margin-top: 0; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card::after {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.08), transparent 70%);
  pointer-events: none;
}
.product-card:hover { border-color: #c7d2fe; box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08); transform: translateY(-2px); }
.product-card.active {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  background: linear-gradient(180deg, #f7f7ff 0%, #fff 55%);
}
.product-card:disabled { cursor: default; opacity: 0.7; }
.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.product-badge-inline {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--indigo-dark);
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.product-name {
  margin: 0 0 10px;
  padding-right: 60px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.product-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 14px; white-space: nowrap; }
.product-price .cur { font-size: 15px; font-weight: 700; color: var(--indigo-dark); }
.product-price strong { font-size: 28px; letter-spacing: -0.8px; color: var(--indigo-dark); line-height: 1; }
.product-price .per { font-size: 12px; color: var(--muted); }
.product-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.product-features li {
  position: relative;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
}
.product-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.18);
}
.product-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--line);
}
.product-foot .hint { font-size: 11px; }
.product-cta { font-size: 12px; font-weight: 700; color: var(--indigo); }

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
}
.modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-head .hint { display: block; margin-top: 4px; font-size: 12px; }
.modal-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.grant-tip {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 12px;
  line-height: 1.6;
}
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.modal-actions { display: flex; gap: 10px; }

@media (max-width: 760px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .modal-foot { flex-direction: column; align-items: stretch; }
  .modal-actions { justify-content: flex-end; }
}

/* 支付方式 */
.pay-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pay-row .field-label { margin: 0; }
.pay-methods { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-method {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.pay-method.active { border-color: var(--indigo); background: rgba(79, 70, 229, 0.08); color: var(--indigo-dark); }
.pay-method:disabled { cursor: not-allowed; opacity: 0.55; }

/* 套餐管理表单 */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 14px;
}
.form-grid .field-label { margin: 0 0 6px; }
.form-grid .input,
.form-grid .select { width: 100%; }
.form-full { display: block; margin-top: 14px; }
.form-full .field-label { margin: 0 0 6px; }
.form-grid .form-full { grid-column: 1 / -1; margin-top: 0; }
.form-grid .textarea { width: 100%; }

@media (max-width: 900px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* 余额充值 */
.recharge-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 28px;
  margin-top: 18px;
}
.amount-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.amount-chip {
  min-width: 72px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.amount-chip:hover { border-color: #c7d2fe; }
.amount-chip.active { border-color: var(--indigo); background: rgba(79, 70, 229, 0.08); color: var(--indigo-dark); }
.qr-box {
  width: 200px;
  min-height: 200px;
  margin-top: 8px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  display: grid;
  place-items: center;
  text-align: center;
}
.qr-box img { width: 100%; border-radius: 8px; display: block; }

@media (max-width: 760px) {
  .recharge-grid { grid-template-columns: 1fr; }
}

/* 字幕生成进度 */
.task-progress {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f6f8fc;
  border: 1px solid #e6ecf5;
}
.task-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}
.task-progress-head span:last-child {
  color: var(--indigo);
  font-variant-numeric: tabular-nums;
}
.task-progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e4eaf4;
  overflow: hidden;
}
.task-progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--indigo), #7c3aed);
  transition: width 0.4s ease;
}
.task-progress.indeterminate .task-progress-track i {
  width: 35%;
  animation: taskProgressSlide 1.4s ease-in-out infinite;
}
.task-progress p {
  margin: 8px 0 0;
}
@keyframes taskProgressSlide {
  from { transform: translateX(-100%); }
  to { transform: translateX(320%); }
}
@media (max-width: 640px) {
  .task-progress { padding: 12px 14px; }
  .task-progress-head { font-size: 12px; }
}

/* 字幕生成进度 */
.task-progress {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f6f8fc;
  border: 1px solid #e6ecf5;
}
.task-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}
.task-progress-head span:last-child {
  color: var(--indigo);
  font-variant-numeric: tabular-nums;
}
.task-progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e4eaf4;
  overflow: hidden;
}
.task-progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--indigo), #7c3aed);
  transition: width 0.4s ease;
}
.task-progress.indeterminate .task-progress-track i {
  width: 35%;
  animation: taskProgressSlide 1.4s ease-in-out infinite;
}
.task-progress p {
  margin: 8px 0 0;
}
@keyframes taskProgressSlide {
  from { transform: translateX(-100%); }
  to { transform: translateX(320%); }
}
@media (max-width: 640px) {
  .task-progress { padding: 12px 14px; }
  .task-progress-head { font-size: 12px; }
}

/* 今日行情 */
.price-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.price-toolbar .select {
  min-width: 110px;
}
.price-section-title {
  margin: 22px 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.price-section-title .hint {
  margin-left: 8px;
  font-weight: 500;
}
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.price-grid.gold {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.price-tile {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.price-tile .label {
  font-size: 12px;
  color: var(--muted);
}
.price-tile .value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.price-tile .unit {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.price-change {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
}
.price-change.up { color: #e11d48; }
.price-change.down { color: #059669; }
@media (max-width: 900px) {
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-grid.gold { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .block-head .price-toolbar { width: 100%; }
  .price-toolbar .select { flex: 1; }
  .price-grid { grid-template-columns: 1fr; }
}

/* 今日行情 */
.price-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.price-toolbar .select {
  min-width: 110px;
}
.price-section-title {
  margin: 22px 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.price-section-title .hint {
  margin-left: 8px;
  font-weight: 500;
}
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.price-grid.gold {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.price-tile {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.price-tile .label {
  font-size: 12px;
  color: var(--muted);
}
.price-tile .value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.price-tile .unit {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.price-change {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
}
.price-change.up { color: #e11d48; }
.price-change.down { color: #059669; }
@media (max-width: 900px) {
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-grid.gold { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .block-head .price-toolbar { width: 100%; }
  .price-toolbar .select { flex: 1; }
  .price-grid { grid-template-columns: 1fr; }
}
.price-grid.silver {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) {
  .price-grid.silver { grid-template-columns: 1fr; }
}
.price-grid.silver {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) {
  .price-grid.silver { grid-template-columns: 1fr; }
}

/* 接口商店 */
.price-locked {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
.price-locked strong { font-size: 14px; color: var(--ink); }
.price-locked p { margin: 0; font-size: 13px; color: var(--muted); }
.api-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.api-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.api-card.is-expired {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.08);
}
.api-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo), #7c3aed);
}
.api-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.api-head strong { font-size: 16px; }
.api-desc {
  margin: 0;
  min-height: 44px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.api-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--muted);
}
.api-expiry { margin: 0; font-size: 12px; color: var(--muted); }
.api-price {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}
.api-price strong { font-size: 22px; letter-spacing: -0.5px; }
.api-price span { font-size: 12px; color: var(--muted); }
.api-coin strong { color: #b45309; }
.api-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.api-actions .btn { flex: 1; min-width: 120px; }
.notice-banner {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
}
.notice-banner p { margin: 4px 0; }
.batch-users {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
  max-height: 260px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
}
.batch-user { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.batch-user span { display: flex; flex-direction: column; }
@media (max-width: 900px) {
  .api-grid { grid-template-columns: 1fr; }
  .batch-users { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .batch-users { grid-template-columns: 1fr; }
}

/* 概览：我的接口权限 */
.api-mini-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.api-mini-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
}
.api-mini-name { font-size: 14px; }
.api-mini-meta { color: var(--muted); }
.api-mini-usage { margin-left: auto; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .api-mini-usage { margin-left: 0; }
}
.api-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.key-quick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.key-quick-row code {
  flex: 1;
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
  overflow: auto;
}
.key-api-picker {
  margin-bottom: 12px;
}
.key-api-picker .select {
  max-width: 360px;
}
