/* web/site/site.css — 「AI电商数据助手」前台 / 后台样式（复用 base.css 的深色主题变量） */

body.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- 顶栏 / 底栏 ---------- */
.site-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.site-head .brand { font-weight: 700; font-size: 17px; letter-spacing: .3px; text-decoration: none; color: var(--fg); }
.site-head .brand .dot { color: var(--accent); }
.site-head .tagline { font-size: 12px; color: var(--fg-3); }
.site-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--fg-3);
  flex-wrap: wrap;
}
.site-foot a { color: var(--fg-3); }

.site-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }

/* ---------- 通用块 ---------- */
.block { margin-bottom: 34px; }
.block > h1 { font-size: 24px; margin-bottom: 14px; }
.block > h2 { font-size: 18px; margin-bottom: 12px; }
.center { text-align: center; }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }

/* ---------- 首屏 ---------- */
.hero { text-align: center; padding: 34px 0 18px; }
.hero h1 { font-size: 38px; letter-spacing: .5px; margin-bottom: 10px; }
.hero-sub { font-size: 15px; color: var(--accent); margin-bottom: 14px; }
.hero-desc { max-width: 680px; margin: 0 auto 22px; color: var(--fg-2); line-height: 1.85; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn { padding: 10px 20px; font-size: 14px; }
.hero-stats { display: flex; gap: 26px; justify-content: center; margin-top: 24px; color: var(--fg-3); font-size: 13px; flex-wrap: wrap; }
.hero-stats b { color: var(--fg); font-size: 16px; }

/* ---------- 功能格 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.feature { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.feature h3 { font-size: 14.5px; margin-bottom: 7px; }
.feature p { font-size: 12.5px; color: var(--fg-2); line-height: 1.8; }

/* ---------- 套餐 ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.plan-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-card.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-badge {
  position: absolute; top: -10px; right: 14px;
  background: var(--accent); color: #fff; font-size: 11px;
  padding: 2px 9px; border-radius: 999px;
}
.plan-name { font-size: 15px; font-weight: 600; }
.plan-price { font-size: 26px; font-weight: 700; color: var(--accent); }
.plan-price .unit { font-size: 12px; color: var(--fg-3); font-weight: 400; }
.plan-desc { font-size: 12.5px; color: var(--fg-2); line-height: 1.75; min-height: 34px; }
.plan-feat { list-style: none; padding: 0; margin: 0; font-size: 12.5px; color: var(--fg-2); line-height: 2; }
.plan-feat li::before { content: '· '; color: var(--accent); }
.plan-card .btn.block { margin-top: auto; }
.pending-box { background: var(--bg-3); border-radius: var(--radius-sm); padding: 9px 11px; font-size: 12.5px; line-height: 1.8; }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form.narrow { max-width: 420px; }
.auth-card {
  max-width: 420px; margin: 30px auto;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px;
}
.auth-card h1 { font-size: 20px; margin-bottom: 16px; text-align: center; }
.auth-card .form { margin-top: 6px; }

/* ---------- 账户页 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; }
.stat .k { font-size: 12px; color: var(--fg-3); }
.stat .v { font-size: 21px; font-weight: 700; margin-top: 5px; word-break: break-all; }
.stat .v.ok { color: var(--ok); }
.stat .v.warn { color: var(--warn); }
.stat .s { font-size: 11.5px; color: var(--fg-3); margin-top: 5px; }
.usage-bar { height: 7px; background: var(--bg-3); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.usage-bar i { display: block; height: 100%; background: var(--accent); }
.steps { margin: 0; padding-left: 20px; line-height: 2; font-size: 13px; color: var(--fg-2); }

/* ---------- 页脚备案号（按工信部要求带链接） ---------- */
.site-foot-icp {
  text-align: center;
  padding: 0 20px 18px;
  font-size: 12px;
  color: var(--fg-3);
}
.site-foot-icp a { color: var(--fg-3); text-decoration: none; }
.site-foot-icp a:hover { color: var(--fg-2); text-decoration: underline; }

/* ---------- 下载页 ---------- */
.dl-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }
.dl-meta .chip { font-size: 11.5px; }

/* ---------- 使用教程 ---------- */
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.step-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 7px;
}
.step-no {
  width: 26px; height: 26px; border-radius: 999px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #06121a; font-weight: 700; font-size: 13px;
}
.step-h { font-weight: 600; font-size: 14px; }
.step-b { font-size: 12.5px; color: var(--fg-2); line-height: 1.85; }

.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-q { font-weight: 600; font-size: 13.5px; }
.faq-a {
  font-size: 12.5px; color: var(--fg-2); line-height: 1.85;
  border-left: 2px solid var(--line-2); padding-left: 12px;
}

/* ---------- 后台 ---------- */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.subtab {
  padding: 9px 14px; font-size: 13px; color: var(--fg-2);
  text-decoration: none; border-bottom: 2px solid transparent;
}
.subtab.active { color: var(--fg); border-bottom-color: var(--accent); }
.subtab .badge { background: var(--warn); color: #000; border-radius: 999px; padding: 0 6px; font-size: 11px; }

.input.sm { padding: 5px 7px; font-size: 12.5px; width: 100%; min-width: 70px; }
.input.sm.num { max-width: 110px; }
textarea.input { font-family: inherit; resize: vertical; }

.pay-qr { max-width: 240px; display: block; margin: 12px 0; border-radius: var(--radius-sm); background: #fff; padding: 6px; }
.pay-text { background: var(--bg-3); padding: 12px; border-radius: var(--radius-sm); font-size: 13px; white-space: pre-wrap; }

.empty.small { padding: 24px; font-size: 13px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; top: 18px; transform: translate(-50%, -16px);
  background: var(--bg-3); color: var(--fg);
  border: 1px solid var(--line-2); border-left: 3px solid var(--ok);
  padding: 11px 16px; border-radius: var(--radius-sm);
  font-size: 13px; z-index: 999; opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  max-width: 90vw; box-shadow: 0 8px 26px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-left-color: var(--err); }
.toast.warn { border-left-color: var(--warn); }

@media (max-width: 640px) {
  .hero h1 { font-size: 28px; }
  .site-head .tagline { display: none; }
  .site-main { padding: 18px 14px 48px; }
}
