/* ============================================================
   金聚沣华数字平台 · 样式表
   公开站点：亮色主题（蓝紫渐变 Hero + 白色导航）
   后台管理：暗色主题（:root 亮色变量 + body.admin-body 暗色覆盖）
   ============================================================ */

/* ---------- 亮色主题变量（设计稿 · 深蓝主色体系） ---------- */
:root {
  /* 主色调（Hero 渐变来源） */
  --primary: #065A82;
  --secondary: #1C7293;
  --accent: #21295C;
  --hero-gradient: linear-gradient(135deg, #065A82 0%, #1C7293 50%, #21295C 100%);
  --hero-highlight: #7DD3FC;
  /* 中性色 */
  --light: #F0F7FA;
  --light-accent: #E8F4F8;
  --white: #FFFFFF;
  --dark: #1F2329;
  --gray: #6B7280;
  --light-gray: #E5E7EB;
  --footer-bg: #0F172A;
  /* 状态色 */
  --success: #10B981;
  --success-bg: #DCFCE7;
  --success-strong: #16A34A;
  --warning: #F59E0B;
  --danger: #EF4444;
  /* 业务色 */
  --price: #065A82;          /* 价格用主色，保持深蓝体系 */
  --price-soft: #E8F4F8;
  /* 代码块 */
  --code-bg: #0d0d12;
  --code-text: #d7d7dc;
  /* 服务卡片图标色 */
  --icon-cyan-bg: #E0F2FE;
  --icon-cyan: #0284C7;
  --icon-green-bg: #DCFCE7;
  --icon-green: #16A34A;
  --icon-amber-bg: #FEF3C7;
  --icon-amber: #D97706;
  --icon-indigo-bg: #E0E7FF;
  --icon-indigo: #4F46E5;
  /* 兼容后台管理的变量名（公开站点用亮色值） */
  --bg: #FFFFFF;
  --panel: #FFFFFF;
  --panel-2: #F0F7FA;
  --border: #E5E7EB;
  --text: #1F2329;
  --muted: #6B7280;
  --radius: 12px;
}

/* ---------- 后台管理暗色主题覆盖 ---------- */
body.admin-body {
  --bg: #0b0b0f;
  --panel: #141419;
  --panel-2: #1b1b22;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f5f5f7;
  --muted: #86868b;
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, 0.14);
  --green: #30d158;
  --red: #ff453a;
  --amber: #ff9f0a;
  --purple: #bf5af2;
  --cyan: #30b0c7;
  --radius: 14px;
  overflow: hidden;
}

