/* ==========================================================================
   易芯付 · 付款链路设计系统 nova-pay
   覆盖：收银台 cashier.php / 支付成功 payok.php / 支付失败 payerr.php
         微信转 QQ 教程 wx.php / 服务条款 agreement.php
   设计语言与 nova-admin.css、nova-auth.css 一致：
     主色 #1677ff / 深 #0b4fd8，底 #f4f6fa，白卡 16px 圆角，克制的柔和投影
   命名空间 .np-*
   注意：本机核验用无头 Edge 是 Chrome 100，**不使用 :has()**
   ========================================================================== */

/* ---------------------------------------------------------------- 1. 变量 */
:root {
  --np-brand: #1677ff;
  --np-brand-d: #0b4fd8;
  --np-brand-soft: #edf3ff;
  --np-brand-grad: linear-gradient(135deg, #3d8bff 0%, #1677ff 52%, #0b4fd8 100%);

  --np-bg: #f4f6fa;
  --np-card: #ffffff;
  --np-ink: #1f2a37;
  --np-ink-2: #5a6a7a;
  --np-ink-3: #93a0ae;
  --np-ink-4: #b9c4d0;
  --np-line: #e7ecf3;
  --np-line-2: #f0f4f9;

  --np-ok: #0f9d76;
  --np-ok-soft: #e8f8f0;
  --np-err: #e0575b;
  --np-err-soft: #fdecec;
  --np-warn: #c07d00;
  --np-warn-soft: #fff4e0;

  --np-r: 16px;
  --np-r-sm: 11px;
  --np-sh: 0 1px 2px rgba(16, 36, 72, .04), 0 6px 18px rgba(16, 36, 72, .05);
  --np-sh-lg: 0 18px 44px rgba(11, 79, 216, .16);
  --np-font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
             "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --np-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ---------------------------------------------------------------- 2. 基底 */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.np-body {
  margin: 0;
  padding: 0 0 108px;              /* 给吸底支付条留位置 */
  min-height: 100vh;
  font-family: var(--np-font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--np-ink);
  background: var(--np-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.np-body.np-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
}

.np-body a { color: var(--np-brand); text-decoration: none; }
.np-body a:hover { text-decoration: underline; }
.np-body img { max-width: 100%; display: block; border: 0; }
.np-body h1 { font-size: 22px; line-height: 1.35; margin: 0; font-weight: 600; }
.np-body h2 { font-size: 16px; line-height: 1.4; margin: 0; font-weight: 600; }
.np-body p { margin: 0; }

/* 数字统一等宽，金额不跳动 */
.np-num,
.np-amount-v,
.np-bar-sum b { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 3. 顶栏 */
.np-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid var(--np-line);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}

.np-top-in {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 18px;
}

.np-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.np-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* 站点首字徽标：收银台不露公司 logo（品牌规范只允许出现在关于页与下载页） */
.np-brand-dot {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--np-brand-grad);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(22, 119, 255, .26);
}

.np-brand b {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-top-tag {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 4px 11px;
  border-radius: 20px;
  background: var(--np-brand-soft);
  color: var(--np-brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
}

/* ---------------------------------------------------------------- 4. 主体 */
.np-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px 8px;
}

.np-card {
  background: var(--np-card);
  border-radius: var(--np-r);
  box-shadow: var(--np-sh);
  margin-bottom: 14px;
}

.np-card-pad { padding: 18px; }

.np-card-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--np-ink-3);
  letter-spacing: .3px;
}

/* ---------------------------------------------------- 5. 金额区（收银台核心） */
.np-amount {
  padding: 26px 18px 6px;
  text-align: center;
}

.np-amount-lb {
  font-size: 13px;
  color: var(--np-ink-3);
  margin-bottom: 6px;
}

.np-amount-v {
  font-size: 43px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.6px;
  color: var(--np-ink);
}

.np-amount-v i {
  font-style: normal;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  margin-right: 3px;
  vertical-align: 8px;
  color: var(--np-ink-2);
}

/* 手续费提示 */
.np-amount-fee {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--np-warn-soft);
  color: var(--np-warn);
  font-size: 12px;
  font-weight: 500;
}

/* 订单信息表 */
.np-meta {
  margin: 20px 0 0;
  padding: 14px 0 6px;
  border-top: 1px dashed var(--np-line);
  text-align: left;
}

.np-meta > div {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}

.np-meta dt {
  flex: 0 0 68px;
  color: var(--np-ink-3);
}

.np-meta dd {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  color: var(--np-ink-2);
  word-break: break-all;
}

.np-meta dd.np-mono {
  font-family: var(--np-mono);
  font-size: 12.5px;
  letter-spacing: -.2px;
}

/* ---------------------------------------------------------------- 6. 提示条 */
.np-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--np-r-sm);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 14px;
}

