/* ==========================================================================
   辉辰矩阵 · 会员中心 / 管理后台 / 登录页 / 下载页（复用 site.css 的 Design Tokens）
   1 基础 2 顶栏 3 侧栏 4 卡片与指标 5 表格 6 表单 7 徽标/提示 8 雷达 9 弹层 10 响应式
   ========================================================================== */

/* ---------- 1 基础 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body.dash-body { background: var(--paper-soft, #f6f7fb); color: var(--text, #0f1222); min-height: 100vh; }
.dash-top { background: #fff; border-bottom: 1px solid var(--line, #e5e7f0); position: sticky; top: 0; z-index: 50; }
.dash-top__inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 18px; }
.dash-top .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; letter-spacing: -.02em; color: var(--text, #0f1222); text-decoration: none; }
.dash-top .brand img { width: 30px; height: 30px; border-radius: 8px; }
.dash-top__user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2, #3d4358); }
.dash-top__user b { color: var(--text, #0f1222); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad-brand, linear-gradient(135deg,#4f46e5,#8b5cf6)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.dash-layout { max-width: 1240px; margin: 0 auto; padding: 22px 24px 60px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
.dash-side { position: sticky; top: 84px; background: #fff; border: 1px solid var(--line, #e5e7f0); border-radius: 16px; padding: 12px; }
.dash-side a { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; color: var(--text-2, #3d4358); font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; }
.dash-side a:hover { background: var(--paper-soft, #f6f7fb); color: var(--text, #0f1222); }
.dash-side a.on { background: var(--brand-soft, #eef0ff); color: var(--brand, #4f46e5); }
.dash-side .sep { height: 1px; background: var(--line, #e5e7f0); margin: 10px 8px; }
.dash-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.dash-main > .view { min-width: 0; }
.view { display: none; }
.view.on { display: block; }
.dash-page-title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.dash-page-sub { color: var(--text-3, #6b7186); font-size: 13px; margin: 0 0 18px; }

/* ---------- 4 卡片与指标 ---------- */
.pcard { background: #fff; border: 1px solid var(--line, #e5e7f0); border-radius: 16px; padding: 22px; }
.pcard h3 { font-size: 15.5px; margin: 0 0 4px; }
.pcard--ink { background: #12162b; border-color: rgba(255,255,255,.1); color: #f4f5fb; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric { background: #fff; border: 1px solid var(--line, #e5e7f0); border-radius: 14px; padding: 16px 18px; }
.metric b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.metric span { font-size: 12px; color: var(--text-3, #6b7186); }
.metric small { font-size: 11.5px; color: var(--text-3, #6b7186); display: block; margin-top: 2px; }
.member-card { background: radial-gradient(900px 300px at 15% 0%, rgba(99,102,241,.28) 0%, transparent 60%), #0f1222; color: #fff; border-radius: 20px; padding: 26px; position: relative; overflow: hidden; }
.member-card h2 { font-size: 22px; margin: 0 0 2px; letter-spacing: -.02em; color: #fff; }
.member-card .muted { color: #9aa0be; font-size: 12.5px; }
.member-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 800; letter-spacing: .04em; background: rgba(255,255,255,.1); color: #c7c9ff; }
.member-badge.vip1 { background: rgba(59,130,246,.22); color: #93c5fd; }
.member-badge.vip2 { background: rgba(139,92,246,.25); color: #c4b5fd; }
.member-badge.vip3 { background: rgba(245,158,11,.2); color: #fcd34d; }
.member-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 20px; background: rgba(255,255,255,.08); border-radius: 12px; overflow: hidden; }
.member-stats div { background: rgba(15,18,34,.72); padding: 12px 16px; }
.member-stats b { display: block; font-size: 18px; color: #fff; }
.member-stats span { font-size: 11.5px; color: #9aa0be; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stack { display: grid; gap: 12px; }
.row-flex { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- 5 表格 ---------- */
.ptable-wrap { overflow-x: auto; border: 1px solid var(--line, #e5e7f0); border-radius: 14px; background: #fff; }
table.ptable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ptable th { text-align: left; background: var(--paper-soft, #f6f7fb); color: var(--text-3, #6b7186); font-size: 11.5px; letter-spacing: .04em; font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line, #e5e7f0); white-space: nowrap; }
.ptable td { padding: 11px 14px; border-bottom: 1px solid var(--line, #e5e7f0); vertical-align: middle; color: var(--text-2, #3d4358); }
.ptable tr:last-child td { border-bottom: 0; }
.ptable td b { color: var(--text, #0f1222); }
.ptable .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.ptable .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl-empty { padding: 28px; text-align: center; color: var(--text-3, #6b7186); font-size: 13px; }

/* ---------- 6 表单 ---------- */
.input, .select, .textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line-2, #d7dae6); border-radius: 9px; padding: 10px 12px; font-size: 14px; color: var(--text, #0f1222); background: #fff; font-family: inherit; }
.textarea { min-height: 90px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand, #4f46e5); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid.g3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.g4 { grid-template-columns: repeat(4, 1fr); }
.field { display: grid; gap: 6px; font-size: 12.5px; color: var(--text-3, #6b7186); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; box-sizing: border-box; border-radius: 9px; border: 1px solid transparent; font-size: 13.5px; font-weight: 700; cursor: pointer; text-decoration: none; font-family: inherit; white-space: nowrap; }
.btn--primary { background: var(--brand, #4f46e5); color: #fff; }
.btn--primary:hover { background: #4338ca; }
.btn--ghost { background: #fff; color: var(--text, #0f1222); border-color: var(--line-2, #d7dae6); }
.btn--ghost:hover { border-color: var(--brand, #4f46e5); color: var(--brand, #4f46e5); }
.btn--danger { background: #fff; color: #e11d48; border-color: #fecdd3; }
.btn--danger:hover { background: #fff1f2; }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn--lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 11px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn--onink { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.btn--onink:hover { background: rgba(255,255,255,.16); }

/* ---------- 7 徽标/提示 ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; background: var(--paper-mute, #eef0f7); color: var(--text-2, #3d4358); }
.badge.ok { background: #e6faf3; color: #047857; }
.badge.warn { background: #fff4e0; color: #b45309; }
.badge.err { background: #fdecec; color: #b91c1c; }
.badge.info { background: #eef0ff; color: #4338ca; }
.notice { border: 1px solid var(--line, #e5e7f0); background: #fff; border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--text-2, #3d4358); display: flex; gap: 10px; align-items: flex-start; }
.notice b { color: var(--text, #0f1222); }
.notice--warn { background: #fffaf0; border-color: #fde68a; }
.notice--info { background: var(--brand-soft, #eef0ff); border-color: #ddd6fe; }
.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px); background: #0f1222; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 12px 30px rgba(0,0,0,.25); opacity: 0; transition: all .25s; z-index: 200; max-width: 82vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #b91c1c; }
.toast.ok { background: #047857; }
.empty { padding: 34px 20px; text-align: center; color: var(--text-3, #6b7186); font-size: 13px; }
.empty b { display: block; color: var(--text, #0f1222); font-size: 14.5px; margin-bottom: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line, #e5e7f0); margin-bottom: 16px; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-size: 13.5px; font-weight: 700; color: var(--text-3, #6b7186); cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; }
.tabs button.on { color: var(--brand, #4f46e5); border-bottom-color: var(--brand, #4f46e5); }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper-soft, #f6f7fb); border: 1px dashed var(--line-2, #d7dae6); border-radius: 10px; padding: 12px 14px; }
.code-box b { font-family: ui-monospace, Consolas, monospace; font-size: 20px; letter-spacing: .16em; color: var(--brand, #4f46e5); }
.link-pill { display: block; font-size: 12px; color: var(--text-3, #6b7186); word-break: break-all; margin-top: 8px; }
.link-pill code { background: #fff; border: 1px solid var(--line, #e5e7f0); padding: 2px 6px; border-radius: 5px; }
.kv-grid { display: grid; grid-template-columns: 120px 1fr; gap: 10px 12px; font-size: 13px; }
.kv-grid dt { color: var(--text-3, #6b7186); }
.kv-grid dd { margin: 0; font-weight: 600; }

/* ---------- 8 雷达 ---------- */
.tier { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; font-size: 11px; font-weight: 800; }
.tier.A { background: rgba(16,185,129,.14); color: #047857; border: 1px solid rgba(16,185,129,.35); }
.tier.B { background: rgba(245,158,11,.14); color: #b45309; border: 1px solid rgba(245,158,11,.35); }
.tier.C { background: rgba(148,163,184,.14); color: #475569; border: 1px solid rgba(148,163,184,.35); }
.score { font-family: ui-monospace, Consolas, monospace; font-weight: 700; }
.lead-content { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filter-bar .input, .filter-bar .select { width: auto; min-width: 120px; }
.radar-hero { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.upsell { border: 1px dashed var(--line-2, #d7dae6); border-radius: 14px; padding: 24px; text-align: center; color: var(--text-2, #3d4358); }
.upsell b { display: block; font-size: 16px; color: var(--text, #0f1222); margin-bottom: 6px; }

/* ---------- 9 弹层 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(10,12,22,.55); display: none; align-items: center; justify-content: center; z-index: 150; padding: 20px; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 16px; max-width: 520px; width: 100%; padding: 26px; box-shadow: 0 24px 60px rgba(0,0,0,.3); max-height: 86vh; overflow: auto; }
.modal h3 { margin: 0 0 8px; font-size: 17px; }
.modal .modal-close { float: right; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--text-3, #6b7186); }

/* ---------- 登录页 ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside { background: radial-gradient(900px 500px at 10% 0%, #1e2447 0%, transparent 60%), radial-gradient(800px 500px at 100% 100%, #2d1c52 0%, transparent 55%), #0a0c16; color: #f4f5fb; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-aside h1 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -.03em; line-height: 1.2; margin: 26px 0 16px; }
.auth-aside p { color: #b9bdd2; font-size: 14.5px; line-height: 1.8; max-width: 430px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: #fff; }
.auth-card { width: 100%; max-width: 392px; }
.auth-card h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 6px; }
.auth-card .sub { color: var(--text-3, #6b7186); font-size: 13.5px; margin-bottom: 22px; }
.auth-tabs { display: flex; background: var(--paper-soft, #f6f7fb); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 8px; font-size: 13.5px; font-weight: 700; color: var(--text-3, #6b7186); cursor: pointer; font-family: inherit; }
.auth-tabs button.on { background: #fff; color: var(--text, #0f1222); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.auth-card .field { margin-bottom: 14px; }
.auth-msg { font-size: 13px; border-radius: 9px; padding: 10px 12px; margin-top: 12px; display: none; line-height: 1.6; }
.auth-msg.show { display: block; }
.auth-msg.err { background: #fdecec; color: #b91c1c; }
.auth-msg.ok { background: #e6faf3; color: #047857; }
.auth-foot { margin-top: 20px; font-size: 12.5px; color: var(--text-3, #6b7186); line-height: 1.8; }
.auth-foot a { color: var(--brand, #4f46e5); font-weight: 600; text-decoration: none; }

/* 下载页 */
.dl-hero { background: radial-gradient(900px 420px at 50% -10%, rgba(79,70,229,.28), transparent 65%), #0f1222; color: #fff; padding: 72px 0 56px; }
.dl-card { background: #fff; border: 1px solid var(--line, #e5e7f0); border-radius: 18px; padding: 28px; box-shadow: 0 16px 40px rgba(15,18,34,.06); }
.dl-card h3 { font-size: 17px; margin: 0 0 6px; }
.hash { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; background: var(--paper-soft, #f6f7fb); border: 1px solid var(--line, #e5e7f0); border-radius: 8px; padding: 10px 12px; color: var(--text-2, #3d4358); }

/* 管理后台 */
.admin-side { background: #0f1222; color: #b9bdd2; border-radius: 16px; padding: 14px; font-size: 13.5px; }
.admin-side .brand-row { color: #fff; font-weight: 800; padding: 8px 10px 14px; font-size: 14px; letter-spacing: -.01em; }
.admin-side a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 9px; color: #b9bdd2; text-decoration: none; cursor: pointer; font-weight: 600; }
.admin-side a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side a.on { background: rgba(99,102,241,.22); color: #c7c9ff; }
.admin-side .sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 8px; }
.admin-side .cnt { background: rgba(255,255,255,.1); color: #c7c9ff; border-radius: 999px; font-size: 11px; padding: 1px 8px; font-weight: 700; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(900px 500px at 50% -10%, #1e2447 0%, transparent 60%), #0a0c16; padding: 20px; }
.login-card { background: #fff; border-radius: 18px; padding: 34px; width: 100%; max-width: 380px; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card .sub { font-size: 12.5px; color: var(--text-3, #6b7186); margin-bottom: 20px; }

/* ---------- 10 响应式 ---------- */
@media (max-width: 1080px) {
  .dash-layout { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .dash-side { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 8px; }
  .dash-side .sep { display: none; }
  .dash-side a { white-space: nowrap; padding: 8px 12px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .three-col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .btn { min-height: 44px; }
  .btn--sm { min-height: 40px; }
  .dash-layout { padding: 12px 12px 50px; }
  .dash-top__inner { padding: 0 14px; }
  .dash-top__user .hide-sm { display: none; }
  .member-stats { grid-template-columns: 1fr; }
  .form-grid, .form-grid.g3, .form-grid.g4 { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pcard { padding: 16px; }
  .member-card { padding: 20px; }
  .ptable th, .ptable td { padding: 9px 10px; }
  .kv-grid { grid-template-columns: 92px 1fr; }
  .btn--sm { height: 32px; }
}

/* 支付倒计时状态徽标（浅底，适合白卡片内的弹窗） */
.pill--warn { background: #fef3c7 !important; color: #a16207 !important; }
.pill--ok { background: #dcfce7 !important; color: #15803d !important; }
.pay-countdown-urgent { animation: payPulse 1.4s ease-in-out infinite; }
@keyframes payPulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }
