/* ===== 会员端 ===== */

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background: radial-gradient(1200px 600px at 12% -10%, #e5edff 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #fdf1dd 0%, transparent 55%), #f5f7fb;
}

.login-card {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 40px 90px -50px rgba(14, 26, 48, 0.5), 0 0 0 1px rgba(14, 26, 48, 0.04);
}

.login-brand {
  position: relative;
  padding: 34px 34px 28px;
  color: #fff;
  background: linear-gradient(150deg, #0c1730 0%, #14264a 52%, #1c3a6c 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.login-brand::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -160px;
  top: -180px;
  background: radial-gradient(circle, rgba(255, 199, 108, 0.32), transparent 62%);
}

.login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 70% 20%, #000, transparent 76%);
  pointer-events: none;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1;
}

.brand-line.small {
  color: var(--ink);
  font-size: 15px;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(150deg, #4c85ff, #2a5ee8);
  box-shadow: 0 6px 14px -6px rgba(47, 107, 255, 0.9);
}

.login-brand .logo-mark {
  background: linear-gradient(150deg, #ffd28a, #e2a63f);
  color: #2a1c05;
  box-shadow: 0 6px 16px -6px rgba(226, 166, 63, 0.65);
}

.login-brand h1 {
  position: relative;
  z-index: 1;
  margin: 30px 0 12px;
  font-size: 30px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-desc {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(226, 235, 250, 0.74);
  font-size: 13.5px;
  line-height: 1.8;
  max-width: 330px;
}

.brand-preview {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.bp-label {
  font-size: 12px;
  color: rgba(215, 228, 250, 0.72);
  letter-spacing: 0.02em;
}

.bp-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 4px 0 10px;
  font-size: 32px;
  font-weight: 620;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.bp-amount small {
  font-size: 16px;
  opacity: 0.75;
}

.bp-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bp-pill {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(232, 240, 253, 0.9);
}

.brand-foot {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  font-size: 11.5px;
  color: rgba(200, 215, 240, 0.5);
}

.login-form-side {
  padding: 44px 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-side h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.login-sub {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
}

.login-form-side .btn-primary {
  height: 44px;
  font-size: 14.5px;
  margin-top: 4px;
}

.login-error {
  margin: -4px 0 12px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12.5px;
  border: 1px solid #f7dbda;
}

.login-hint {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f7f9fd;
  border: 1px dashed var(--line);
  padding: 9px 12px;
  border-radius: 9px;
}

.login-hint code {
  font-family: var(--font);
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.login-hint .sep {
  color: var(--muted-2);
}

.admin-entry {
  margin-top: 26px;
  padding-top: 0;
  font-size: 12.5px;
  color: var(--muted);
  align-self: flex-start;
}

.admin-entry:hover {
  color: var(--blue);
}

/* ---------- 顶栏 ---------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.tabbar {
  display: flex;
  gap: 2px;
  background: #f2f5fa;
  padding: 3px;
  border-radius: 11px;
}

.tab {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  transition: all 0.16s ease;
}

.tab:hover {
  color: var(--ink-2);
}

.tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 30, 54, 0.12);
}

.user-box {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-meta {
  text-align: right;
  line-height: 1.25;
}

.user-name {
  font-size: 13.5px;
  font-weight: 600;
}

.user-sub {
  font-size: 11.5px;
  color: var(--muted);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #e8efff, #d7e3ff);
  color: var(--blue-dark);
  font-weight: 650;
  font-size: 13px;
  border: 1px solid #dbe6ff;
}

/* ---------- 主体 ---------- */
.app-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 40px;
}

.panel-page {
  animation: fadeUp 0.24s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.home-grid {
  display: grid;
  grid-template-columns: 1.32fr 1fr;
  gap: 16px;
  align-items: start;
}

.home-left,
.home-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ---------- 主视觉卡片 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px 24px 20px;
  color: #fff;
  background: linear-gradient(135deg, #0c1730 0%, #14264a 50%, #1d3a6b 100%);
  box-shadow: 0 30px 60px -36px rgba(12, 25, 50, 0.85);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 78% 6%, #000 0%, transparent 70%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  right: -110px;
  top: -150px;
  background: radial-gradient(circle, rgba(255, 199, 108, 0.34), transparent 62%);
  pointer-events: none;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(219, 231, 250, 0.86);
  letter-spacing: 0.01em;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.16);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(74, 222, 128, 0.05);
  }
}

/* 日期切换：‹ 日期 › + 回到今天，点日期唤起原生日历 */
.day-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 3;
}

.day-arrow {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #e6eefc;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.day-arrow:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.day-arrow:disabled {
  opacity: 0.28;
  cursor: default;
}

.day-pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 23px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #e6eefc;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease;
}

.day-pick:hover {
  background: rgba(255, 255, 255, 0.12);
}

.day-pick::after {
  content: '▾';
  font-size: 9px;
  opacity: 0.6;
}

.day-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.day-input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.day-reset {
  flex: none;
  height: 22px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid rgba(255, 207, 135, 0.4);
  background: rgba(255, 207, 135, 0.14);
  color: #ffcf87;
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease;
}

.day-reset:hover {
  background: rgba(255, 207, 135, 0.24);
}

.day-hint {
  position: relative;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(219, 231, 250, 0.78);
  font-size: 11.5px;
  line-height: 1.4;
}

.day-hint i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffcf87;
  flex: none;
}

@media (max-width: 640px) {
  .hero-top {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .day-bar {
    width: 100%;
    justify-content: flex-start;
  }
}

.hero-amount {
  position: relative;
  margin: 14px 0 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: clamp(34px, 4.6vw, 46px);
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.hero-amount .cny {
  font-size: 20px;
  opacity: 0.66;
  font-weight: 500;
}

.hero-delta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12.5px;
  color: rgba(214, 228, 250, 0.72);
  min-height: 20px;
}

.hero-delta .up,
.hero-delta .down {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hero-delta .up {
  color: #6ee7a8;
  background: rgba(74, 222, 128, 0.12);
}

.hero-delta .down {
  color: #ff9d9a;
  background: rgba(255, 107, 107, 0.14);
}

.hero-meta {
  position: relative;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.hm {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hm span {
  font-size: 11.5px;
  color: rgba(196, 213, 240, 0.6);
  white-space: nowrap;
}

.hm b {
  font-size: 15px;
  font-weight: 620;
  color: #f2f7ff;
  letter-spacing: -0.01em;
}

.hm b.gold {
  color: #ffcf87;
}

/* ---------- 数字卡片 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 13px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value {
  margin: 6px 0 2px;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.stat-value small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 3px;
}

.stat-foot {
  font-size: 11.5px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-foot em {
  font-style: normal;
  color: var(--green);
  font-weight: 600;
}

/* ---------- 等级 ---------- */
.level-panel {
  padding: 16px 18px 14px;
}

.level-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.level-name {
  font-size: 14px;
  font-weight: 650;
}

.level-desc {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.level-rate {
  font-size: 20px;
  font-weight: 650;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.level-bar {
  margin-top: 12px;
  height: 7px;
  border-radius: 6px;
  background: #eef1f8;
  overflow: hidden;
}

.level-bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, #b9c8ff, #6f8dff);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.level-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 10.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

/* 等级权益（按《云工巨匠AI 市场机制》层级权益对照表） */
.level-perks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.level-perks span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.level-perks i {
  font-style: normal;
  font-size: 10px;
  color: var(--muted-2);
  white-space: nowrap;
}

.level-perks b {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 420px) {
  .level-perks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- 推荐管道收益 ---------- */
/* 名下 OPC 台数：只做接入规模展示，不参与分成计算 */
.opc-strip {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.opc-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.opc-label {
  font-size: 12.5px;
  color: var(--muted);
}

.opc-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.opc-value b {
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.opc-value span {
  font-size: 12px;
  color: var(--muted-2);
}

.opc-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.opc-badge.live {
  background: var(--green-soft);
  color: var(--green);
  border-color: #c8ecdd;
}

.opc-side {
  min-width: 0;
  border-top: 1px solid var(--line-2);
  padding-top: 8px;
}

.opc-source {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.opc-note {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

@media (max-width: 720px) {
  .opc-strip {
    padding: 12px 14px;
  }
}

.pipeline-box {
  margin-top: 11px;
  padding: 11px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fdf8ee 0%, #fbf5ea 100%);
  border: 1px solid #f0e3c8;
}

.pipeline-box.off {
  background: #f7f9fc;
  border-color: var(--line);
}

.pl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.pl-note {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.5;
  color: #a5874f;
}

.pl-title {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
}

.pl-title b {
  color: var(--gold);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.pl-month {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pl-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
  font-size: 11px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.pl-arrow {
  color: var(--muted-2);
}

.pl-gain {
  color: var(--gold);
  font-weight: 700;
}

.pl-list {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #ece0c8;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 168px;
  overflow: auto;
}

.pl-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: baseline;
  gap: 8px;
  font-size: 11.5px;
}

.pl-name {
  color: var(--ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-lv {
  font-size: 10px;
  color: var(--muted-2);
  white-space: nowrap;
}

.pl-base {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pl-amt {
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pl-empty {
  margin-top: 7px;
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.55;
}

/* ---------- 账号佣金 ---------- */
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--green);
  background: var(--green-soft);
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.live-dot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

.account-list {
  display: flex;
  flex-direction: column;
}

.account-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-2);
}

.account-row:last-child {
  border-bottom: none;
}

.account-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.account-name {
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.bar {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: #f0f3f9;
  overflow: hidden;
  min-width: 30px;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #c9d8ff;
  transition: width 0.6s ease;
}

.account-platform {
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
}

.account-amount {
  font-size: 14px;
  font-weight: 620;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* ---------- 趋势图 ---------- */
.trend-chart {
  width: 100%;
  height: 168px;
}

.trend-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-inner {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100%;
}

.chart-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  position: relative;
}

.chart-val {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.16s ease;
  white-space: nowrap;
}

.chart-val.show,
.chart-col:hover .chart-val {
  opacity: 1;
}

.chart-track {
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(180deg, #f7f9fd, #f2f5fb);
  border-radius: 7px;
  overflow: hidden;
  min-height: 40px;
}

.chart-fill {
  width: 100%;
  border-radius: 7px;
  background: linear-gradient(180deg, #b9ccff, #dbe5ff);
  transition: height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.chart-fill.today {
  background: linear-gradient(180deg, #4b7fff, #7ba2ff);
  box-shadow: 0 6px 14px -8px rgba(47, 107, 255, 0.9);
}

.chart-x {
  font-size: 10.5px;
  color: var(--muted-2);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- 邀请 ---------- */
.invite-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #dfe7ff;
  background: linear-gradient(120deg, #f2f6ff 0%, #eef2ff 52%, #f7f4ff 100%);
}

.invite-left {
  flex: 1;
  min-width: 0;
}

.invite-title {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.invite-desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.invite-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.invite-code-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: #fff;
  border: 1px solid #dbe4ff;
  border-radius: 9px;
  padding: 5px 11px;
}

.invite-code-box span {
  font-size: 11px;
  color: var(--muted);
}

.invite-code-box b {
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--blue-dark);
}

.invite-qr {
  width: 74px;
  height: 74px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #dbe4ff;
  padding: 8px;
  flex: none;
}

/* ---------- 最近结算 ---------- */
.recent-list {
  display: flex;
  flex-direction: column;
  padding-bottom: 4px;
}

.recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line-2);
}

.recent-row:last-child {
  border-bottom: none;
}

.recent-date {
  font-size: 12.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.recent-date small {
  color: var(--muted-2);
  margin-left: 6px;
  font-size: 11px;
}

.recent-amount {
  font-size: 13px;
  font-weight: 620;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.link-btn {
  font-size: 12.5px;
  color: var(--blue);
  padding: 3px 6px;
  border-radius: 6px;
  font-weight: 500;
}

.link-btn:hover {
  background: #eef3ff;
}

/* ---------- 页头 / 明细 ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.page-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.page-head p {
  margin: 5px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.seg {
  display: inline-flex;
  background: #eef1f8;
  border-radius: 9px;
  padding: 3px;
}

.seg button {
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--muted);
}

.seg button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 30, 54, 0.1);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.mini-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
}

.mini-stat span {
  font-size: 12px;
  color: var(--muted);
}

.mini-stat b {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.mini-stat b.gold {
  color: var(--gold);
}

.mini-stat b.green {
  color: var(--green);
}

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: 0 0 var(--radius) var(--radius);
}

.data-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 10px 18px;
  background: #fafbfe;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.data-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: #fbfcff;
}

/* 佣金明细行可点击回看当日 */
.data-table tbody tr.row-link {
  cursor: pointer;
}

.data-table tbody tr.row-link:hover {
  background: #f3f7ff;
}

.data-table tbody tr.row-link:hover .date-cell span {
  color: var(--blue);
}

.ta-r {
  text-align: right;
}

.ta-c {
  text-align: center;
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.money.muted {
  color: var(--muted);
  font-weight: 500;
}

.date-cell {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.date-cell small {
  font-size: 11px;
  color: var(--muted-2);
}

/* ---------- 推荐列表 ---------- */
.ref-list {
  display: flex;
  flex-direction: column;
}

.ref-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-2);
}

.ref-row:last-child {
  border-bottom: none;
}

.ref-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 650;
  color: #fff;
  letter-spacing: 0;
}

.ref-name {
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ref-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.ref-team {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.ref-team b {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

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

.empty .empty-ico {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: #f2f5fb;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #b8c3d6;
}

/* ---------- 分页 ---------- */
.pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager-info {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 46px;
  text-align: center;
}

/* ---------- 页脚 ---------- */
.app-foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 26px;
  font-size: 11.5px;
  color: var(--muted-2);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  /* backdrop-filter 会让父元素成为 fixed 后代的包含块，导致底部导航错位到顶部 */
  .topbar {
    backdrop-filter: none;
    background: #fff;
  }

  .login-card {
    grid-template-columns: 1fr;
    max-width: 440px;
  }

  .login-brand {
    padding: 24px 24px 20px;
  }

  .login-brand h1 {
    font-size: 22px;
    margin: 18px 0 8px;
  }

  .brand-desc {
    display: none;
  }

  .brand-preview {
    margin-top: 18px;
    padding: 14px 16px;
  }

  .bp-amount {
    font-size: 26px;
    margin-bottom: 6px;
  }

  .brand-foot {
    display: none;
  }

  .login-form-side {
    padding: 26px 24px 24px;
  }

  .login-form-side .admin-entry {
    margin-top: 6px;
  }

  .topbar-inner {
    height: 56px;
    padding: 0 16px;
    gap: 12px;
  }

  .brand-line.small .logo-text {
    display: none;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    box-shadow: 0 -6px 20px -16px rgba(16, 30, 54, 0.5);
  }

  .tab {
    height: 42px;
    font-size: 12px;
    border-radius: 8px;
    padding: 0 2px;
  }

  .tab.active {
    background: #eef3ff;
    color: var(--blue-dark);
    box-shadow: none;
  }

  .user-meta {
    display: none;
  }

  .app-main {
    padding: 14px 14px 92px;
  }

  .hero {
    padding: 18px 18px 16px;
    border-radius: 18px;
  }

  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 8px;
  }

  .hm:nth-child(2) {
    text-align: right;
  }

  .hm:nth-child(4) {
    text-align: right;
  }

  .stat-value {
    font-size: 21px;
  }

  .ref-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 14px;
  }

  .ref-team {
    display: none;
  }

  .invite-card {
    align-items: flex-start;
  }

  .invite-qr {
    display: none;
  }

  .data-table th,
  .data-table td {
    padding-left: 14px;
    padding-right: 14px;
  }

  .app-foot {
    padding: 0 16px 88px;
  }

  .page-head h2 {
    font-size: 17px;
  }
}

/* 区域服务商 / 机房基地 徽标 */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 10px;
}

.hero-tags.hidden {
  display: none;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1;
  padding: 6px 11px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
  color: #dbe7ff;
  max-width: 100%;
}

.hero-chip svg {
  width: 12px;
  height: 12px;
  flex: none;
  color: #ffd28a;
}

.hero-chip.region {
  color: #ffe2ae;
  border-color: rgba(255, 210, 138, 0.4);
  background: rgba(255, 210, 138, 0.12);
  font-weight: 600;
}

/* 区域服务商：金色高亮；同区普通会员：中性色 */
.hero-chip.region.is-provider {
  color: #ffd28a;
  border-color: rgba(255, 210, 138, 0.6);
  background: rgba(255, 210, 138, 0.2);
  font-weight: 700;
}

.hero-chip.region:not(.is-provider) {
  color: #c9d8f5;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 500;
}

.hero-chip.base {
  color: #c9d8f5;
}