.np-note b { font-weight: 600; }
.np-note.warn { background: var(--np-warn-soft); color: #8a5b00; }
.np-note.err  { background: var(--np-err-soft);  color: #a83438; }
.np-note.ok   { background: var(--np-ok-soft);   color: #0a7357; }
.np-note.info { background: var(--np-brand-soft); color: #0b4fd8; }

.np-note-ic {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 2px;
}

.np-note a { font-weight: 600; text-decoration: underline; }

/* ---------------------------------------------------------------- 7. 支付方式 */
.np-methods {
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
}

.np-method {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 10px 8px;
  padding: 13px 14px;
  border: 1.5px solid var(--np-line);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s, background .16s, box-shadow .16s;
  -webkit-tap-highlight-color: transparent;
}

.np-method:last-child { margin-bottom: 4px; }

.np-method:hover { border-color: #c8d8ef; }

.np-method.active {
  border-color: var(--np-brand);
  background: #f7faff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .08);
}

/* 图标容器：ico 本身是 32×32，容器 34 时不放大不糊 */
.np-mi {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #f5f8fc;
  overflow: hidden;
}

.np-mi img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.np-mt {
  flex: 1 1 0;
  min-width: 0;
}

.np-mt b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}

.np-mt small {
  display: block;
  font-size: 11.5px;
  color: var(--np-ink-3);
  line-height: 1.5;
  margin-top: 1px;
}

/* 右侧圆形选择器 */
.np-mcheck {
  flex: 0 0 auto;
  position: relative;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1.5px solid #d3dce8;
  background: #fff;
  transition: all .16s;
}

.np-method.active .np-mcheck {
  border-color: var(--np-brand);
  background: var(--np-brand);
}

.np-method.active .np-mcheck::after {
  content: "";
  position: absolute;
  left: 5.6px;
  top: 3.2px;
  width: 4.4px;
  height: 8.2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

/* 空态：没有任何可用渠道 */
.np-empty {
  padding: 30px 18px 34px;
  text-align: center;
  color: var(--np-ink-3);
  font-size: 13.5px;
}

/* ---------------------------------------------------------------- 8. 吸底支付条 */
.np-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .94);
  border-top: 1px solid var(--np-line);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px));
}

.np-bar-in {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px;
}

.np-bar-sum {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.np-bar-sum small {
  display: block;
  font-size: 11.5px;
  color: var(--np-ink-3);
}

.np-bar-sum b {
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.7px;
  color: var(--np-ink);
}

.np-bar-sum b i {
  font-style: normal;
  font-size: 14px;
  font-weight: 600;
  margin-right: 2px;
  letter-spacing: 0;
  color: var(--np-ink-2);
}

/* 主按钮 */
.np-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .14s, box-shadow .16s, background .16s;
  -webkit-tap-highlight-color: transparent;
}

.np-btn.primary {
  background: var(--np-brand-grad);
  color: #fff;
  box-shadow: 0 8px 20px rgba(22, 119, 255, .3);
}

.np-btn.primary:hover { text-decoration: none; }
.np-btn.primary:active { transform: scale(.985); box-shadow: 0 4px 12px rgba(22, 119, 255, .26); }

.np-btn.ghost {
  background: #fff;
  color: var(--np-ink-2);
  border: 1px solid var(--np-line);
}

.np-btn.ghost:hover { text-decoration: none; border-color: #c8d8ef; color: var(--np-brand); }

.np-btn.block { display: flex; width: 100%; }

.np-pay-btn {
  flex: 0 0 auto;
  height: 46px;
  min-width: 148px;
  padding: 0 30px;
  border: 0;
  border-radius: 23px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: #fff;
  background: var(--np-brand-grad);
  box-shadow: 0 8px 20px rgba(22, 119, 255, .3);
  cursor: pointer;
  transition: transform .14s, box-shadow .16s;
}

.np-pay-btn:active { transform: scale(.985); box-shadow: 0 4px 12px rgba(22, 119, 255, .26); }

/* ---------------------------------------------------------------- 9. 结果页 */
.np-result {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 44px 26px 34px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--np-sh-lg);
  text-align: center;
}

.np-result-ic {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--np-ok-soft);
}

.np-result-ic svg {
  width: 44px;
  height: 44px;
}

.np-result-ic.err { background: var(--np-err-soft); }
.np-result-ic.wait { background: var(--np-brand-soft); }

.np-result h1 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.3px;
}

.np-result-desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--np-ink-2);
}

.np-result-tip {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: var(--np-r-sm);
  background: #f7f9fc;
  color: var(--np-ink-3);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: left;
}

.np-result-acts {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 结果页底部品牌署名 */
.np-sign {
  margin-top: 26px;
  font-size: 12px;
  color: var(--np-ink-4);
  text-align: center;
}

/* ---------------------------------------------------------------- 10. 教程页 */
.np-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 22px 16px 20px;
}

.np-article {
  background: #fff;
  border-radius: var(--np-r);
  box-shadow: var(--np-sh);
  padding: 30px 32px 34px;
}

.np-article > h1 {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -.5px;
}

.np-article .np-lead {
  margin-top: 10px;
  color: var(--np-ink-2);
  font-size: 14px;
  line-height: 1.75;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--np-line-2);
}

/* 有序步骤 */
.np-flow {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  counter-reset: npf;
}

.np-flow > li {
  position: relative;
  padding: 0 0 22px 44px;
  counter-increment: npf;
}

