:root {
  --brand: #1677ff;
  --brand-soft: #e6f4ff;
  --green: #52c41a;
  --green-soft: #f6ffed;
  --orange: #fa8c16;
  --red: #f5222d;
  --warn: #faad14;
  --ink: #1f2329;
  --ink-2: #5f6368;
  --ink-3: #8c9298;
  --bg: #f6f8fa;
  --card: #ffffff;
  --line: #e5e7eb;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 14px;
}

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

code, .mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: #f1f3f5;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
  color: #d4380d;
}

/* ---------- 导航 ---------- */
.nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
}
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 14px;
}
.nav-links a:hover { background: var(--bg); text-decoration: none; }
.nav-links a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* ---------- 布局 ---------- */
.section { padding: 28px 16px; }
.wrap { max-width: 1200px; margin: 0 auto; }
.wrap.narrow { max-width: 960px; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { font-size: 26px; margin-bottom: 8px; }
.section-head p { color: var(--ink-2); }

.foot {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 24px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.foot a { color: var(--ink-3); margin: 0 6px; }
.foot a:hover { color: var(--brand); }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.center { text-align: center; }
.hide { display: none !important; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
  color: #fff;
  padding: 56px 16px 64px;
  text-align: center;
}
.hero h1 { font-size: 34px; margin-bottom: 12px; }
.hero .sub { font-size: 16px; opacity: 0.92; max-width: 600px; margin: 0 auto; }
.hero-steps {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-step {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
}
.hero-step b {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--brand);
  border-radius: 50%;
  margin-right: 6px;
  font-size: 12px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  line-height: 1.4;
}
.btn:hover { background: #4096ff; border-color: #4096ff; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.sm { padding: 5px 12px; font-size: 13px; border-radius: 6px; }
.btn.lg { padding: 12px 24px; font-size: 15px; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover { background: #73d13d; border-color: #73d13d; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 5px;
}
input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
input[type="file"] { padding: 6px; }
.row { display: flex; gap: 14px; }
.row .field { flex: 1; }
.inline { display: flex; align-items: center; gap: 8px; }
.inline input, .inline select { width: auto; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card .hint {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 14px;
}

/* ---------- 标签 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: #f1f3f5;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.badge.ok { background: var(--green-soft); color: var(--green); border-color: #b7eb8f; }
.badge.warn { background: #fffbe6; color: #d48806; border-color: #ffe58f; }
.badge.err { background: #fff1f0; color: var(--red); border-color: #ffa39e; }
.badge.brand { background: var(--brand-soft); color: var(--brand); border-color: #91caff; }

/* ---------- 提示 ---------- */
.hint { font-size: 13px; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.err { color: var(--red); }
.ok { color: var(--green); }
.warn { color: var(--warn); }

.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.alert.info { background: var(--brand-soft); color: var(--brand); border: 1px solid #91caff; }
.alert.warn { background: #fffbe6; color: #d48806; border: 1px solid #ffe58f; }
.alert.ok { background: var(--green-soft); color: var(--green); border: 1px solid #b7eb8f; }

/* ---------- 页签 ---------- */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.tab {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  margin-bottom: -2px;
}
.tab:hover { color: var(--brand); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab-panel { display: block; }

/* ---------- 列表项（授权/订单/资源通用） ---------- */
.lic-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
}
.lic-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.lic-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.lic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: var(--ink-2);
}
.lic-actions { margin-top: 10px; display: flex; gap: 8px; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s;
}
.mask.show { opacity: 1; visibility: visible; }
.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 24px;
  color: var(--ink-3);
  cursor: pointer;
}
.modal h3 { margin-bottom: 6px; padding-right: 24px; }

/* 运营管理通用弹窗 */
.modal-wrap { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-wrap.show { display: flex; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.modal-box { background: #fff; border-radius: 12px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); position: relative; z-index: 1; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h4 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }

/* ---------- 首页套餐 ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.plan-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.plan-card.featured { border-color: var(--brand); box-shadow: 0 4px 16px rgba(22,119,255,0.12); }
.plan-head { margin-bottom: 12px; }
.plan-head h4 { font-size: 18px; margin-bottom: 4px; }
.plan-head p { font-size: 13px; color: var(--ink-2); }
.plan-price { margin-bottom: 14px; }
.plan-price .cur { font-size: 14px; color: var(--red); }
.plan-price .num { font-size: 34px; font-weight: 700; color: var(--red); }
.plan-price .orig { text-decoration: line-through; color: var(--ink-3); margin-left: 8px; }
.plan-features { flex: 1; margin-bottom: 16px; }
.plan-features li {
  list-style: none;
  padding: 5px 0;
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.plan-features li::before { content: "✓"; color: var(--green); font-weight: 700; }

/* ---------- 收银台 ---------- */
.pay-box { text-align: center; }
.pay-amount { font-size: 42px; font-weight: 700; color: var(--red); }
.pay-order { font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }
.pay-qr { margin: 14px auto; padding: 10px; background: #fff; border: 1px solid var(--line); display: inline-block; border-radius: 8px; }
.pay-qr canvas { display: block; }

/* ---------- 下载中心 ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.dl-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.dl-icon { font-size: 32px; margin-bottom: 8px; }
.dl-name { font-weight: 600; font-size: 15px; }
.dl-badges { margin: 8px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.dl-desc { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.dl-meta { font-size: 12px; color: var(--ink-3); margin-bottom: 12px; }

/* ---------- 分页 ---------- */
.pager {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.pager-ellipsis { color: var(--ink-3); padding: 0 4px; }
.pager-info { font-size: 13px; color: var(--ink-3); margin-left: auto; }

/* ---------- 步骤 ---------- */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-3);
}
.step b {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--line);
  color: var(--ink-2);
  font-size: 12px;
}
.step.on { color: var(--brand); font-weight: 600; }
.step.on b { background: var(--brand); color: #fff; }
.step.done { color: var(--green); }
.step.done b { background: var(--green); color: #fff; }
.step-line { width: 24px; height: 1px; background: var(--line); }

/* ---------- 运营管理 ---------- */
.op-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 10px;
}
.op-stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
  border-left: 4px solid var(--brand);
}
.op-stat-card:nth-child(2) { border-left-color: var(--green); }
.op-stat-card:nth-child(3) { border-left-color: var(--orange); }
.op-stat-card:nth-child(4) { border-left-color: #9C27B0; }
.op-stat-card:nth-child(5) { border-left-color: #00BCD4; }
.op-stat-label { font-size: 12px; color: var(--ink-2); }
.op-stat-num { font-size: 22px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.op-trend {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 16px;
}
.op-subtabs {
  display: flex; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 8px;
}
.op-subtab {
  background: transparent; border: none; padding: 6px 14px; border-radius: 6px;
  font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.op-subtab.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.op-subpanel { margin-top: 10px; }
.op-report-btns { display: flex; gap: 8px; margin-bottom: 12px; }
.op-report h4 { font-size: 16px; margin: 16px 0 8px; color: var(--ink); }
.op-report h4:first-child { margin-top: 0; }
.op-report table {
  width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px;
}
.op-report th, .op-report td {
  border: 1px solid var(--line); padding: 8px 10px; text-align: left;
}
.op-report th { background: #f8f9fa; font-weight: 600; }

/* ---------- toast ---------- */
#toast {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
#toast.show { opacity: 1; }
#toast.ok { background: var(--green); }
#toast.err { background: var(--red); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero h1 { font-size: 26px; }
  .plans { grid-template-columns: 1fr; }
  .op-stats { grid-template-columns: repeat(3, 1fr); }
  .op-subtabs { flex-wrap: wrap; }
  .row { flex-direction: column; gap: 0; }
}
@media (max-width: 560px) {
  .nav-inner { height: auto; flex-direction: column; padding: 10px; gap: 8px; }
  .nav-links { flex-wrap: wrap; justify-content: center; }
  .hero { padding: 36px 16px; }
  .hero-steps { flex-direction: column; align-items: center; }
  .op-stats { grid-template-columns: repeat(2, 1fr); }
  .tabs { flex-wrap: wrap; }
  .inline { flex-wrap: wrap; }
}

/* ========== 首页（欢迎页）专用样式 ========== */
.home-hero {
  padding: 72px 16px 80px;
}
.home-hero h1 {
  font-size: 38px;
  line-height: 1.3;
  margin-bottom: 16px;
}
.home-hero .sub {
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto 32px;
  opacity: 0.9;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-btn-primary {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
  font-weight: 600;
}
.hero-btn-primary:hover {
  background: #f0f7ff;
  border-color: #f0f7ff;
  color: #0958d9;
  text-decoration: none;
}
.hero-btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.hero-btn-ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.8);
  color: #fff;
  text-decoration: none;
}

/* 场景卡片 */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.scene-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.scene-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.scene-icon {
  font-size: 36px;
  margin-bottom: 14px;
}
.scene-card h3 {
  font-size: 17px;
  margin-bottom: 10px;
  color: var(--ink);
}
.scene-card p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.7;
}

/* 产品双栏 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.product-card {
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow .2s;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
}
.product-card-alt {
  background: #fff;
}
.product-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.product-emoji {
  font-size: 32px;
}
.product-header h3 {
  font-size: 18px;
  margin-bottom: 2px;
}
.product-tagline {
  font-size: 13px;
  color: var(--ink-3);
  margin: 0;
}
.product-desc {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 14px;
}
.product-features {
  list-style: none;
  padding: 0;
  margin: 0;
}
.product-features li {
  padding: 5px 0;
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.product-features li::before {
  content: "\2713";
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

/* 流程步骤 */
.flow-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.flow-step {
  flex: 1;
  min-width: 140px;
  max-width: 200px;
  text-align: center;
  padding: 20px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.flow-step b {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.flow-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.flow-step p {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
}
.flow-arrow {
  font-size: 22px;
  color: var(--ink-3);
  padding-top: 44px;
  flex-shrink: 0;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  transition: background .15s;
}
.faq-item summary:hover {
  background: #fafbfc;
}
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--brand);
  font-weight: 300;
}
.faq-item[open] summary::after {
  content: "\2212";
}
.faq-answer {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.75;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* 底部 CTA */
.cta-section {
  background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
  color: #fff;
  padding: 56px 16px 64px;
  text-align: center;
}
.cta-section h2 {
  font-size: 28px;
  margin-bottom: 10px;
}
.cta-sub {
  font-size: 15px;
  opacity: 0.88;
  margin-bottom: 28px;
}
.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 首页响应式 */
@media (max-width: 900px) {
  .scene-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .flow-steps { flex-direction: column; align-items: center; }
  .flow-arrow { 
    transform: rotate(90deg); 
    padding-top: 0;
    padding-bottom: 8px;
  }
  .home-hero h1 { font-size: 28px; }
}
@media (max-width: 560px) {
  .home-hero { padding: 44px 16px 52px; }
  .home-hero h1 { font-size: 24px; }
  .scene-card { padding: 20px 16px; }
  .product-card { padding: 20px 16px; }
  .flow-step { min-width: unset; max-width: unset; width: 100%; }
  .cta-section { padding: 40px 16px 48px; }
  .cta-section h2 { font-size: 22px; }
}
