/* =====================================================================
   components.css — 玻璃卡片 / 按钮 / 输入 / 分段 / 进度条 / 标签 / 列表 /
   骨架屏 / 空态 / 弹窗 / Toast / 头像 / 分页
   ===================================================================== */

/* ---------- 玻璃卡片（1px 高光边） ---------- */
.glass { position: relative; background: var(--glass); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .32), rgba(108, 92, 231, .35) 40%, rgba(0, 210, 255, .3) 70%, rgba(255, 255, 255, .05));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; }
.card { padding: var(--pad); margin-bottom: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.card-title svg { width: 18px; height: 18px; color: var(--p2); }
.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 10px; }
.sec-title h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.sec-title h2::before { content: ""; width: 3px; height: 16px; border-radius: 2px; background: var(--grad); box-shadow: 0 0 10px rgba(0, 210, 255, .7); }
.sec-title .more { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; }
.sec-title .more svg { width: 14px; height: 14px; }
.card-head .more { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.card-head .more svg { width: 14px; height: 14px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ---------- 按钮：渐变 + 发光 + 按下缩放 + 流光 ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--btn-h); padding: 0 18px; border-radius: var(--r); font-weight: 700; font-size: 14px; color: var(--text); background: var(--glass-2); border: 1px solid var(--line-2); white-space: nowrap; user-select: none; -webkit-user-select: none; transition: transform .18s var(--spring), box-shadow .25s, opacity .2s, filter .2s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { color: #fff; border-color: transparent; background: linear-gradient(110deg, #6C5CE7 0%, #00D2FF 45%, #6C5CE7 100%); background-size: 220% auto; box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .3); animation: btn-shine 3.2s linear infinite; }
.btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); animation: btn-sweep 2.8s ease-in-out infinite; pointer-events: none; }
.btn-gold { color: #2A1D00; border-color: transparent; background: var(--grad-gold); background-size: 220% auto; box-shadow: 0 8px 24px rgba(245, 185, 66, .35), inset 0 1px 0 rgba(255, 255, 255, .5); animation: btn-shine 3.6s linear infinite; }
.btn-ghost { background: transparent; }
.btn-danger { color: #FFB3C1; background: rgba(255, 92, 122, .14); border-color: rgba(255, 92, 122, .4); }
.btn-ok { color: #9BF0BA; background: rgba(34, 197, 94, .16); border-color: rgba(34, 197, 94, .45); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 46px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; padding: 0 8px; }
.btn .spin { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.link { color: var(--p2); font-weight: 600; }

/* ---------- 涟漪 ---------- */
.ripple-host { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .5), rgba(255, 255, 255, .06) 70%); transform: scale(0); animation: ripple .65s ease-out forwards; pointer-events: none; }

/* ---------- 输入 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.inp { width: 100%; height: 44px; padding: 0 12px; border-radius: var(--r); background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2); color: var(--text); -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.inp::placeholder { color: var(--dim); }
.inp:focus { border-color: rgba(0, 210, 255, .7); box-shadow: 0 0 0 4px rgba(0, 210, 255, .14); background: rgba(255, 255, 255, .07); }
.inp.err { border-color: var(--red); box-shadow: 0 0 0 4px rgba(255, 92, 122, .15); }
textarea.inp { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select.inp { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E97B3' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
select.inp option { background: #141A33; color: var(--text); }
.field-err { font-size: 12px; color: #FFB3C1; margin-top: 5px; }
.field-err:empty { display: none; }
.inp-wrap { position: relative; }
.inp-wrap .inp { padding-right: 42px; }
.inp-ic { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); border-radius: 10px; }
.inp-ic svg { width: 18px; height: 18px; }
.inp-prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--gold); font-family: var(--font-num); font-size: 18px; }
.inp.with-prefix { padding-left: 34px; font-family: var(--font-num); font-size: 18px; font-weight: 700; }
.cap-row { display: flex; gap: 10px; }
.cap-row .inp { flex: 1; min-width: 0; letter-spacing: 3px; text-transform: uppercase; font-family: var(--font-num); }
.cap-img { width: 112px; height: 44px; border-radius: var(--r); overflow: hidden; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 12px; color: var(--muted); cursor: pointer; flex: none; }
.cap-img svg { width: 100%; height: 100%; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.55; }
.note-box { display: flex; gap: 8px; padding: 10px 12px; border-radius: var(--r); background: rgba(245, 185, 66, .08); border: 1px solid rgba(245, 185, 66, .25); font-size: 12.5px; color: #FBE2A3; line-height: 1.5; }
.note-box svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.note-box.info { background: rgba(0, 210, 255, .07); border-color: rgba(0, 210, 255, .25); color: #BDEFFF; }

/* ---------- 分段按钮（共同投资｜独自投资） ---------- */
.seg { position: relative; display: flex; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 11px; background: var(--grad); box-shadow: 0 6px 18px rgba(108, 92, 231, .45); transition: transform .32s var(--spring); }
.seg.right .seg-thumb { transform: translateX(100%); }
.seg button { position: relative; z-index: 1; flex: 1; height: 38px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); transition: color .25s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button svg { width: 16px; height: 16px; }
.seg button.on { color: #fff; }

/* ---------- 进度条：渐变条纹流动 + 末端光点 ---------- */
.progress { position: relative; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: visible; }
.progress .bar { position: relative; height: 100%; border-radius: 999px; width: 0; background: linear-gradient(90deg, #6C5CE7, #00D2FF); transition: width 1s var(--ease); box-shadow: 0 0 12px rgba(0, 210, 255, .55); overflow: hidden; }
.progress .bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .22) 0 8px, transparent 8px 16px); background-size: 24px 24px; animation: stripes 1s linear infinite; }
.progress .dot { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(0, 210, 255, .35), 0 0 16px 4px rgba(0, 210, 255, .8); transition: left 1s var(--ease); animation: glow-dot 1.6s ease-in-out infinite; }
.progress.full .bar { background: linear-gradient(90deg, #22C55E, #86EFAC); box-shadow: 0 0 12px rgba(34, 197, 94, .6); }
.progress.full .dot { box-shadow: 0 0 0 3px rgba(34, 197, 94, .35), 0 0 16px 4px rgba(34, 197, 94, .8); }
.progress.gold .bar { background: var(--grad-gold); background-size: 200% auto; box-shadow: 0 0 12px rgba(245, 185, 66, .6); }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }
.progress-meta b { color: var(--text); }

/* ---------- 标签 / 状态 ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill svg { width: 12px; height: 12px; }
.pill.raising { color: #BDEFFF; background: rgba(0, 210, 255, .14); border: 1px solid rgba(0, 210, 255, .4); }
.pill.running { color: #9BF0BA; background: rgba(34, 197, 94, .14); border: 1px solid rgba(34, 197, 94, .45); }
.pill.settled { color: #FBE2A3; background: rgba(245, 185, 66, .14); border: 1px solid rgba(245, 185, 66, .4); }
.pill.cancelled, .pill.bad { color: #FFB3C1; background: rgba(255, 92, 122, .14); border: 1px solid rgba(255, 92, 122, .4); }
.pill.pending { color: #FBE2A3; background: rgba(245, 185, 66, .14); border: 1px solid rgba(245, 185, 66, .4); }
.pill.ok { color: #9BF0BA; background: rgba(34, 197, 94, .14); border: 1px solid rgba(34, 197, 94, .45); }
.pill.info, .pill.gray { color: var(--muted); background: rgba(255, 255, 255, .07); border: 1px solid var(--line-2); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tag.hot { color: #2A1D00; background: var(--grad-gold); background-size: 220% auto; border-color: transparent; animation: btn-shine 2.8s linear infinite; }
.tag.solo { color: #D9CCFF; background: rgba(108, 92, 231, .22); border-color: rgba(108, 92, 231, .5); }
.live-dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse-dot 1.2s ease-in-out infinite; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--green); animation: ring-out 1.4s ease-out infinite; }

/* ---------- 列表行 / 菜单 ---------- */
.list-row { display: flex; align-items: center; gap: 10px; padding: 12px var(--pad); border-bottom: 1px solid var(--line); transition: background .2s; min-height: 50px; }
.list-row:last-child { border-bottom: 0; }
.list-row:active { background: rgba(255, 255, 255, .05); }
.lr-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; background: var(--lr-bg, linear-gradient(135deg, rgba(108, 92, 231, .5), rgba(0, 210, 255, .5))); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.lr-ic svg { width: 18px; height: 18px; }
.lr-lbl { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.lr-sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.lr-val { color: var(--muted); font-size: 13px; text-align: right; }
.lr-arr { width: 18px; height: 18px; color: var(--dim); flex: none; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); flex: none; }
.kv b { font-weight: 600; text-align: right; min-width: 0; word-break: break-all; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.stat { padding: 10px 10px; border-radius: var(--r); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); min-width: 0; }
.stat span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b { display: block; font-size: 15px; font-weight: 800; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-grid.c3 .stat { padding: 8px 6px; }
.stat-grid.c3 .stat b { font-size: 13px; white-space: normal; overflow-wrap: anywhere; letter-spacing: 0; }
@media (max-width: 340px) { .stat-grid.c3 .stat b { font-size: 12px; } }

/* ---------- 骨架屏 ---------- */
.sk { position: relative; overflow: hidden; border-radius: var(--r); background: rgba(255, 255, 255, .06); }
.sk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent); background-size: 600px 100%; animation: shimmer 1.4s linear infinite; }
.sk-line { height: 14px; margin: 10px 0; }
.sk-banner { aspect-ratio: 2 / 1; border-radius: var(--r-lg); margin-bottom: 12px; }
.sk-card { height: 150px; margin-bottom: 12px; border-radius: var(--r-lg); }

/* ---------- 空态 / 加载 ---------- */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 14px; }
.empty .em-ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; background: var(--glass); color: var(--dim); animation: float-y 3s ease-in-out infinite; }
.empty .em-ic svg { width: 30px; height: 30px; }
.loader { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; color: var(--muted); font-size: 12.5px; }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--p2); border-radius: 50%; animation: spin .8s linear infinite; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 0 4px; font-size: 12.5px; color: var(--muted); }
.pager .btn { min-width: 64px; }

