/* ==========================================================================
   Pop eSIM — 设计系统 + 商城样式
   风格：冷静克制 / 留白优先 — 近黑主色、冷白纸面、极细分割线、无渐变无光晕
   ========================================================================== */
:root {
  /* 文字：冷中性灰阶，避免暖黄发旧 */
  --ink: #101216;
  --ink-2: #3c414a;
  --muted: #6a7079;
  --muted-2: #9ba1aa;

  /* 线与面：白 → 极浅灰的三层，靠明度区分层次而不是靠边框 */
  --line: #e6e8ec;
  --line-2: #f0f1f4;
  /* 卡片描边：比分隔线更淡，让卡片靠明度浮起来而不是靠黑框 */
  --line-soft: #edeff2;
  --bg: #fbfbfc;
  --bg-2: #f5f6f8;
  --card: #ffffff;

  /* 主色：近黑（实色，不使用渐变） */
  --brand: #17191e;
  --brand-ink: #101216;
  --brand-soft: #f3f4f7;

  /* 状态色：降饱和，与灰阶共存不刺眼 */
  --ok: #16735a;
  --ok-soft: #edf7f3;
  --warn: #95601c;
  --warn-soft: #fbf5e9;
  --err: #a83b2e;
  --err-soft: #fcefed;

  /* 圆角 / 阴影：圆角略大显柔和，阴影几乎不可见只留一点浮起感 */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 18, 22, .035);
  --shadow: 0 1px 2px rgba(16, 18, 22, .04), 0 12px 28px -22px rgba(16, 18, 22, .22);
  --shadow-lg: 0 2px 4px rgba(16, 18, 22, .04), 0 24px 48px -32px rgba(16, 18, 22, .26);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, "Courier New", monospace;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  /* 内容少的页面（如个人中心）也让页脚贴底，避免下方露白 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
body > .site-footer { margin-top: auto; }
body.admin { display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }
::selection { background: #dfe2e7; color: var(--ink); }

h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.015em; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }
.mono { font-family: var(--mono); font-variant-ligatures: none; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 按钮 ---------- */
.btn {
  --btn-bg: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--btn-bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, opacity .14s;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { border-color: #d5d8de; background: #fafbfc; }
.btn:active { background: #f4f6f8; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}
.btn-primary:hover { background: #101216; border-color: #101216; }
.btn-primary:active { background: #101216; }
.btn-dark { background: #101216; color: #ffffff; border-color: #101216; }
.btn-dark:hover { background: #2b2e34; border-color: #2b2e34; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg-2); border-color: transparent; color: var(--ink); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 12.5px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn .ico { width: 18px; height: 18px; flex: none; }

/* ---------- 标签 / 徽章 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 23px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
  background: var(--bg-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill-ok { background: var(--ok-soft); color: #12604a; border-color: #d7ebe3; }
.pill-warn { background: var(--warn-soft); color: #855314; border-color: #eee4cf; }
.pill-err { background: var(--err-soft); color: #993428; border-color: #f4dad5; }
.pill-mute { background: var(--bg-2); color: var(--muted); border-color: var(--line); }
.dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 30px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--ink);
  display: grid; place-items: center;
  color: #ffffff;
}
.brand-mark svg { width: 17px; height: 17px; }
.brand-name { font-size: 16px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 4px; }
.nav a {
  padding: 7px 11px; border-radius: 5px; font-size: 13.5px; color: var(--muted); font-weight: 500;
  transition: color .14s, background .14s;
}
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: #f3f4f7; padding: 64px 0 54px; border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1fr 460px; gap: 56px; align-items: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 22px;
}
.hero-kicker::before { content: ""; width: 22px; height: 1px; background: var(--ink); }
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 3.3vw, 41px);
  letter-spacing: -.012em;
  line-height: 1.32;
  font-weight: 500;
  text-wrap: balance;
}
.hero p.lead { color: var(--muted); font-size: 15px; max-width: 480px; line-height: 1.8; }
.hero-cta { display: flex; gap: 10px; margin: 30px 0 0; flex-wrap: wrap; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, auto); justify-content: start;
  gap: 0; margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line);
}
.hero-stat { padding-right: 30px; margin-right: 30px; border-right: 1px solid var(--line); }
.hero-stat:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.hero-stat b {
  display: block; font-size: 21px; font-weight: 600; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; line-height: 1.3;
}
.hero-stat span { font-size: 12px; color: var(--muted-2); }

/* Hero 右侧：安装凭证 */
.hero-visual { display: flex; align-items: center; }
.pass {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 150px;
}
.pass-main { padding: 22px 22px 20px; min-width: 0; }
.pass-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line-2);
}
.pass-label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.pass-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--ok); }
.pass-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pass-num {
  font-family: var(--mono); font-size: 25px; letter-spacing: .01em; font-weight: 500;
  color: var(--ink); line-height: 1.2;
}
.pass-meta { font-family: var(--mono); font-size: 11px; color: var(--muted-2); margin-top: 7px; letter-spacing: .01em; }
.pass-rows { margin-top: 20px; }
.pass-rows > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 12px;
}
.pass-rows > div:last-child { border-bottom: none; padding-bottom: 0; }
.pass-rows dt { color: var(--muted-2); flex: none; }
.pass-rows dd {
  margin: 0; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2);
  text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pass-side {
  border-left: 1px dashed var(--line);
  padding: 22px 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  background: #fafbfc;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.pass-qr {
  width: 100%; aspect-ratio: 1; background: #ffffff; border: 1px solid var(--line);
  border-radius: 6px; padding: 9px; display: grid; place-items: center;
}
.pass-qr svg { width: 100%; height: auto; }
.pass-qr-cap { font-size: 10.5px; color: var(--muted-2); letter-spacing: .02em; }
.pass-note { font-size: 11.5px; color: var(--muted-2); }

/* ---------- 区块 ---------- */
.section { padding: 64px 0; background: var(--bg); }
.section-head { max-width: 620px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(23px, 2.4vw, 29px); letter-spacing: -.022em; line-height: 1.32; }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.eyebrow {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px;
}

/* ---------- 档位卡 ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tier-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px 20px;
  transition: border-color .16s, box-shadow .16s;
  display: flex; flex-direction: column;
}
.tier-card:hover { border-color: #d5d8de; box-shadow: var(--shadow); }
.tier-card.featured { border-color: var(--ink); }
.tier-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tier-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.tier-sub { font-size: 12.5px; color: var(--muted-2); margin-top: 5px; }
.tier-price { display: flex; align-items: baseline; gap: 3px; margin: 22px 0 15px; }
.tier-price .cur { font-size: 17px; font-weight: 500; color: var(--muted); }
.tier-price .amt {
  font-size: 38px; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums;
  line-height: 1;
}
.tier-price .unit { font-size: 12.5px; color: var(--muted-2); margin-left: 4px; }
.tier-feats { margin: 20px 0 22px; display: flex; flex-direction: column; gap: 9px; }
.tier-feats li { display: flex; gap: 9px; font-size: 13px; color: var(--ink-2); align-items: flex-start; line-height: 1.5; }
.tier-feats .tick { color: var(--muted); flex: none; margin-top: 2px; }
.tier-card .btn { margin-top: auto; }
.stock-line { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted-2); margin-bottom: 16px; }
.stock-bar { height: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; flex: 1; }
.stock-bar i { display: block; height: 100%; border-radius: 2px; background: #c2c7d0; }
.sold-out {
  position: absolute; inset: 0; border-radius: var(--radius); background: rgba(255, 255, 255, .78);
  display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--muted);
}

/* ---------- 步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { position: relative; background: var(--card); padding: 24px 22px 22px; }
.step .n {
  font-family: var(--mono); font-size: 12px; color: var(--muted-2); font-weight: 600;
  margin-bottom: 16px; letter-spacing: .06em;
}
.step h4 { font-size: 14.5px; margin-bottom: 7px; }
.step p { font-size: 12.5px; color: var(--muted); line-height: 1.7; }

/* ---------- 特性 ---------- */
.bento { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.bento-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px;
}
.bento-card.dark { background: #17191e; color: #ffffff; border-color: #17191e; }
.bento-card.dark p { color: rgba(255, 255, 255, .62); }
.bento-icon {
  width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--bg-2); color: var(--ink-2);
}
.bento-card.dark .bento-icon { background: rgba(255, 255, 255, .1); color: #ffffff; }
.bento-card h4 { font-size: 15px; margin-bottom: 8px; }
.bento-card p { font-size: 13px; color: var(--muted); line-height: 1.72; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 0; max-width: 820px; border-top: 1px solid var(--line); }
.faq-item { background: transparent; border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; padding: 18px 2px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.faq-q:hover { color: #101216; }
.faq-a { padding: 0 2px 18px; font-size: 13px; color: var(--muted); line-height: 1.8; display: none; max-width: 720px; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.chev { transition: transform .18s; color: var(--muted-2); }

/* ---------- 页脚 ---------- */
.site-footer { background: #17191e; color: #ffffff; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .brand-name { color: #ffffff; }
.site-footer .brand-mark { background: #ffffff; color: var(--ink); }
.site-footer p { color: rgba(255, 255, 255, .5); font-size: 13px; line-height: 1.75; }
.footer-col h5 {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .38);
  margin: 0 0 14px; font-weight: 600;
}
.footer-col a { display: block; font-size: 13px; color: rgba(255, 255, 255, .66); padding: 5px 0; }
.footer-col a:hover { color: #ffffff; }
.footer-bottom {
  margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: rgba(255, 255, 255, .4);
  flex-wrap: wrap;
}

/* ---------- 通用面板 / 表单 ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 24px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--muted-2); line-height: 1.6; }
.input, .select, textarea.input {
  height: 44px; padding: 0 13px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #ffffff; font-size: 14px; color: var(--ink); font-family: inherit; width: 100%;
  transition: border-color .14s, box-shadow .14s;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: #b6bbc4; box-shadow: 0 0 0 3px rgba(28, 29, 33, .07);
}
.input::placeholder { color: #a8a49c; }
textarea.input { height: auto; padding: 11px 13px; resize: vertical; line-height: 1.65; }
.input-group { display: flex; gap: 10px; }
.input-group .input { flex: 1; }

/* 步进条 */
.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
.stepper .s {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted-2); font-weight: 500;
}
.stepper .s b {
  width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center;
  background: var(--bg-2); color: var(--muted-2); font-size: 11px; font-weight: 600;
  border: 1px solid var(--line);
}
.stepper .s.active { color: var(--ink); font-weight: 600; }
.stepper .s.active b { background: var(--ink); border-color: var(--ink); color: #ffffff; }
.stepper .s.done b { background: var(--ok-soft); border-color: #d7ebe3; color: var(--ok); }
.stepper .line { width: 22px; height: 1px; background: var(--line); }

/* 选择卡 */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.choice {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 15px;
  background: #ffffff; cursor: pointer; transition: border-color .14s, background .14s;
}
.choice:hover { border-color: #d5d8de; }
.choice.sel { border-color: var(--ink); background: #fafbfc; box-shadow: inset 0 0 0 1px var(--ink); }
.choice .t { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.choice .p { margin-top: 8px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.choice .p small { font-size: 11.5px; font-weight: 400; color: var(--muted-2); }
.choice .m { margin-top: 5px; font-size: 11.5px; color: var(--muted-2); }
.choice.disabled { opacity: .45; cursor: not-allowed; }

/* 数量 */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; height: 44px; }
.qty button { width: 42px; height: 100%; border: none; background: #ffffff; font-size: 16px; color: var(--ink-2); cursor: pointer; }
.qty button:hover { background: var(--bg-2); }
.qty input { width: 60px; height: 100%; border: none; text-align: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.qty input:focus { outline: none; }

/* 号码选择 */
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; padding: 1px; }
.num-chip {
  border: 1px solid var(--line); border-radius: 5px; padding: 9px 11px; cursor: pointer; background: #ffffff;
  font-family: var(--mono); font-size: 13px; transition: border-color .12s, background .12s;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.num-chip:hover { border-color: #d5d8de; }
.num-chip.sel { border-color: var(--ink); background: var(--ink); color: #ffffff; }
.num-chip .tick { opacity: 0; color: currentColor; }
.num-chip.sel .tick { opacity: 1; }

/* 摘要卡 */
.summary { position: sticky; top: calc(var(--header-h) + 20px); }
.summary-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.summary-head { padding: 18px 20px; border-bottom: 1px solid var(--line-2); font-weight: 600; font-size: 14px; }
.summary-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 11px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.kv span { color: var(--muted); }
.kv b { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.summary-total { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; display: flex; justify-content: space-between; align-items: baseline; }
.summary-total .amt { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.summary-foot { padding: 16px 20px 20px; background: #fafbfc; border-top: 1px solid var(--line-2); }

/* 订单结果 */
.order-hero { padding: 40px 0 8px; }
.status-hero { display: flex; align-items: center; gap: 16px; }
.status-icon {
  width: 46px; height: 46px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: var(--ok-soft); color: var(--ok); border: 1px solid #d7ebe3;
}
.status-icon.warn { background: var(--warn-soft); color: var(--warn); border-color: #eee4cf; }
.status-icon.err { background: var(--err-soft); color: var(--err); border-color: #f4dad5; }
.timeline { display: flex; gap: 0; margin: 26px 0 8px; }
.tl-step { flex: 1; position: relative; padding-top: 26px; font-size: 12px; color: var(--muted-2); }
.tl-step::before {
  content: ""; position: absolute; top: 6px; left: 0; width: 10px; height: 10px; border-radius: 50%;
  background: #ffffff; border: 1px solid var(--line); box-shadow: none;
}
.tl-step::after { content: ""; position: absolute; top: 11px; left: 12px; right: 0; height: 1px; background: var(--line); }
.tl-step:last-child::after { display: none; }
.tl-step.done { color: var(--ink); font-weight: 600; }
.tl-step.done::before { background: var(--ink); border-color: var(--ink); }
.tl-step.done::after { background: #c9ced6; }

.esim-result {
  display: grid; grid-template-columns: 280px 1fr; gap: 26px; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.qr-box { background: #ffffff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; place-items: center; }
.qr-box img, .qr-box svg { width: 100%; height: auto; }
.qr-caption { text-align: center; font-size: 11.5px; color: var(--muted-2); margin-top: 10px; }
.cred-list { display: flex; flex-direction: column; gap: 1px; }
.cred-row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center;
  padding: 9px 10px; border-radius: 5px;
}
.cred-row:hover { background: var(--bg-2); }
.cred-row .k { font-size: 12px; color: var(--muted-2); }
.cred-row .v { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.copy-btn {
  border: 1px solid var(--line); background: #ffffff; border-radius: 4px; height: 26px; padding: 0 8px;
  font-size: 11px; color: var(--muted); cursor: pointer;
}
.copy-btn:hover { color: var(--ink); border-color: #d5d8de; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab {
  border: none; background: none; padding: 12px 14px; font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
/* Frontend tabs scroll horizontally only; negative margins create a 1px vertical overflow. */
body:not(.admin) .tabs { overflow-y: hidden; }
body:not(.admin) .tabs .tab { flex: 0 0 auto; margin-bottom: 0; }

/* 表格 */
.table-wrap { overflow-x: auto; }
body:not(.admin) .table-wrap { overflow-y: hidden; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted-2); padding: 11px 13px;
  background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap;
  letter-spacing: .02em;
}
table.tbl td { padding: 12px 13px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr:hover { background: #fafbfc; }
table.tbl tbody tr:last-child td { border-bottom: none; }

/* 数据展示 */
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.stat-tile .lab { font-size: 12px; color: var(--muted-2); }
.stat-tile .val { font-size: 22px; font-weight: 600; letter-spacing: -.025em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-tile .sub { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }

/* 空态 / 加载 */
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .ico {
  width: 44px; height: 44px; border-radius: 8px; background: var(--bg-2);
  display: grid; place-items: center; margin: 0 auto 14px; color: var(--muted-2);
}
.skeleton { background: #eff1f4; animation: skp 1.5s ease-in-out infinite; border-radius: 4px; }
@keyframes skp { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.spinner { width: 15px; height: 15px; border: 1.5px solid rgba(255, 255, 255, .35); border-top-color: #ffffff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.dark { border-color: #dcdfe5; border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 230px; max-width: 380px; background: #17191e; color: #ffffff; padding: 12px 15px; border-radius: var(--radius-sm);
  font-size: 13px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start;
  animation: toastIn .2s ease;
}
.toast.ok { background: #1c4a3a; }
.toast.err { background: #4d221c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } }

/* 提示条 */
.notice {
  display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.7;
  background: #f7f8fa; border: 1px solid var(--line); color: var(--ink-2);
}
.notice .ico { flex: none; margin-top: 1px; color: var(--muted); }
.notice.warn { background: var(--warn-soft); border-color: #eee4cf; color: #855314; }
.notice.warn .ico { color: var(--warn); }
.notice.err { background: var(--err-soft); border-color: #f4dad5; color: #993428; }
.notice.err .ico { color: var(--err); }
.notice.ok { background: var(--ok-soft); border-color: #d7ebe3; color: #12604a; }
.notice.ok .ico { color: var(--ok); }

/* 服务器返回的富文本（帮助页） */
.prose { font-size: 14px; color: var(--ink-2); line-height: 1.85; }
.prose h3 { font-size: 16px; margin: 24px 0 8px; }
.prose p { margin: 8px 0; color: var(--muted); }
.prose ul { list-style: disc; padding-left: 20px; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .nav { display: none; }
  .tier-grid, .steps, .bento, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 29px; }
  .hero-stats { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .hero-stat { padding-right: 16px; margin-right: 16px; }
  .hero-stat:nth-child(2n) { border-right: none; margin-right: 0; padding-right: 0; }
  .esim-result { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .cred-row { grid-template-columns: 92px 1fr; }
  .cred-row .copy-btn { grid-column: 2; justify-self: start; }
  .summary { position: static; }
  .timeline { display: none; }
  .status-hero { flex-wrap: wrap; align-items: flex-start; }
  .status-hero h1 { font-size: 19px !important; }
  .status-hero > div:last-child {
    width: 100%; text-align: left; margin-top: 2px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  }
  .status-hero > div:last-child > div { margin-top: 0 !important; }
}

/* ==========================================================================
   账号 / 支付 / 个人中心
   ========================================================================== */

/* 顶栏账号信息 */
.account-chip {
  display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2);
  color: var(--ink-2); font-size: 13px;
}
.account-chip .mono { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chip .link { margin-left: auto; }

/* 登录 / 注册 */
.auth-wrap { padding: 60px 0 80px; display: flex; justify-content: center; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 30px; box-shadow: var(--shadow);
}
.auth-title { font-size: 24px; letter-spacing: -.01em; }
.auth-sub { font-size: 13px; margin-top: 7px; line-height: 1.65; }
.auth-foot {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-2);
  font-size: 13px; color: var(--muted); text-align: center;
}

/* 支付页收款信息 */
.pay-rows { display: flex; flex-direction: column; gap: 8px; }
.pay-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
}
.pay-label {
  flex: 0 0 auto; min-width: 62px; font-size: 12px; font-weight: 600; color: var(--muted);
}
.pay-row .mono { font-size: 13px; }
.pay-qr {
  display: flex; justify-content: center; padding: 18px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #ffffff;
}
.pay-qr img { width: 200px; height: 200px; object-fit: contain; display: block; }

/* 个人中心列表 */
.acct-list { display: flex; flex-direction: column; gap: 10px; }
.acct-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 17px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.acct-main { min-width: 0; flex: 1; }
.acct-side {
  display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
}
.acct-side .amt { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }

@media (max-width: 720px) {
  .acct-row { flex-wrap: wrap; }
  .acct-side { width: 100%; justify-content: space-between; }
  .auth-card { padding: 26px 20px; }
}

:focus-visible { outline: 3px solid #346ec6; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media (max-width: 600px) { .btn { min-height: 44px; } .hero { padding-block: 28px; } footer { padding-block: 28px; } }

/* ==========================================================================
   v2 质感微调：卡片边框退后、主色更利落、状态色统一
   ========================================================================== */
.tier-card, .bento-card:not(.dark), .panel, .summary-card, .stat-tile, .pass, .esim-result {
  border-color: var(--line-soft);
}
.tier-card, .panel, .summary-card, .stat-tile {
  box-shadow: var(--shadow-sm);
}
.tier-card:hover { border-color: #dfe2e7; box-shadow: var(--shadow); }
.tier-card.featured { border-color: var(--ink); box-shadow: 0 1px 2px rgba(16,18,22,.05); }
.panel-pad { padding: 26px; }
.choice.sel { border-color: var(--ink); background: #fafbfc; box-shadow: none; }
.summary-card { box-shadow: var(--shadow-sm); }
.summary-foot { border-top: 1px solid var(--line-2); }
.pill { border-radius: 5px; }
.input, .select, textarea.input { border-color: var(--line); }
.input:hover, .select:hover, textarea.input:hover { border-color: #d9dce2; }
.btn { font-weight: 600; letter-spacing: -.005em; }
.btn-sm { border-radius: 7px; }
.nav a { font-weight: 500; }
.section-head h2 { font-weight: 600; letter-spacing: -.028em; }
.eyebrow { color: var(--muted-2); font-weight: 700; }
.site-footer { background: #12141a; }

/* 页面级大标题统一用常规字重，避免中文字体被渲染成粗黑块 */
h1 { font-weight: 500; letter-spacing: -.012em; }
.auth-title, .account-title { font-weight: 500; letter-spacing: -.015em; }

/* 数量控件：输入框与加减按钮之间用细线分隔，避免看起来像三个控件挤在一起 */
.qty input { border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-top: 0; border-bottom: 0; height: 100%; }
.qty button { border: 0; background: transparent; }

/* ---------- 号码自助：安装信息 ---------- */
.cred-split { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 26px; align-items: start; }
.cred-qr { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: #fff; }
.cred-qr img { width: 100%; height: auto; display: block; }
.cred-item { margin: 0 0 14px; }
.cred-item:last-child { margin-bottom: 0; }
.cred-val { font-size: 12px; line-height: 1.65; margin-top: 4px; overflow-wrap: anywhere; }
.cred-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.cred-guide {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--muted);
}
.cred-guide b { color: var(--ink); font-weight: 600; margin-right: 8px; }

@media (max-width: 720px) {
  .cred-split { grid-template-columns: 1fr; gap: 18px; }
  .cred-qr { max-width: 220px; margin: 0 auto; }
  .cred-pair { grid-template-columns: 1fr; }
}
