/* ===== 网页版账户/充值/管理 共用样式（与首页同源的 Apple 式白底蓝） ===== */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --text: #1d1d1f;
  --text-sub: #6e6e73;
  --text-hint: #86868b;
  --border: #d2d2d7;
  --border-soft: #f2f2f4;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --ok: #34c759;
  --err: #ff3b30;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* 导航 */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px; height: 52px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.nav .brand { font-size: 17px; font-weight: 600; text-decoration: none; }
.nav .links { display: flex; gap: 18px; align-items: center; }
.nav .links a { font-size: 13px; color: var(--text-sub); text-decoration: none; }
.nav .links a:hover { color: var(--text); }
.nav .user-chip {
  font-size: 13px; color: var(--accent); background: var(--accent-soft);
  padding: 4px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap;
}

/* 子页头 */
.page-head { text-align: center; padding: 44px 20px 8px; }
.page-head h1 { font-size: 28px; font-weight: 600; letter-spacing: 0.4px; }
.page-head p { margin: 12px auto 0; max-width: 520px; font-size: 14px; line-height: 1.7; color: var(--text-sub); }

main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 28px 20px 48px; }
main.wide { max-width: 860px; }

/* 卡片 */
.card {
  background: var(--bg); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 24px 22px;
  margin-bottom: 16px;
}
.card h2 { font-size: 17px; font-weight: 600; margin-bottom: 14px; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.field input {
  width: 100%; font-size: 15px; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--text); outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus { border-color: var(--accent); }
.btn {
  display: inline-block; font-size: 15px; font-weight: 500; font-family: inherit;
  text-decoration: none; padding: 11px 26px; border-radius: 999px; border: none;
  cursor: pointer; transition: background 0.15s ease, transform 0.15s ease;
  text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { background: #a8c8ef; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--accent);
  border: 1px solid var(--border); width: 100%;
}
.btn-ghost:hover { border-color: var(--accent); }
.form-swap { margin-top: 14px; font-size: 13px; color: var(--text-sub); text-align: center; }
.form-swap a { color: var(--accent); text-decoration: none; }

/* 提示条 */
.msg { font-size: 13.5px; line-height: 1.6; border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; display: none; }
.msg.show { display: block; }
.msg-err { color: var(--err); background: rgba(255, 59, 48, 0.08); }
.msg-ok { color: #1d7a35; background: rgba(52, 199, 89, 0.12); }
.msg-info { color: var(--text-sub); background: var(--bg-soft); }

/* 余额条 */
.balance-row { display: flex; gap: 10px; flex-wrap: wrap; }
.balance-item {
  flex: 1; min-width: 140px; background: var(--bg-soft);
  border-radius: 14px; padding: 14px 16px;
}
.balance-item .num { font-size: 20px; font-weight: 600; }
.balance-item .lbl { font-size: 12px; color: var(--text-hint); margin-top: 3px; }

/* 套餐卡 */
.pkg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pkg {
  position: relative; border: 1.5px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 18px 16px; cursor: pointer; background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pkg:hover { border-color: var(--border); }
.pkg.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pkg .name { font-size: 15px; font-weight: 600; }
.pkg .price { font-size: 21px; font-weight: 600; margin: 8px 0 4px; }
.pkg .price small { font-size: 12px; font-weight: 400; color: var(--text-hint); }
.pkg .desc { font-size: 12px; color: var(--text-sub); line-height: 1.6; }
.pkg .tag {
  position: absolute; top: 12px; right: 12px; font-size: 11px;
  color: #d9a13c; background: rgba(217, 161, 60, 0.15);
  padding: 2px 9px; border-radius: 999px;
}
.sec-title { font-size: 15px; font-weight: 600; margin: 20px 0 12px; }

/* 订单面板 */
.pay-amount { font-size: 30px; font-weight: 600; text-align: center; margin: 6px 0 2px; }
.pay-amount small { font-size: 13px; font-weight: 400; color: var(--text-hint); }
.pay-orderid {
  text-align: center; font-size: 12px; color: var(--text-hint);
  letter-spacing: 0.5px; margin-bottom: 16px; user-select: all;
}
.qr-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.qr-tab {
  font-size: 13px; padding: 7px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); font-family: inherit;
}
.qr-tab.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.qr-box {
  width: 220px; height: 220px; margin: 0 auto; border: 1px solid var(--border-soft);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); font-size: 13px; color: var(--text-hint);
  text-align: center; line-height: 1.7; padding: 12px;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.pay-note { font-size: 12.5px; color: var(--text-sub); line-height: 1.8; margin-top: 14px; }
.status-pill {
  display: inline-block; font-size: 12px; padding: 4px 12px; border-radius: 999px;
}
.st-pending { color: #b25e09; background: rgba(245, 158, 11, 0.13); }
.st-paid { color: #1d7a35; background: rgba(52, 199, 89, 0.13); }

/* 管理页订单行 */
.order-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px;
}
.order-row:last-child { border-bottom: none; }
.order-row .oid { font-family: ui-monospace, Consolas, monospace; color: var(--text-sub); }
.order-row .btn { padding: 7px 16px; font-size: 13px; width: auto; }

/* 页脚 */
footer {
  border-top: 1px solid var(--border-soft);
  padding: 20px; text-align: center; font-size: 12px; color: var(--text-hint); line-height: 2;
}
footer a { color: var(--text-sub); text-decoration: none; }

@media (max-width: 480px) {
  .pkg-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .page-head, main { animation: rise 0.4s ease both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
}