/* ---------- 遮罩 / 底部弹层 / 居中弹窗 ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(5, 8, 20, .66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in .2s both; }
.overlay.center { align-items: center; padding: 20px; }
.overlay.closing { animation: fade-out .2s both; }
.sheet { width: 100%; max-width: 480px; max-height: 86vh; overflow: auto; padding: 16px var(--pad) calc(16px + var(--safe-b)); border-radius: 20px 20px 0 0; background: rgba(20, 26, 51, .96); animation: sheet-up .32s var(--ease) both; }
.overlay.center .sheet { max-width: 340px; border-radius: 18px; padding: 22px 18px 18px; animation: modal-in .28s var(--spring) both; }
.overlay.closing .sheet { animation: sheet-down .2s both; }
.overlay.center.closing .sheet { animation: modal-out .18s both; }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: -4px auto 14px; }
.modal-ic { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 210, 255, .14); color: var(--p2); }
.modal-ic svg { width: 28px; height: 28px; }
.modal-ic.gold { background: rgba(245, 185, 66, .16); color: var(--gold); }
.modal-ic.danger { background: rgba(255, 92, 122, .16); color: var(--red); }
.modal-title { font-size: 17px; font-weight: 700; text-align: center; }
.modal-sub { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.6; white-space: pre-line; }
.modal-foot { display: flex; gap: 10px; margin-top: 18px; }
.modal-foot .btn { flex: 1; padding: 0 8px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; top: calc(var(--safe-t) + 14px); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: rgba(20, 26, 51, .94); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13.5px; animation: toast-in .35s var(--spring) both; }
.toast.leaving { animation: toast-out .25s ease both; }
.toast .t-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 12px; color: #fff; background: var(--p1); flex: none; }
.toast.ok .t-ic { background: var(--green); } .toast.err .t-ic { background: var(--red); } .toast.warn .t-ic { background: #F59E0B; }
.toast .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--grad); transform-origin: left; animation: toast-bar linear forwards; }

/* ---------- 头像 ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; flex: none; }
.avatar img, .avatar svg { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }

/* ---------- 金额 / 盈亏 ---------- */
.money { font-family: var(--font-num); font-weight: 800; font-variant-numeric: tabular-nums; }
.money.big { font-size: 28px; letter-spacing: .5px; }
.money.pos { color: var(--gold); text-shadow: 0 0 14px rgba(245, 185, 66, .45); }
.money.neg { color: var(--red); }

