/* ================= 用户端布局 ================= */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 238px; z-index: 50;
  background: var(--sidebar); color: #fff;
  display: flex; flex-direction: column; padding: 22px 14px 16px;
}
.side-top { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.side-top .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.side-top .brand-name { font-size: 15px; }
.side-top .brand-tag { display: block; font-size: 10.5px; color: rgba(255,255,255,.36); letter-spacing: .06em; margin-top: -1px; }

.nav-label { font-size: 10.5px; letter-spacing: .1em; color: rgba(255,255,255,.28); padding: 14px 12px 8px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px;
  border-radius: 10px; color: rgba(255,255,255,.6); font-size: 13.5px;
  cursor: pointer; transition: all .16s ease; position: relative; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.09); color: #fff; font-weight: 500; }
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 11px; bottom: 11px; width: 3px;
  border-radius: 0 3px 3px 0; background: linear-gradient(180deg, #f6c164, #e0443b);
}
.nav-item svg { flex: none; opacity: .85; }
.nav-item .nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 6px;
  background: var(--brand); color: #fff; font-size: 10.5px; display: grid; place-items: center; font-weight: 600;
}
.side-foot { margin-top: auto; }
.side-card {
  background: linear-gradient(150deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 13px 14px; margin-bottom: 12px;
}
.side-card .k { font-size: 11px; color: rgba(255,255,255,.45); }
.side-card .v { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; }
.side-card .hint { font-size: 10.5px; color: rgba(255,255,255,.36); margin-top: 3px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.side-user:hover { background: rgba(255,255,255,.06); }
.side-user .u-name { font-size: 13px; font-weight: 500; }
.side-user .u-code { font-size: 10.5px; color: rgba(255,255,255,.36); }

.main { margin-left: 238px; flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 70px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 34px; background: rgba(245,246,248,.82); backdrop-filter: blur(14px);
}
.topbar-title { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.topbar-sub { font-size: 12.5px; color: var(--muted); margin-top: -2px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.top-avatar { display: flex; align-items: center; gap: 9px; padding: 5px 6px 5px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); cursor: pointer; }
.top-avatar .tname { font-size: 12.5px; font-weight: 500; }
.content { padding: 6px 34px 48px; max-width: 1280px; }
.mobile-brand { display: none; }

/* 头像 */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0;
  background: linear-gradient(140deg, #f0b45a, #d9564a);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; border-radius: 18px; }
.avatar.blue { background: linear-gradient(140deg, #7aa7f0, #3b6fd4); }
.avatar.green { background: linear-gradient(140deg, #6fd6a5, #159f68); }
.avatar.purple { background: linear-gradient(140deg, #b692ee, #7a4fd6); }

/* ================= 总览 ================= */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 26px 30px;
  background: linear-gradient(120deg, #1b1c24 0%, #262833 55%, #33272a 100%);
  color: #fff; display: flex; justify-content: space-between; gap: 24px;
  box-shadow: 0 18px 40px -24px rgba(18, 20, 28, 0.7);
}
.hero::before {
  content: ""; position: absolute; right: -110px; top: -160px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,162,59,.3), transparent 65%);
}
.hero::after {
  content: ""; position: absolute; right: 130px; bottom: -190px; width: 330px; height: 330px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,68,59,.22), transparent 65%);
}
.hero > * { position: relative; z-index: 1; }
.hero .h-label { font-size: 12.5px; color: rgba(255,255,255,.55); display: flex; align-items: center; gap: 6px; }
.hero .h-balance { font-size: 42px; font-weight: 680; letter-spacing: -0.035em; margin-top: 6px; line-height: 1.15; }
.hero .h-balance small { font-size: 20px; font-weight: 500; opacity: .65; margin-right: 3px; }
.hero .h-meta { display: flex; gap: 28px; margin-top: 18px; }
.hero .h-meta span { font-size: 11.5px; color: rgba(255,255,255,.45); display: block; }
.hero .h-meta strong { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }
.hero .btn-light { background: #fff; color: #1b1c24; border-color: transparent; font-weight: 600; }
.hero .btn-light:hover { background: #f3f4f6; }

.hero-code {
  align-self: center; text-align: right; min-width: 190px;
}
.hero-code .lbl { font-size: 11.5px; color: rgba(255,255,255,.45); }
.hero-code .code {
  font-size: 27px; font-weight: 700; letter-spacing: .08em; margin: 4px 0 8px;
  background: linear-gradient(100deg, #f9d79b, #f0a35c); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-code .cp {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: rgba(255,255,255,.66);
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05);
  padding: 4px 10px; border-radius: 7px; cursor: pointer;
}
.hero-code .cp:hover { color: #fff; border-color: rgba(255,255,255,.3); }

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-main { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }

.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat .s-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat .s-label { font-size: 12.5px; color: var(--muted); }
.stat .s-ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
}
.s-ico.red { background: var(--brand-soft); color: var(--brand); }
.s-ico.gold { background: var(--gold-soft); color: #c2861d; }
.s-ico.green { background: var(--green-soft); color: var(--green); }
.s-ico.blue { background: var(--blue-soft); color: var(--blue); }
.s-ico.gray { background: #f2f3f6; color: #6d737e; }
.stat .s-value { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; margin-top: 9px; line-height: 1.2; }
.stat .s-value small { font-size: 14px; font-weight: 500; color: var(--muted); margin-right: 2px; }
.stat .s-foot { font-size: 11.5px; color: var(--muted); margin-top: 5px; display: flex; align-items: center; gap: 5px; }
.stat .s-foot .up { color: var(--brand); font-weight: 500; }
.stat .s-foot .down { color: var(--green); font-weight: 500; }

/* 图表 */
.chart-box { padding: 8px 10px 0; }
.chart-legend { display: flex; gap: 16px; padding: 0 14px 6px; }
.chart-legend span { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.chart-tip { display: flex; justify-content: space-between; padding: 0 14px 14px; }
.chart-tip b { font-size: 15px; font-weight: 600; }
.chart-tip span { font-size: 11.5px; color: var(--muted); display: block; }

/* 团队分布 */
.level-bars { padding: 4px 0 0; }
.level-row { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.level-row .lv-name { font-size: 12px; color: var(--muted); width: 48px; flex: none; }
.level-row .lv-bar { flex: 1; height: 7px; border-radius: 4px; background: #f1f2f5; overflow: hidden; }
.level-row .lv-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f2b45f, #e0443b); }
.level-row .lv-num { font-size: 12.5px; font-weight: 600; width: 26px; text-align: right; }

.list { padding: 4px 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line-2); }
.list-item:last-child { border-bottom: 0; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.list-item .li-amt { font-size: 14px; font-weight: 600; white-space: nowrap; }
.amt-in { color: var(--brand); }
.amt-out { color: var(--green); }

.mini-empty { padding: 34px 20px; text-align: center; font-size: 12.5px; color: var(--muted); }

/* 快捷入口 */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px;
  border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  transition: all .16s ease; text-align: center;
}
.quick:hover { border-color: #e2c9c5; background: #fffbfa; transform: translateY(-1px); }
.quick .q-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; }
.quick span { font-size: 12px; color: var(--ink-2); }
.q-ico.red { background: var(--brand-soft); color: var(--brand); }
.q-ico.gold { background: var(--gold-soft); color: #c2861d; }
.q-ico.blue { background: var(--blue-soft); color: var(--blue); }
.q-ico.green { background: var(--green-soft); color: var(--green); }

/* ================= 团队页 ================= */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 680; letter-spacing: -0.025em; }
.page-desc { font-size: 13px; color: var(--muted); margin-top: 3px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; background: #f1f2f5; border-radius: 10px; }
.seg button {
  border: 0; background: none; padding: 6px 14px; font-size: 12.5px; color: var(--muted);
  border-radius: 8px; cursor: pointer; font-weight: 500; transition: all .15s;
}
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20,23,31,.09); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
.search { position: relative; flex: 1; max-width: 300px; min-width: 180px; }
.search input {
  width: 100%; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  padding: 0 12px 0 34px; font-size: 13px; outline: none; background: #fff;
}
.search input:focus { border-color: #e9a7a2; box-shadow: 0 0 0 3px rgba(224,68,59,.07); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #b0b5c0; }

.team-list { padding: 0; }
.team-row {
  display: flex; align-items: center; gap: 13px; padding: 14px 22px; border-bottom: 1px solid var(--line-2);
}
.team-row:last-child { border-bottom: 0; }
.team-row:hover { background: #fcfcfd; }
.team-row .tr-main { flex: 1; min-width: 0; }
.team-row .tr-name { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.team-row .tr-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.team-row .tr-cell { text-align: right; min-width: 88px; }
.team-row .tr-cell span { display: block; font-size: 11px; color: var(--muted); }
.team-row .tr-cell b { font-size: 13.5px; font-weight: 600; }
.team-row .tr-cell b.gold { color: #b97a14; }

.tree { padding: 8px 22px 22px; }
.tree ul { padding-left: 22px; border-left: 1px dashed #e4e7ec; margin-left: 12px; }
.tree > ul { padding-left: 0; border-left: 0; margin-left: 0; }
.tree-node { position: relative; padding: 6px 0; }
.tree-card {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 10px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff; min-width: 210px;
}
.tree-card:hover { border-color: #e2c9c5; }
.tree-card .tn { font-size: 13px; font-weight: 500; }
.tree-card .tc { font-size: 11px; color: var(--muted); }
.tree-card .tperf { margin-left: auto; font-size: 12px; font-weight: 600; color: #b97a14; }

/* ================= 明细页 ================= */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; color: var(--muted); cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: #dcd2d0; color: var(--ink-2); }
.chip.active { background: #1c1e25; border-color: #1c1e25; color: #fff; font-weight: 500; }

.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 6px 0; }
.summary-item { padding: 14px 22px; border-right: 1px solid var(--line-2); }
.summary-item:last-child { border-right: 0; }
.summary-item span { font-size: 11.5px; color: var(--muted); }
.summary-item b { display: block; font-size: 21px; font-weight: 650; letter-spacing: -0.02em; margin-top: 3px; }

.tx-type { display: inline-flex; align-items: center; gap: 6px; }
.type-dot { width: 6px; height: 6px; border-radius: 50%; }

/* 移动端卡片式明细 */
.m-list { display: none; }
.m-item { padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; }
.m-item:last-child { border-bottom: 0; }
.m-item .m-main { flex: 1; min-width: 0; }
.m-item .m-title { font-size: 13.5px; font-weight: 500; }
.m-item .m-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.m-item .m-amt { text-align: right; }
.m-item .m-amt b { font-size: 14.5px; font-weight: 600; display: block; }
.m-item .m-amt span { font-size: 10.5px; color: var(--muted); }

/* ================= 提现页 ================= */
.withdraw-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: start; }
.wd-balance {
  background: linear-gradient(120deg, #1b1c24, #2b2d38); color: #fff; border-radius: 18px; padding: 22px 24px;
  position: relative; overflow: hidden;
}
.wd-balance::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,162,59,.25), transparent 65%);
}
.wd-balance .k { font-size: 12px; color: rgba(255,255,255,.5); }
.wd-balance .v { font-size: 34px; font-weight: 680; letter-spacing: -0.03em; margin-top: 4px; }
.wd-balance .sub { font-size: 11.5px; color: rgba(255,255,255,.4); margin-top: 8px; position: relative; z-index: 1; }
.amount-input { position: relative; }
.amount-input input { height: 58px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; padding-right: 52px; }
.amount-input .cur { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--muted); font-weight: 500; }
.amount-input input { padding-left: 40px; }
.amount-chips { display: flex; gap: 8px; margin-top: 10px; }
.amount-chips button {
  flex: 1; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.amount-chips button:hover { border-color: #e9a7a2; color: var(--brand); }
.fee-box { background: #fafbfc; border: 1px solid var(--line-2); border-radius: 11px; padding: 13px 15px; margin: 16px 0; }
.fee-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding: 3px 0; }
.fee-row b { color: var(--ink); font-weight: 500; }
.fee-row.total { border-top: 1px dashed var(--line); margin-top: 7px; padding-top: 9px; }
.fee-row.total b { font-size: 16px; font-weight: 650; color: var(--brand); }

.rules { font-size: 12.5px; color: var(--muted); line-height: 2; }
.rules li { display: flex; gap: 8px; }
.rules .rn {
  width: 17px; height: 17px; border-radius: 50%; background: #f2f3f6; color: #8a909c;
  font-size: 10.5px; display: grid; place-items: center; flex: none; margin-top: 5px;
}

/* 状态时间线 */
.wd-record { display: flex; align-items: center; gap: 13px; padding: 15px 22px; border-bottom: 1px solid var(--line-2); }
.wd-record:last-child { border-bottom: 0; }
.wd-record .wr-main { flex: 1; min-width: 0; }
.wd-record .wr-title { font-size: 13.5px; font-weight: 500; }
.wd-record .wr-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.wd-record .wr-amt { text-align: right; }
.wd-record .wr-amt b { font-size: 15px; font-weight: 600; }
.wd-record .wr-amt span { font-size: 10.5px; color: var(--muted); display: block; }

/* ================= 邀请页 ================= */
.invite-hero {
  display: grid; grid-template-columns: 1fr 220px; gap: 24px; align-items: center;
  background: linear-gradient(125deg, #1a1b22, #2c2620 70%, #3a2a26);
  border-radius: 20px; padding: 30px 32px; color: #fff; position: relative; overflow: hidden;
}
.invite-hero::before {
  content: ""; position: absolute; left: 40%; top: -160px; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,162,59,.22), transparent 65%);
}
.invite-hero > * { position: relative; z-index: 1; }
.invite-code-big { font-size: 40px; font-weight: 720; letter-spacing: .12em; line-height: 1.15;
  background: linear-gradient(100deg, #ffe1b0, #eda155); -webkit-background-clip: text; background-clip: text; color: transparent; }
.invite-hint-2 { font-size: 12.5px; color: rgba(255,255,255,.45); margin-top: 8px; }
.invite-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.invite-qr { background: #fff; padding: 10px; border-radius: 16px; width: 190px; justify-self: center; }
.invite-qr img { width: 100%; display: block; border-radius: 6px; }
.invite-qr p { font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 6px; }

.rate-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rate-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; position: relative; overflow: hidden;
}
.rate-card::after {
  content: ""; position: absolute; right: -26px; top: -26px; width: 76px; height: 76px; border-radius: 50%;
  background: var(--gold-soft);
}
.rate-card .rc-lv { font-size: 12px; color: var(--muted); }
.rate-card .rc-rate { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; color: #b97a14; margin-top: 2px; position: relative; }
.rate-card .rc-desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ================= 设置 ================= */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.profile-head { display: flex; align-items: center; gap: 14px; padding: 4px 0 20px; border-bottom: 1px solid var(--line-2); margin-bottom: 20px; }
.profile-head .pn { font-size: 17px; font-weight: 600; }
.profile-head .pc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kv { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 500; }

/* ================= 移动端 ================= */
.mobile-nav { display: none; }
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
  .withdraw-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: column; }
  .hero-code { text-align: left; align-self: flex-start; }
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { height: 58px; padding: 0 16px; }
  .topbar-title { font-size: 16px; }
  .topbar-sub { display: none; }
  .content { padding: 4px 14px 92px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; }
  .mobile-brand .brand-mark { width: 30px; height: 30px; font-size: 14px; border-radius: 9px; }
  .mobile-brand .brand-name { font-size: 14px; }
  .top-avatar .tname { display: none; }
  .top-avatar { padding: 4px; border: 0; background: transparent; }

  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255,255,255,.94); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  }
  .mn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10px; color: #9aa0ab; padding: 3px 0; cursor: pointer;
  }
  .mn-item.active { color: var(--brand); }
  .mn-item svg { width: 21px; height: 21px; }

  .hero { padding: 20px; border-radius: 16px; }
  .hero .h-balance { font-size: 34px; }
  .hero .h-meta { gap: 20px; }
  .hero .h-meta strong { font-size: 13.5px; }
  .hero-code { display: flex; align-items: center; gap: 12px; width: 100%; border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; }
  .hero-code .code { font-size: 20px; margin: 0; }
  .hero-code .lbl { display: none; }
  .hero-code .cp { margin-left: auto; }

  .grid-4 { gap: 10px; }
  .stat { padding: 14px; border-radius: 13px; }
  .stat .s-value { font-size: 21px; }
  .stat .s-label { font-size: 11.5px; }
  .stat .s-ico { width: 26px; height: 26px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-title { font-size: 19px; }
  .card-pad { padding: 18px; }
  .card-head { padding: 16px 18px 0; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-item:nth-child(2) { border-right: 0; }
  .summary-item { border-bottom: 1px solid var(--line-2); }
  .summary-item:nth-last-child(-n+2) { border-bottom: 0; }
  .desktop-only { display: none !important; }
  .m-list { display: block; }
  .table-wrap.desktop-only { display: none; }
  .pager { padding: 14px 18px; }
  .toolbar { padding: 14px 16px; }
  .invite-hero { grid-template-columns: 1fr; padding: 24px 20px; }
  .invite-qr { display: none; }
  .invite-code-big { font-size: 32px; }
  .rate-cards { grid-template-columns: 1fr 1fr; }
  .rate-card:last-child { grid-column: span 2; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .quick { padding: 12px 4px; }
  .quick span { font-size: 11px; }
  .team-row { padding: 13px 16px; }
  .team-row .tr-cell { min-width: 70px; }
  .team-row .tr-cell:nth-child(3) { display: none; }
  .list-item { padding: 12px 18px; }
  .amount-input input { font-size: 23px; height: 54px; }
  .row-2 { grid-template-columns: 1fr; gap: 0; }
  .modal { max-width: 100%; }
  .wd-record { padding: 14px 18px; }
}

/* ================= 新增板块：广告 / 任务 / 交易所 / 转增 ================= */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }
.ad-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: .18s; }
.ad-card:hover { border-color: #f3c9c6; box-shadow: 0 8px 22px rgba(224,68,59,.08); transform: translateY(-1px); }
.ad-top { display: flex; align-items: center; gap: 10px; }
.ad-cover { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: #fdeceb; color: #e0443b; }
.ad-cover.c1 { background: #eef3ff; color: #3574e0; } .ad-cover.c2 { background: #eefaf3; color: #0f9d63; }
.ad-cover.c3 { background: #fdf6e6; color: #b8801f; } .ad-cover.c4 { background: #f4eeff; color: #7a4fd6; }
.ad-title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.ad-brand { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ad-desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; min-height: 42px; }
.ad-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.ad-reward { font-size: 15px; font-weight: 700; color: #e0443b; }
.ad-reward small { font-size: 11px; color: var(--muted); font-weight: 400; }

.task-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-ico { width: 40px; height: 40px; border-radius: 11px; background: #fdf6e6; color: #b8801f; display: grid; place-items: center; flex: 0 0 auto; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 14px; font-weight: 600; }
.task-meta { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.task-reward { font-size: 15px; font-weight: 700; color: #e0443b; white-space: nowrap; }

.x-board { background: linear-gradient(135deg, #16171e, #262838); color: #fff; border-radius: 16px; padding: 22px 24px; }
.x-price { font-size: 34px; font-weight: 700; letter-spacing: -.5px; }
.x-price small { font-size: 13px; font-weight: 400; opacity: .6; margin-left: 6px; }
.x-chg { font-size: 13px; margin-top: 4px; }
.x-chg.up { color: #4ade80; } .x-chg.down { color: #f87171; }
.x-stats { display: flex; gap: 26px; margin-top: 16px; font-size: 12px; opacity: .75; }
.x-stats b { display: block; font-size: 14px; opacity: 1; margin-top: 2px; color: #fff; }

.x-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
@media (max-width: 900px) { .x-grid { grid-template-columns: 1fr; } }

.qr-box { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; cursor: pointer; transition: .18s; background: #fbfbfd; }
.qr-box:hover { border-color: #f3c9c6; background: #fff; }
.qr-box img { width: 108px; height: 108px; object-fit: contain; border-radius: 8px; background: #fff; }
.qr-box .ph { width: 108px; height: 108px; margin: 0 auto; border-radius: 8px; background: #f2f3f7; display: grid; place-items: center; color: var(--muted); font-size: 11.5px; }
.qr-box .lb { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }

.chat-wrap { display: flex; flex-direction: column; height: 380px; }
.chat-list { flex: 1; overflow-y: auto; padding: 6px 2px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 78%; font-size: 13px; line-height: 1.6; padding: 9px 12px; border-radius: 12px; background: #f3f4f8; color: var(--ink); align-self: flex-start; }
.msg.me { align-self: flex-end; background: #fdeceb; color: #a12f28; }
.msg.sys { align-self: center; background: #fffaf0; color: #8a6a2a; font-size: 12px; max-width: 92%; text-align: center; }
.msg .who { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.chat-input { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }

.order-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.order-row:last-child { border-bottom: 0; }
.order-row .grow { flex: 1; min-width: 0; }
.mini-label { font-size: 11.5px; color: var(--muted); }

/* ================= 移动端抽屉菜单 ================= */
.menu-btn {
  display: none; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 9px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); cursor: pointer; padding: 0;
}
.menu-btn:active { background: #f4f5f8; }
.nav-mask {
  display: none; position: fixed; inset: 0; z-index: 70;
  background: rgba(12, 13, 18, .5); opacity: 0; pointer-events: none;
  transition: opacity .26s ease; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.nav-mask.show { opacity: 1; pointer-events: auto; }
.side-close { display: none; }

@media (max-width: 860px) {
  .sidebar {
    display: flex !important; width: 264px; z-index: 80;
    transform: translateX(-103%); transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 12px 0 48px rgba(0, 0, 0, .28); overflow-y: auto;
    padding-top: 18px;
  }
  .sidebar.open { transform: translateX(0); }
  .nav-mask { display: block; }
  .menu-btn { display: grid; }
  .side-close {
    display: grid; place-items: center; position: absolute; top: 14px; right: 12px;
    width: 30px; height: 30px; border-radius: 8px; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .7);
  }
}
