/* =====================================================================
   pages.css — 登录 / 首页 / 方案投详情 / 明细 / 我的 / 充值 / 提现 / 钱包 / 改密
   ===================================================================== */

/* ---------- 登录 ---------- */
.auth-wrap { min-height: calc(100vh - var(--top-h) - 40px); display: flex; flex-direction: column; justify-content: center; }
.auth-hero { text-align: center; margin-bottom: 18px; }
.auth-hero .logo { width: 68px; height: 68px; margin: 0 auto 12px; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(108, 92, 231, .55); animation: float-y 3.5s ease-in-out infinite; }
.auth-hero h1 { font-size: 22px; letter-spacing: 2px; }
.auth-hero p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.auth-card { padding: 18px var(--pad) 16px; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.auth-tips { margin-top: 14px; font-size: 11.5px; color: var(--dim); text-align: center; line-height: 1.6; }

/* ---------- 首页 ---------- */
.home-bal { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; margin-bottom: 12px; }
.home-bal .lbl { font-size: 11.5px; color: var(--muted); }
.home-bal .val { font-size: 20px; }
.home-bal .btn { flex: none; }
.seg-wrap { margin-bottom: 12px; }
.pd-list { display: flex; flex-direction: column; }
.pd-card { padding: var(--pad); margin-bottom: 12px; }
.pd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pd-name { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.pd-scheme { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pd-intro { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin: 8px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd-intro.full { display: block; }
.pd-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pd-metrics .stat b { font-size: 14px; }
.pd-metrics .stat b.gold { color: var(--gold); }
.pd-metrics .stat b.wrap { white-space: normal; font-size: 12.5px; line-height: 1.35; }
.pd-prog { margin-top: 12px; }
.pd-prog .progress-meta { margin-top: 10px; }
.inv-list { margin-top: 10px; border-radius: var(--r); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); overflow: hidden; }
.inv-list .inv-head { display: flex; justify-content: space-between; padding: 7px 10px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.inv-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-size: 12.5px; border-bottom: 1px solid var(--line); animation: fade-up .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.inv-row:last-child { border-bottom: 0; }
.inv-row .avatar { width: 24px; height: 24px; font-size: 11px; }
.inv-row .acc { flex: 1; min-width: 0; font-family: var(--font-num); letter-spacing: .5px; }
.inv-row .amt { font-family: var(--font-num); font-weight: 700; color: var(--text); }
.inv-row .tm { font-size: 11px; color: var(--dim); }
.inv-more { text-align: center; font-size: 11.5px; color: var(--muted); padding: 6px; }
.pd-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.pd-foot .hint { flex: 1; min-width: 0; }
.pd-foot .btn { flex: none; }
.full-tip { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; color: #9BF0BA; margin-top: 8px; }
.full-tip b { white-space: nowrap; }
.full-tip svg { width: 14px; height: 14px; }
.solo-btn { margin-top: 12px; }

/* ---------- 方案投详情 ---------- */
.pd-hero { padding: var(--pad); margin-bottom: 12px; overflow: hidden; }
.pd-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 210, 255, .25), transparent 70%); pointer-events: none; }
.pd-hero h1 { font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-hero .pd-intro { -webkit-line-clamp: unset; display: block; }
.invest-panel { padding: var(--pad); margin-bottom: 12px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.quick button { height: 34px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); transition: all .2s; }
.quick button.on { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 4px 14px rgba(108, 92, 231, .45); }
.invest-sum { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; gap: 4px 10px; }
.invest-sum b { color: var(--text); font-family: var(--font-num); }
.rule-list { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.rule-list li { position: relative; padding-left: 14px; }
.rule-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
.hist-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.hist-row:last-child { border-bottom: 0; }
.hist-row .h-no { color: var(--muted); flex: none; width: 56px; font-family: var(--font-num); }
.hist-row .h-tm { flex: 1; min-width: 0; color: var(--dim); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-row .h-pf { font-family: var(--font-num); font-weight: 700; flex: none; }

/* ---------- 明细（我的投资） ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--muted); transition: all .2s; }
.chip.on { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 4px 14px rgba(108, 92, 231, .4); }
.iv-card { padding: var(--pad); margin-bottom: 12px; }
.iv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.iv-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.iv-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; }
.iv-main .lbl { font-size: 11.5px; color: var(--muted); }
.iv-main .amt { font-size: 18px; }
.iv-main .pf { font-size: 22px; text-align: right; }
.iv-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.iv-stats .stat { padding: 7px 6px; text-align: center; }
.iv-stats .stat b { font-size: 13px; }
.iv-stats .stat span { font-size: 10.5px; }
.iv-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 11.5px; color: var(--dim); }
.iv-foot .btn { flex: none; }
.iv-sum { padding: var(--pad); margin-bottom: 12px; text-align: center; }
.iv-sum .lbl { font-size: 12px; color: var(--muted); }
.bet-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.bet-row:last-child { border-bottom: 0; }
.bet-row .b-no { font-family: var(--font-num); font-weight: 700; }
.bet-row .b-desc { grid-column: 1; color: var(--muted); font-size: 12px; word-break: break-all; }
.bet-row .b-pf { grid-row: 1 / span 2; align-self: center; text-align: right; font-family: var(--font-num); font-weight: 800; font-size: 14px; }
.bet-row .b-meta { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--dim); }
.log-box { max-height: 260px; overflow: auto; padding: 10px; border-radius: var(--r); background: rgba(0, 0, 0, .28); border: 1px solid var(--line); font-family: var(--font-num); font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.log-box .l-tm { color: var(--dim); margin-right: 6px; }
.log-box .warn { color: #FBE2A3; } .log-box .error { color: #FFB3C1; } .log-box .info { color: var(--muted); }
.log-box div { word-break: break-all; }

/* ---------- 我的 ---------- */
.me-head { display: flex; align-items: center; gap: 12px; padding: var(--pad); margin-bottom: 12px; }
.me-head .avatar { box-shadow: 0 0 0 3px rgba(0, 210, 255, .3), 0 8px 24px rgba(108, 92, 231, .4); }
.av-wrap { position: relative; flex: none; border-radius: 50%; }
.av-wrap:active { transform: scale(.94); }
.av-cam { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; border: 2px solid var(--bg1); }
.av-cam svg { width: 12px; height: 12px; }
.me-info { flex: 1; min-width: 0; }
.me-name { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.me-meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.me-meta .num { color: var(--text); }
.me-bal { padding: var(--pad); margin-bottom: 12px; overflow: hidden; }
.me-bal::after { content: ""; position: absolute; right: -30px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 185, 66, .22), transparent 70%); pointer-events: none; }
.me-bal .lbl { font-size: 12px; color: var(--muted); }
.me-bal .big { margin-top: 2px; }
.me-bal .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.me-bal .grid .stat { padding: 8px 6px; text-align: center; }
.me-bal .grid .stat b { font-size: 13px; }
.me-bal .acts { display: flex; gap: 10px; margin-top: 12px; }
.me-bal .acts .btn { flex: 1; padding: 0 8px; }
.me-menu { margin-bottom: 12px; overflow: hidden; }
.me-foot { font-size: 11px; color: var(--dim); text-align: center; margin-top: 16px; }

/* ---------- 充值 / 提现 / 钱包 ---------- */
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 4px; }
.amount-grid button { height: 38px; border-radius: 10px; font-weight: 700; font-family: var(--font-num); color: var(--muted); background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); transition: all .2s; }
.amount-grid button.on { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 4px 14px rgba(108, 92, 231, .45); }
.pm-detail { margin: 4px 0 14px; padding: 12px; border-radius: var(--r); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); animation: fade-up .35s var(--ease) both; }
.pm-detail .qr { width: 140px; height: 140px; margin: 10px auto 4px; border-radius: 10px; background: #fff; padding: 6px; }
.pm-detail .qr img { width: 100%; height: 100%; object-fit: contain; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row b { flex: 1; min-width: 0; word-break: break-all; font-family: var(--font-num); font-size: 13px; }
.fee-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 14px; }
.fee-box .stat b { font-size: 15px; }
.wallet-card { padding: 12px; margin-bottom: 10px; }
.wallet-card .w-head { display: flex; align-items: center; gap: 8px; }
.wallet-card .w-type { font-weight: 700; flex: 1; min-width: 0; }
.wallet-card .w-fields { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.wallet-card .w-fields div { word-break: break-all; }
.wallet-card .w-fields b { color: var(--text); font-family: var(--font-num); font-weight: 600; }

/* ---------- 余额明细 / 记录 ---------- */
.log-row { display: flex; align-items: center; gap: 10px; padding: 11px var(--pad); border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: 0; }
.log-row .l-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .06); color: var(--p2); }
.log-row .l-ic svg { width: 17px; height: 17px; }
.log-row .l-ic.pos { color: var(--gold); background: rgba(245, 185, 66, .12); }
.log-row .l-ic.neg { color: var(--red); background: rgba(255, 92, 122, .12); }
.log-row .l-main { flex: 1; min-width: 0; }
.log-row .l-title { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.log-row .l-sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; word-break: normal; overflow-wrap: anywhere; }
.log-row .l-right { text-align: right; flex: none; max-width: 46%; }
.log-row .l-amt { font-family: var(--font-num); font-weight: 800; font-size: 15px; white-space: nowrap; }
.log-row .l-after { font-size: 11px; color: var(--dim); margin-top: 2px; font-family: var(--font-num); white-space: nowrap; }

/* ---------- 头像选择 ---------- */
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 14px; }
.avatar-grid .av { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 2px solid transparent; transition: transform .2s var(--spring), border-color .2s; cursor: pointer; }
.avatar-grid .av:active { transform: scale(.92); }
.avatar-grid .av.on { border-color: var(--p2); box-shadow: 0 0 0 3px rgba(0, 210, 255, .25); }
.avatar-grid .av svg, .avatar-grid .av img { width: 100%; height: 100%; }

/* ---------- 320px ---------- */
@media (max-width: 340px) {
  .quick { gap: 6px; }
  .quick button { font-size: 12px; }
  .iv-stats { grid-template-columns: repeat(2, 1fr); }
  .me-bal .grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .me-bal .grid .stat b { font-size: 12px; }
  .avatar-grid { gap: 8px; }
  .cap-img { width: 96px; }
  .pd-metrics .stat b { font-size: 13px; }
  .money.big { font-size: 24px; }
}