/* ---------- 单选项（支付方式 / 钱包 / 头像） ---------- */
.opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--r); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); margin-bottom: 8px; transition: border-color .2s, background .2s, transform .18s var(--spring); cursor: pointer; }
.opt:active { transform: scale(.985); }
.opt.on { border-color: rgba(0, 210, 255, .7); background: rgba(0, 210, 255, .08); box-shadow: 0 0 0 3px rgba(0, 210, 255, .12); }
.opt .o-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--glass-2); flex: none; color: var(--p2); }
.opt .o-ic svg { width: 18px; height: 18px; }
.opt .o-main { flex: 1; min-width: 0; }
.opt .o-title { display: block; font-weight: 700; font-size: 14px; }
.opt .o-sub { display: block; font-size: 12px; color: var(--muted); word-break: break-all; }
.opt .o-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; transition: all .2s; }
.opt .o-check svg { width: 12px; height: 12px; opacity: 0; color: #fff; }
.opt.on .o-check { border-color: transparent; background: var(--grad); }
.opt.on .o-check svg { opacity: 1; }

/* ---------- 上传框 ---------- */
.upload-box { position: relative; border: 1px dashed var(--line-2); border-radius: var(--r); padding: 18px 12px; text-align: center; color: var(--muted); font-size: 12.5px; background: rgba(255, 255, 255, .03); overflow: hidden; }
.upload-box svg { width: 28px; height: 28px; margin: 0 auto 6px; color: var(--p2); }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-box img { max-height: 160px; margin: 0 auto; border-radius: 10px; }
.upload-box.has { padding: 8px; }