.np-flow > li::before {
  content: counter(npf);
  position: absolute;
  left: 0;
  top: 1px;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: var(--np-brand-soft);
  color: var(--np-brand);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 竖线连接 */
.np-flow > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 32px;
  bottom: 6px;
  width: 1px;
  background: var(--np-line);
}

.np-flow b { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.np-flow p { font-size: 13.5px; color: var(--np-ink-2); line-height: 1.7; }

.np-figure {
  margin: 6px 0 0;
  border-radius: var(--np-r-sm);
  overflow: hidden;
  border: 1px solid var(--np-line);
  background: #f7f9fc;
}

.np-figure img { width: 100%; height: auto; }

/* ---------------------------------------------------------------- 11. 条款排版 */
.np-terms {
  font-size: 14px;
  line-height: 1.85;
  color: var(--np-ink-2);
}

.np-terms h4 {
  margin: 26px 0 8px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--np-ink);
  letter-spacing: -.2px;
}

.np-terms h4:first-of-type { margin-top: 6px; }

.np-terms p { margin: 0 0 11px; }

.np-terms strong {
  font-weight: 600;
  color: var(--np-ink);
}

.np-terms .np-terms-lead {
  padding: 14px 16px;
  border-radius: var(--np-r-sm);
  background: #f7f9fc;
  border-left: 3px solid var(--np-brand);
  font-size: 13.5px;
  margin-bottom: 20px;
}

/* ---------------------------------------------------------------- 12. 弹层 */
.np-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* 遮罩与模糊放在独立层：直接给 .np-modal 加 backdrop-filter 会把弹层盒子一起糊掉 */
.np-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(18, 32, 55, .46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.np-modal.on { display: flex; }

.np-modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  padding: 26px 24px 20px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(11, 30, 60, .26);
  text-align: center;
  animation: np-pop .22s cubic-bezier(.22, .68, .32, 1);
}

@keyframes np-pop {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.np-modal-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.np-modal-box p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--np-ink-2);
  margin-bottom: 20px;
  word-break: break-word;
}

/* ---------------------------------------------------------------- 13. 页脚 */
.np-foot {
  max-width: 560px;
  margin: 6px auto 0;
  padding: 6px 18px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--np-ink-4);
  line-height: 1.8;
}

.np-foot a { color: var(--np-ink-3); }

/* ---------------------------------------------------------------- 14. 响应式 */
@media (max-width: 620px) {
  body.np-body { padding-bottom: 96px; font-size: 14.5px; }

  .np-main { padding: 12px 10px 4px; }

  .np-card { border-radius: 14px; margin-bottom: 11px; }

  .np-amount { padding: 22px 14px 4px; }
  .np-amount-v { font-size: 38px; }
  .np-amount-v i { font-size: 19px; vertical-align: 6px; }

  .np-method { margin: 0 6px 7px; padding: 12px 12px; }
  .np-mi { width: 32px; height: 32px; }
  .np-mi img { width: 25px; height: 25px; }

  .np-bar-in { padding: 0 12px; gap: 10px; }
  .np-pay-btn { min-width: 132px; padding: 0 22px; height: 44px; font-size: 15px; }
  .np-bar-sum b { font-size: 20px; }

  .np-result { padding: 34px 20px 28px; border-radius: 16px; }
  .np-result-ic { width: 68px; height: 68px; margin-bottom: 18px; }
  .np-result-ic svg { width: 34px; height: 34px; }
  .np-result h1 { font-size: 19px; }

  .np-article { padding: 22px 18px 26px; border-radius: 14px; }
  .np-article > h1 { font-size: 20px; }
  .np-page { padding: 14px 10px 16px; }

  .np-terms { font-size: 13.5px; }
}

/* 超窄屏：金额与按钮再收一档 */
@media (max-width: 380px) {
  .np-amount-v { font-size: 34px; letter-spacing: -1.2px; }
  .np-bar-sum b { font-size: 18px; }
  .np-pay-btn { min-width: 118px; padding: 0 18px; font-size: 14.5px; }
  .np-brand b { font-size: 14.5px; }
}

/* 桌面：卡片给一点立体感，页面上下留白；支付条从通栏改为居中浮动 */
@media (min-width: 900px) {
  body.np-body { padding-top: 8px; }

  .np-main { padding-top: 26px; }

  .np-card,
  .np-article { box-shadow: 0 2px 4px rgba(16, 36, 72, .03), 0 10px 30px rgba(16, 36, 72, .06); }

  .np-top-in,
  .np-bar-in { max-width: 560px; }

  .np-bar {
    left: 50%;
    right: auto;
    bottom: 24px;
    width: 560px;
    transform: translateX(-50%);
    border: 1px solid var(--np-line);
    border-radius: 20px;
    box-shadow: 0 12px 34px rgba(16, 36, 72, .13);
    padding: 12px 0;
    background: rgba(255, 255, 255, .96);
  }
}

/* 打印（条款页用得上） */
@media print {
  body.np-body { background: #fff; padding: 0; }
  .np-top, .np-bar, .np-foot, .np-modal { display: none !important; }
  .np-article { box-shadow: none; border-radius: 0; padding: 0; }
}