/* ---------- 基础重置与排版 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background: #fff;
}
body.admin-body { background: var(--bg); color: var(--text); }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

h1 { font-size: 42px; font-weight: 700; line-height: 1.3; }
h2 { font-size: 32px; font-weight: 700; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

/* ---------- 通用布局 ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 80px 32px 60px; }
.home-page main { max-width: none; padding: 0; }

.sub { color: var(--gray); margin-top: 8px; }
.muted { color: var(--gray); font-size: 13px; }
.inline { display: inline; }
.dot { margin: 0 10px; color: var(--gray); }
.empty { color: var(--gray); text-align: center; padding: 24px 0; }

.error {
  color: var(--danger); background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px; padding: 8px 14px; margin: 12px 0; font-size: 14px;
}
.ok-banner {
  color: var(--success); background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px; padding: 8px 14px; margin-bottom: 16px; font-size: 14px;
}
.ok { color: var(--success); }
.bad { color: var(--danger); }

section { margin-bottom: 48px; }
.row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 16px; }
.row-head .sub { margin: 0; }

/* ---------- 按钮（公开站点） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 20px; border-radius: 6px; font-size: 14px; font-weight: 500;
  transition: all 0.2s; cursor: pointer; border: none; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--secondary); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 12px 32px; font-size: 16px; border-radius: 8px; }
.btn-sm { padding: 4px 12px; font-size: 13px; border-radius: 6px; }

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  height: 64px; display: flex; align-items: center;
}
.nav .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: var(--primary); }
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.nav-menu { display: flex; gap: 32px; }
.nav-menu a { font-size: 15px; color: var(--dark); transition: color 0.2s; }
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.nav-link { font-size: 14px; color: var(--dark); }
.nav-link:hover { color: var(--primary); }
.navuser { font-size: 13px; color: var(--gray); }

/* ---------- HERO ---------- */
.hero {
  background: var(--hero-gradient);
  color: #fff; padding: 120px 0 80px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero .container { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); padding: 6px 16px;
  border-radius: 20px; font-size: 13px; margin-bottom: 20px;
}
.hero h1 { font-size: 42px; font-weight: 700; line-height: 1.3; margin-bottom: 16px; max-width: 700px; }
.hero h1 span { color: var(--hero-highlight); }
.hero p { font-size: 18px; color: rgba(255,255,255,0.8); max-width: 600px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 48px; }
.hero-actions .btn-primary { background: #fff; color: var(--primary); }
.hero-actions .btn-primary:hover { background: rgba(255,255,255,0.9); }
.hero-actions .btn-outline { border-color: rgba(255,255,255,0.5); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; }
.hero-stats { display: flex; gap: 48px; }
.hero-stat .num { font-size: 32px; font-weight: 700; }
.hero-stat .label { font-size: 14px; color: rgba(255,255,255,0.7); }

/* ---------- 通用 Section ---------- */
.section { padding: 80px 0; }
.section-light { background: var(--light); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: 32px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.section-header .subtitle { font-size: 14px; color: var(--gray); letter-spacing: 2px; text-transform: uppercase; }
.section-header p { font-size: 16px; color: var(--gray); max-width: 600px; margin: 8px auto 0; }

/* ---------- 服务卡片 ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card {
  background: #fff; border-radius: 12px; padding: 32px 24px; text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--light-gray);
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(6,90,130,0.12); }
.service-icon {
  width: 56px; height: 56px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 16px;
}
.service-card:nth-child(1) .service-icon { background: var(--icon-cyan-bg); color: var(--icon-cyan); }
.service-card:nth-child(2) .service-icon { background: var(--success-bg); color: var(--success-strong); }
.service-card:nth-child(3) .service-icon { background: var(--icon-amber-bg); color: var(--icon-amber); }
.service-card:nth-child(4) .service-icon { background: var(--icon-indigo-bg); color: var(--icon-indigo); }
.service-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: var(--accent); }
.service-card p { font-size: 14px; color: var(--gray); line-height: 1.6; }
.service-card .more { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--primary); font-weight: 500; }

/* ---------- 合作流程 ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.process-step { text-align: center; position: relative; }
.process-step .step-num {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; position: relative; z-index: 2;
}
.process-step h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; color: var(--accent); }
.process-step p { font-size: 14px; color: var(--gray); }
.process-line {
  position: absolute; top: 32px; left: 12.5%; right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, var(--light-gray) 50%, transparent 50%);
  background-size: 8px 2px; z-index: 1;
}

/* ---------- 关于公司 ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-text h3 { font-size: 24px; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.about-text p { font-size: 15px; color: var(--gray); line-height: 1.8; margin-bottom: 16px; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.about-feature { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dark); }
.about-feature .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin: 0; }
.about-visual {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 16px; padding: 40px; color: #fff;
}
.about-visual .stat-row {
  display: flex; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.15);
}
.about-visual .stat-row:last-child { border-bottom: none; }
.about-visual .stat-row .val { font-size: 24px; font-weight: 700; }
.about-visual .stat-row .lbl { font-size: 14px; color: rgba(255,255,255,0.7); }

/* ---------- CTA ---------- */
.cta { background: var(--accent); color: #fff; padding: 64px 0; text-align: center; }
.cta h2 { font-size: 30px; font-weight: 700; margin-bottom: 12px; color: #fff; }
.cta p { font-size: 16px; color: rgba(255,255,255,0.7); margin-bottom: 32px; }
.cta .btn-primary { background: #fff; color: var(--accent); }
.cta .btn-primary:hover { background: rgba(255,255,255,0.9); }
.cta .section-header p { color: rgba(255,255,255,0.7); }
.cta .section-header h2 { color: #fff; }

/* ---------- 页脚 ---------- */
.footer { background: var(--footer-bg); color: #94A3B8; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .nav-logo { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a, .footer-col li { font-size: 14px; color: #94A3B8; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 13px; }
.footer-bottom .beian-link { color: inherit; text-decoration: none; opacity: 0.85; }
.footer-bottom .beian-link:hover { opacity: 1; text-decoration: underline; }

/* ---------- 接口市场（对标天聚人合 tianjurenhe.com/docs） ---------- */
.market-section { padding: 40px 0 60px; }

/* 分类 Tab（蓝色边框描边风格） */
.market-tabs {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 32px; padding-bottom: 20px;
  border-bottom: 1px solid var(--light-gray);
}
.market-tab {
  display: inline-flex; align-items: center;
  padding: 8px 20px; border-radius: 20px;
  font-size: 14px; color: var(--gray);
  border: 1px solid var(--light-gray);
  background: #fff;
  transition: all 0.2s;
  text-decoration: none;
}
.market-tab:hover { color: var(--primary); border-color: var(--primary); }
.market-tab.active {
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 500;
}

/* 竖排卡片网格（5列紧凑布局） */
.api-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

/* 单张卡片 */
.api-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--light-gray);
  border-radius: 10px; padding: 20px 16px 16px;
  text-decoration: none; color: inherit;
  transition: all 0.2s;
  min-height: 280px;
}
.api-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(6,90,130,0.12);
  transform: translateY(-3px);
}

/* 大图标（顶部居中） */
.api-card-icon {
  width: 100px; height: 90px; margin: 0 auto 14px;
  background: var(--light-accent);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
}

/* 标题 */
.api-card-title {
  font-size: 15px; font-weight: 600;
  color: var(--dark); text-align: center;
  margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 描述（2行截断） */
.api-card-desc {
  font-size: 12px; color: var(--gray); line-height: 1.5;
  text-align: center;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 10px;
  min-height: 36px;
}

/* 标签行 */
.api-card-tags {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: center;
  margin-bottom: 12px;
}
.api-card-tag {
  font-size: 11px; padding: 1px 6px; border-radius: 3px;
  background: var(--light); color: var(--gray);
}

/* 底部（价格 + 申请按钮） */
.api-card-bottom {
  margin-top: auto; padding-top: 10px;
  border-top: 1px dashed var(--light-gray);
  display: flex; justify-content: space-between; align-items: center;
}
.api-card-price {
  font-size: 12px; color: var(--price); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; margin-right: 4px;
}
.api-card-btn {
  font-size: 12px; color: var(--primary); font-weight: 500;
  flex-shrink: 0;
}
.api-card:hover .api-card-btn { text-decoration: underline; }

/* ---------- 接口详情页（对标 tianjurenhe） ---------- */
.detail-page { padding: 40px 0 80px; }
.detail-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  background: #fff; border: 1px solid var(--light-gray); border-radius: 12px;
  padding: 28px 32px; margin-bottom: 24px;
}
.detail-left { display: flex; gap: 20px; flex: 1; }
.detail-icon {
  width: 64px; height: 64px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; flex-shrink: 0;
}
.detail-title-area h1 { font-size: 24px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.detail-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--gray); }
.detail-meta .meta-item code { background: var(--light); padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.detail-meta .tag-free { background: var(--success-bg); color: var(--success-strong); padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.detail-right { text-align: right; }
.detail-price { font-size: 14px; color: var(--primary); font-weight: 600; margin-bottom: 12px; }

/* Tab 导航 */
.detail-tabs {
  display: flex; gap: 0; background: #fff; border: 1px solid var(--light-gray);
  border-radius: 12px 12px 0 0; border-bottom: none; overflow: hidden;
}
.detail-tab {
  padding: 14px 24px; font-size: 14px; color: var(--gray);
  border-right: 1px solid var(--light-gray);
  transition: all 0.2s; text-decoration: none;
}
.detail-tab:last-child { border-right: none; }
.detail-tab:hover { color: var(--primary); background: var(--light); }
.detail-tab.active { color: var(--primary); background: #fff; font-weight: 600; border-bottom: 2px solid var(--primary); }

/* Section 内容 */
.detail-section {
  background: #fff; border: 1px solid var(--light-gray);
  border-top: none; padding: 32px; margin-bottom: 24px; border-radius: 0 0 12px 12px;
}
.section-title { font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--light-gray); }
.detail-section h3 { font-size: 15px; font-weight: 600; color: var(--dark); margin: 20px 0 12px; }
.intro-content p { font-size: 14px; color: var(--gray); line-height: 1.8; margin-bottom: 10px; }
.features-list { list-style: none; padding: 0; }
.features-list li {
  font-size: 14px; color: var(--gray); padding: 8px 0 8px 24px;
  position: relative; line-height: 1.6;
}
.features-list li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--success); font-weight: 700;
}

/* 详情页参数表 */
.detail-section .tbl th { background: var(--light); font-weight: 600; color: var(--dark); }
.detail-section .tbl td, .detail-section .tbl th { padding: 12px 16px; font-size: 13px; }
.detail-section .tbl .required { color: var(--danger); font-weight: 500; }
.detail-section .tbl .optional { color: var(--gray); }
.detail-section .tbl code { background: var(--light); padding: 2px 8px; border-radius: 4px; font-size: 12px; }

/* 详情页代码块 */
.detail-section .code-block pre {
  background: var(--code-bg); border: none; border-radius: 8px; padding: 16px 20px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px;
  line-height: 1.7; color: var(--code-text); overflow-x: auto;
}

/* 详情页联系卡片 */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 16px; }
.contact-card {
  background: var(--light); border-radius: 10px; padding: 24px; text-align: center;
}
.contact-icon { font-size: 32px; margin-bottom: 12px; }
.contact-card h3 { font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 8px; }
.contact-card p { font-size: 13px; color: var(--gray); margin-bottom: 8px; }
.contact-value { font-size: 14px; color: var(--primary); font-weight: 500; }

/* ---------- 旧样式保留 ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.api-card {
  display: block; color: var(--dark);
  background: #fff; border: 1px solid var(--light-gray); border-radius: 12px;
  padding: 24px; margin-bottom: 20px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.api-card:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.api-card h3 { font-size: 16px; margin: 10px 0 6px; color: var(--accent); }
.api-card p { color: var(--gray); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag { display: inline-block; font-size: 12px; color: var(--primary); background: var(--light-accent); border-radius: 6px; padding: 2px 8px; }

/* ---------- 分类标签 ---------- */
.tabs { display: flex; gap: 10px; margin: 20px 0 4px; flex-wrap: wrap; }
.tabs a { color: var(--gray); font-size: 14px; padding: 6px 16px; border: 1px solid var(--light-gray); border-radius: 999px; }
.tabs a:hover { color: var(--dark); text-decoration: none; }
.tabs a.active { color: #fff; background: var(--primary); border-color: var(--primary); }

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tbl th { color: var(--muted); font-weight: 500; font-size: 13px; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .ops { display: flex; gap: 6px; align-items: center; }

/* ---------- 表单 ---------- */
label { display: block; margin: 12px 0 4px; color: var(--muted); font-size: 13px; }
input[type="text"], input[type="password"], input[type="email"], select, textarea {
  width: 100%; margin-top: 4px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 12px;
  color: var(--text); font-size: 14px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.row-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.row-form label { flex: 1; min-width: 160px; }
.check { display: flex; align-items: center; gap: 8px; margin: 14px 0; color: var(--text); font-size: 14px; }
.check input { width: auto; margin: 0; }
.form-card { max-width: 780px; }

/* ---------- 登录框 ---------- */
.auth-box { max-width: 400px; margin: 48px auto; }
.auth-box h1 { font-size: 24px; margin-bottom: 18px; }

/* ---------- 详情页 ---------- */
.detail-head { margin-bottom: 24px; }
.detail-head h1 { margin: 10px 0 4px; font-size: 28px; }
.meta { color: var(--gray); font-size: 14px; margin-top: 12px; }
.meta b { color: var(--dark); }
.code-block { position: relative; margin: 12px 0; }
.code-block pre {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: 11px;
  padding: 16px 18px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px; line-height: 1.7; color: var(--code-text);
}

/* ============================================================
   后台管理样式（暗色主题）
   ============================================================ */

/* ---------- 后台按钮覆盖 ---------- */
body.admin-body .btn {
  display: inline-block; cursor: pointer;
  border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 20px; font-size: 14px;
  color: var(--text); background: var(--panel-2);
  transition: opacity 0.15s, border-color 0.15s; font-family: inherit;
}
body.admin-body .btn:hover { opacity: 0.85; text-decoration: none; }
body.admin-body .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
body.admin-body .btn.ghost { background: transparent; }
body.admin-body .btn.small { padding: 4px 12px; font-size: 13px; border-radius: 7px; }
body.admin-body .btn.xl { padding: 12px 34px; font-size: 15px; border-radius: 11px; }
body.admin-body .btn.danger { background: transparent; color: var(--red); border-color: rgba(255, 69, 58, 0.35); }
body.admin-body .btn.wide { width: 100%; margin-top: 6px; }

/* ---------- 后台卡片 ---------- */
body.admin-body .card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
}
body.admin-body .api-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text);
}
body.admin-body .api-card:hover { border-color: var(--accent); }
body.admin-body .api-card h3 { color: var(--text); }
body.admin-body .api-card p { color: var(--muted); }

/* ---------- 后台管理布局 ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.admin-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px; font-weight: 700; font-size: 16px;
  color: var(--text); text-decoration: none;
}
.admin-brand:hover { text-decoration: none; }
.admin-logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.admin-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.admin-nav a {
  display: block; padding: 12px 20px;
  color: var(--muted); font-size: 15px; text-decoration: none;
  border-left: 3px solid transparent; white-space: nowrap; overflow: hidden;
}
.admin-nav a:hover { background: var(--panel-2); color: var(--text); }
.admin-nav a.active {
  background: var(--accent-soft); color: var(--accent);
  border-left: 3px solid var(--accent);
}
.admin-sidebar-footer {
  padding: 16px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: rgba(11, 11, 15, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.admin-topbar h1 { font-size: 20px; font-weight: 700; }
.admin-topbar span { color: var(--muted); font-size: 14px; }
.admin-content { padding: 24px 32px; overflow-y: auto; flex: 1; }

/* ---------- KPI 卡片 ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.kpi-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
}
.kpi-icon { font-size: 24px; margin-bottom: 8px; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.kpi-label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.kpi-trend { font-size: 12px; margin-top: 8px; }
.kpi-trend.up { color: var(--green); }
.kpi-trend.down { color: var(--red); }
.kpi-trend.up::after { content: " ↑"; }
.kpi-trend.down::after { content: " ↓"; }

/* ---------- 柱状图 ---------- */
.chart { display: flex; gap: 18px; align-items: flex-end; height: 180px; padding: 0 6px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.bar {
  width: 100%; max-width: 46px; min-height: 3px;
  background: linear-gradient(180deg, var(--accent), rgba(10, 132, 255, 0.35));
  border-radius: 6px 6px 2px 2px;
}
.bar.cost, .bar-cost { background: linear-gradient(180deg, var(--red), rgba(255, 69, 58, 0.35)); }
.bar-income { background: linear-gradient(180deg, var(--accent), rgba(10, 132, 255, 0.35)); }
.bar-num { font-size: 12px; color: var(--muted); }
.bar-date { font-size: 12px; color: var(--muted); }
.bar-group { display: flex; gap: 4px; align-items: flex-end; }

/* ---------- 饼图 ---------- */
.pie-row { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.pie-chart { width: 180px; height: 180px; border-radius: 50%; flex-shrink: 0; }
.pie-legend { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.pie-legend li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.legend-dot, .pie-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.pie-label { color: var(--muted); font-size: 13px; }
.pie-value { color: var(--text); font-size: 14px; }

/* ---------- 状态标签 ---------- */
.status-tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.status-tag.success { color: var(--green); background: rgba(48, 209, 88, 0.14); }
.status-tag.fail { color: var(--red); background: rgba(255, 69, 58, 0.14); }
.status-tag.pending { color: var(--muted); background: var(--panel-2); }
.status-tag.processing { color: var(--accent); background: var(--accent-soft); }
.status-tag.warn { color: var(--amber); background: rgba(255, 159, 10, 0.14); }

/* ---------- 兼容旧统计卡（dashboard 模板使用） ---------- */
.stats { display: flex; gap: 16px; justify-content: center; margin-top: 36px; }
.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 36px; text-align: center;
}
.stat b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 13px; }
.admin-stats { justify-content: flex-start; margin-bottom: 28px; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .nav-menu { display: none; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .api-cards-grid { grid-template-columns: repeat(3, 1fr); }
  .process-grid { grid-template-columns: 1fr; }
  .process-line { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  main { padding: 80px 18px 60px; }
  .grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  /* 后台侧边栏折叠为图标栏 */
  .admin-sidebar { width: 60px; overflow: hidden; }
  .admin-brand { padding: 20px 0; justify-content: center; font-size: 0; gap: 0; }
  .admin-nav a { font-size: 0; overflow: hidden; padding: 14px 0; text-align: center; border-left: none; }
  .admin-sidebar-footer { padding: 16px 0; justify-content: center; font-size: 0; overflow: hidden; }
  .admin-content { padding: 16px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .api-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { flex-direction: column; align-items: stretch; }
  .services-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr; }
  .about-features { grid-template-columns: 1fr; }
}

/* ============================================================
   渠道合作方后台 console（天聚风格：深灰侧栏 + 青蓝主色）
   ============================================================ */
body.admin-body .admin-badge {
  display: inline-block; min-width: 17px; padding: 0 5px; margin-left: 4px;
  background: #ff453a; color: #fff; border-radius: 9px;
  font-size: 11px; line-height: 17px; text-align: center; vertical-align: middle;
}

body.console-body {
  background: #F0F0F0;
  color: #303133;
  font-size: 14px;
  padding: 0;
}
.c-layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.c-sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: 210px; z-index: 50;
  background: rgb(50,54,61); display: flex; flex-direction: column;
}
.c-brand {
  display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 18px;
  color: #fff; font-size: 16px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.06);
}
.c-brand:hover { color: #fff; }
.c-logo {
  width: 30px; height: 30px; border-radius: 4px; flex: none;
  background: linear-gradient(135deg,#03C5FF,#2D8CF0);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.c-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.c-nav-group {
  padding: 14px 18px 6px; font-size: 12px; color: #7A808B; letter-spacing: 1px;
}
.c-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 18px; color: #C2C6CD; font-size: 14px;
  border-left: 3px solid transparent; transition: background .15s, color .15s;
}
.c-nav a i { font-style: normal; font-size: 15px; width: 18px; text-align: center; }
.c-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.c-nav a.on {
  background: rgba(3,197,255,.12); color: #03C5FF;
  border-left-color: #03C5FF;
}
.c-sidebar-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.06); }
.c-ch-name {
  color: #C2C6CD; font-size: 13px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; margin-bottom: 10px;
}
.c-logout {
  width: 100%; padding: 7px 0; background: transparent; border: 1px solid #565C66;
  color: #C2C6CD; border-radius: 2px; font-size: 13px; cursor: pointer;
}
.c-logout:hover { border-color: #03C5FF; color: #03C5FF; }

/* 主区域 */
.c-main { flex: 1; margin-left: 210px; min-width: 0; }
.c-topbar {
  position: sticky; top: 0; z-index: 40; height: 52px; background: #fff;
  border-bottom: 1px solid #DCDEE2; display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px;
}
.c-breadcrumb { font-size: 14px; color: #606266; }
.c-breadcrumb a { color: #2D8CF0; }
.c-top-right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #606266; }
.c-top-right a { color: #606266; }
.c-top-right a:hover { color: #2D8CF0; }
.c-top-user { padding-left: 16px; border-left: 1px solid #EBEEF5; }
.c-content { padding: 16px 20px 40px; }

/* 卡片 */
.c-card {
  background: #fff; border: 1px solid #DCDEE2; border-radius: 2px;
  margin-bottom: 16px;
}
.c-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-bottom: 1px solid #EBEDF0;
}
.c-card-head h3 { font-size: 15px; font-weight: 600; color: #303133; }

/* 欢迎条 */
.c-welcome {
  background: linear-gradient(100deg,#1E2A45,#2D8CF0 120%);
  border-radius: 2px; padding: 22px 26px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; color: #fff;
}
.c-welcome h2 { font-size: 20px; margin-bottom: 6px; }
.c-welcome p { font-size: 13px; opacity: .85; }
.c-badge-warn {
  background: rgba(255,255,255,.15); color: #fff; padding: 8px 14px;
  border-radius: 2px; font-size: 13px; white-space: nowrap;
}

/* 统计卡 */
.c-stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 16px; }
.c-stat {
  background: #fff; border: 1px solid #DCDEE2; border-radius: 2px; padding: 18px 20px;
}
.c-stat-label { font-size: 13px; color: #909399; margin-bottom: 10px; }
.c-stat-num { font-size: 26px; font-weight: 700; color: #303133; line-height: 1.2; }
.c-num-orange, .c-price { color: #F56C2D; font-weight: 600; }
.c-stat-sub { font-size: 12px; color: #909399; margin-top: 8px; }

/* 柱状图 */
.c-bars {
  display: flex; align-items: flex-end; gap: 18px; height: 200px;
  padding: 24px 30px 8px;
}
.c-bar-col {
  flex: 1; height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; gap: 8px;
}
.c-bar {
  width: 60%; max-width: 38px; min-height: 2px;
  background: linear-gradient(180deg,#5CADFF,#2D8CF0); border-radius: 2px 2px 0 0;
}
.c-bar-col span { font-size: 12px; color: #909399; }

/* 快捷入口 */
.c-quick-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; }
.c-quick {
  background: #fff; border: 1px solid #DCDEE2; border-radius: 2px;
  padding: 22px 10px; text-align: center; color: #606266; font-size: 14px;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  transition: border-color .15s, color .15s, transform .15s;
}
.c-quick i { font-style: normal; font-size: 24px; }
.c-quick:hover { border-color: #2D8CF0; color: #2D8CF0; transform: translateY(-2px); }

/* 分类标题 + 接口网格 */
.c-cat-title {
  font-size: 14px; font-weight: 600; color: #303133;
  padding: 18px 18px 10px;
}
.c-cat-title span { color: #909399; font-weight: 400; font-size: 12px; margin-left: 6px; }
.c-api-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; padding: 0 18px 18px;
}
.c-api-card {
  border: 1px solid #DCDEE2; border-radius: 2px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.c-api-card:hover { border-color: #2D8CF0; box-shadow: 0 4px 14px rgba(45,140,240,.1); }
.c-api-icon { font-size: 26px; }
.c-api-name { font-size: 14px; font-weight: 600; color: #303133; }
.c-api-card p {
  font-size: 12px; color: #909399; line-height: 1.6; min-height: 38px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.c-api-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }

/* 按钮 / 链接 / 标签 */
.c-btn {
  display: inline-block; padding: 7px 16px; font-size: 13px; line-height: 1.4;
  background: #F7F7F7; border: 1px solid #DCDEE2; color: #606266;
  border-radius: 2px; cursor: pointer; text-align: center; white-space: nowrap;
}
.c-btn:hover { border-color: #C0C4CC; color: #303133; }
.c-btn-primary { background: #2D8CF0; border-color: #2D8CF0; color: #fff; }
.c-btn-primary:hover { background: #1F76DC; border-color: #1F76DC; color: #fff; }
.c-btn-sm { padding: 4px 11px; font-size: 12px; }
.c-btn-lg { padding: 10px 20px; font-size: 14px; }
.c-btn-ghost { color: #2D8CF0; background: #fff; }
.c-danger-outline, .c-btn-danger-outline {
  background: #fff; border-color: #FBC4C4; color: #ED4014;
}
.c-danger-outline:hover, .c-btn-danger-outline:hover { border-color: #ED4014; color: #ED4014; }
.c-link { color: #2D8CF0; font-size: 13px; }
.c-link:hover { text-decoration: underline; }
.c-link-btn { background: none; border: none; padding: 0; font-size: 13px; color: #ED4014; cursor: pointer; }
.c-tag {
  display: inline-block; padding: 2px 9px; font-size: 12px; line-height: 1.6;
  background: #F4F4F5; color: #909399; border-radius: 2px;
}
.c-tag-green { background: #E7F8EE; color: #19BE6B; }
.c-tag-orange { background: #FFF7E8; color: #FF9900; }
.c-tag-red { background: #FFF1F0; color: #ED4014; }
.c-tag-lg { font-size: 14px; padding: 5px 16px; }
.c-reason { font-size: 12px; color: #ED4014; margin-top: 3px; }
.c-strong { font-weight: 600; color: #303133; }
.c-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.c-green { color: #19BE6B; font-weight: 600; }
.c-empty { text-align: center; color: #909399; padding: 36px 0 !important; font-size: 13px; }
.c-empty a { color: #2D8CF0; }
.c-tip { font-size: 12.5px; color: #909399; line-height: 1.7; }
.c-tip code, .c-doc code { background: #F4F4F5; padding: 1px 6px; border-radius: 2px; color: #F56C2D; }

/* tabs */
.c-tabs { display: flex; gap: 4px; padding: 12px 18px 0; border-bottom: 1px solid #EBEDF0; }
.c-tabs a {
  padding: 8px 16px; font-size: 13px; color: #606266;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.c-tabs a:hover { color: #2D8CF0; }
.c-tabs a.on { color: #2D8CF0; border-bottom-color: #2D8CF0; font-weight: 600; }

/* 表格 */
.c-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.c-table th {
  background: #F7F7F7; color: #606266; font-weight: 600; text-align: left;
  padding: 10px 14px; border-bottom: 1px solid #EBEDF0; white-space: nowrap;
}
.c-table td { padding: 11px 14px; border-bottom: 1px solid #F2F3F5; color: #303133; }
.c-table tr:hover td { background: #FAFCFF; }
.c-filter {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid #EBEDF0;
}
.c-filter input, .c-filter select { height: 32px; }
.c-pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 14px 18px; font-size: 13px; color: #909399;
}
.c-pager a { color: #2D8CF0; border: 1px solid #DCDEE2; padding: 4px 12px; border-radius: 2px; }

/* 表单 */
.c-form { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.c-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #606266; }
.c-form input, .c-form select { height: 34px; }
.c-form input[type=file] { height: auto; }
.c-form-inline { display: flex; gap: 10px; align-items: center; padding: 16px 18px; flex-wrap: wrap; }
.c-grow { flex: 1; min-width: 220px; }
body.console-body input[type=text], body.console-body input[type=password],
body.console-body input[type=url], body.console-body input[type=number],
body.console-body input[type=date], body.console-body select {
  border: 1px solid #DCDFE6; border-radius: 2px; padding: 6px 10px; font-size: 13px;
  background: #fff; color: #303133; outline: none;
}
body.console-body input:focus, body.console-body select:focus { border-color: #2D8CF0; }
body.console-body input:disabled { background: #F5F7FA; color: #909399; }

/* 双栏 */
.c-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

/* 凭证 */
.c-cred { padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.c-cred-row label { display: block; font-size: 13px; color: #909399; margin-bottom: 6px; }
.c-cred-val {
  background: #F5F7FA; border: 1px solid #EBEDF0; padding: 10px 14px;
  border-radius: 2px; font-size: 15px; color: #303133;
}
.c-cred-ops { display: flex; gap: 10px; margin-top: 8px; }

/* 文档 */
.c-doc { padding: 14px 18px 18px; }
.c-doc p { font-size: 13.5px; color: #606266; line-height: 2; }
.c-code {
  background: #1E1F22; color: #D7DAE0; padding: 14px 16px; border-radius: 2px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px;
  line-height: 1.7; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
  margin: 10px 18px;
}

/* 订单详情 */
.c-detail-status { padding: 18px; border-bottom: 1px solid #EBEDF0; }
.c-kv { width: 100%; border-collapse: collapse; }
.c-kv th, .c-kv td {
  text-align: left; padding: 12px 18px; font-size: 13px;
  border-bottom: 1px solid #F2F3F5;
}
.c-kv th { color: #909399; font-weight: 400; width: 110px; background: #FAFAFA; }

/* 充值收款信息 */
.c-payee {
  margin: 18px 18px 0; padding: 14px 16px; background: #F5F9FF;
  border: 1px solid #D6E8FF; border-radius: 2px;
}
.c-payee-title { font-weight: 600; margin-bottom: 8px; color: #303133; }
.c-payee p { font-size: 13px; color: #606266; line-height: 1.9; }

/* 提示条 */
.c-alert { padding: 11px 16px; border-radius: 2px; font-size: 13px; margin-bottom: 16px; }
.c-alert-green { background: #E7F8EE; color: #19BE6B; border: 1px solid #B7EBC9; }
.c-alert-red { background: #FFF1F0; color: #ED4014; border: 1px solid #FBC4C4; }

/* 响应式 */
@media (max-width: 1280px) {
  .c-stat-row { grid-template-columns: repeat(2,1fr); }
  .c-api-grid { grid-template-columns: repeat(3,1fr); }
  .c-quick-row { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 900px) {
  .c-grid-2 { grid-template-columns: 1fr; }
  .c-api-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px) {
  .c-sidebar { width: 58px; }
  .c-brand span:last-child, .c-nav-group, .c-nav a i ~ *, .c-ch-name, .c-logout { display: none; }
  .c-nav a { justify-content: center; padding: 12px 0; }
  .c-main { margin-left: 58px; }
  .c-stat-row { grid-template-columns: 1fr 1fr; }
  .c-quick-row { grid-template-columns: repeat(2,1fr); }
}
