/* ============================================================
   代理中心 / 邀请好友 / 个人中心会员卡  样式
   ============================================================ */

/* ---------- 个人中心：代理卡 ---------- */
.fx-profile-wrap {
  margin: 0 0 14px;
}

.fx-profile-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg,
    rgba(var(--glow-rgb), .20),
    rgba(var(--glow-rgb), .08) 60%,
    rgba(255, 255, 255, .55));
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 2px 12px rgba(60, 80, 70, .08);
}

.fx-pc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.fx-pc-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 4px rgba(60, 80, 70, .12);
  flex: 0 0 auto;
}
.fx-pc-title-wrap { flex: 1; min-width: 0; }
.fx-pc-title {
  font-size: 15px;
  font-weight: 600;
  color: #16241c;
  margin-bottom: 3px;
}
.fx-pc-sub { font-size: 12.5px; color: #6f8477; }

.fx-pc-money {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.fx-pc-money-item {
  flex: 1;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .7);
  text-align: center;
}
.fx-pc-money-v {
  font-size: 17px;
  font-weight: 700;
  color: #16241c;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}
.fx-pc-money-l { font-size: 11.5px; color: #7d8f85; }

.fx-pc-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(-75deg,
    rgba(var(--glow-rgb), .45),
    rgba(var(--glow-rgb), .7),
    rgba(var(--glow-rgb), .45));
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #16241c;
  cursor: pointer;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, .7),
    0 3px 2px -2px rgba(50, 80, 64, .26);
  -webkit-tap-highlight-color: transparent;
}
.fx-pc-btn:active { transform: scale(.98); }

.fx-pc-levels {
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .62);
  overflow: hidden;
}
.fx-pc-level {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  font-size: 13px;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.fx-pc-level:last-child { border-bottom: none; }
.fx-pc-level-name { flex: 1; color: #33443b; }
.fx-pc-level-price { color: #16241c; font-weight: 600; margin-right: 12px; font-variant-numeric: tabular-nums; }
.fx-pc-level-disc { color: #2f8a5c; font-weight: 600; }

/* ---------- 代理中心浮层 ---------- */
.fx-agent-mask {
  position: fixed;
  inset: 0;
  z-index: 99997;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(20, 30, 24, .45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fxAgentFade .22s ease both;
}
@keyframes fxAgentFade { from { opacity: 0 } to { opacity: 1 } }

.fx-agent-panel {
  width: 100%;
  max-width: 560px;
  height: 92vh;
  display: flex;
  flex-direction: column;
  background: #f4f8f5;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(20, 40, 30, .25);
  animation: fxAgentUp .3s cubic-bezier(.22, 1, .36, 1) both;
  overflow: hidden;
}
@keyframes fxAgentUp {
  from { transform: translateY(30px); opacity: .6; }
  to { transform: none; opacity: 1; }
}
.fx-agent-panel.fx-agent-sheet { height: auto; max-height: 80vh; }

.fx-agent-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
  flex: 0 0 auto;
}
.fx-agent-back {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #33443b;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fx-agent-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #16241c;
  text-align: center;
  margin-right: 32px;
}

.fx-agent-tabs {
  display: flex;
  padding: 8px 10px 0;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
  flex: 0 0 auto;
  gap: 4px;
}
.fx-agent-tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: #7d8f85;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  transition: color .2s;
  -webkit-tap-highlight-color: transparent;
}
.fx-agent-tab.active {
  color: #16241c;
  font-weight: 600;
  background: rgba(var(--glow-rgb), .16);
}

.fx-agent-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
}

/* 概览 */
.fx-agent-wallet {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.fx-agent-money {
  flex: 1;
  padding: 14px 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(60, 80, 70, .07);
  border: 1px solid rgba(255, 255, 255, .9);
}
.fx-agent-money.balance { background: linear-gradient(135deg, #eef8ff, #ffffff); }
.fx-agent-money.earn { background: linear-gradient(135deg, #eefaf1, #ffffff); }
.fx-agent-money-l { font-size: 12px; color: #7d8f85; margin-bottom: 4px; }
.fx-agent-money-v {
  font-size: 20px;
  font-weight: 700;
  color: #16241c;
  font-variant-numeric: tabular-nums;
  margin-bottom: 3px;
}
.fx-agent-money-s { font-size: 11px; color: #9aaba1; line-height: 1.35; }

.fx-agent-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.fx-agent-stat {
  flex: 1;
  padding: 12px 8px;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  box-shadow: 0 2px 10px rgba(60, 80, 70, .06);
}
.fx-agent-stat-v {
  font-size: 17px;
  font-weight: 700;
  color: #16241c;
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}
.fx-agent-stat-l { font-size: 11.5px; color: #7d8f85; }

.fx-agent-card {
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(60, 80, 70, .06);
  margin-bottom: 12px;
}
.fx-agent-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #16241c;
  margin-bottom: 10px;
}
.fx-agent-kv {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13.5px;
  color: #4c5f55;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.fx-agent-kv:last-child { border-bottom: none; }
.fx-agent-kv span:last-child { color: #16241c; font-weight: 600; }

.fx-agent-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 248, 230, .8);
  border: 1px solid rgba(255, 220, 150, .5);
  font-size: 12.5px;
  color: #7a6236;
  line-height: 1.7;
  margin-bottom: 12px;
}
.fx-agent-note b { color: #5c451f; }

.fx-agent-hint {
  font-size: 12.5px;
  color: #7d8f85;
  margin-bottom: 10px;
  line-height: 1.5;
}
.fx-agent-empty {
  padding: 40px 20px;
  text-align: center;
  color: #9aaba1;
  font-size: 13.5px;
}
.fx-agent-loading {
  padding: 40px;
  text-align: center;
  color: #9aaba1;
  font-size: 13.5px;
}

/* 下级 / 卡密 / 流水 行 */
.fx-agent-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 8px;
  box-shadow: 0 1px 6px rgba(60, 80, 70, .05);
}
.fx-agent-user-l { flex: 1; min-width: 0; }
.fx-agent-user-name {
  font-size: 14px;
  font-weight: 500;
  color: #16241c;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fx-agent-user-name.code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  letter-spacing: .5px;
}
.fx-agent-user-sub {
  font-size: 11.5px;
  color: #8b9a92;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-agent-mini-btn {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 999px;
  background: #f4f7f5;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #33443b;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fx-agent-mini-btn.primary {
  background: linear-gradient(-75deg,
    rgba(var(--glow-rgb), .45),
    rgba(var(--glow-rgb), .7),
    rgba(var(--glow-rgb), .45));
  border-color: transparent;
  color: #16241c;
  font-weight: 600;
}
.fx-agent-mini-btn.wide {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  font-size: 14px;
}
.fx-agent-mini-btn[disabled] { opacity: .6; }

.fx-agent-amount {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.fx-agent-amount.in { color: #2f8a5c; }
.fx-agent-amount.out { color: #c25a4a; }

.fx-agent-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0;
}
.fx-agent-page-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: #fff;
  font-size: 12.5px;
  color: #33443b;
  cursor: pointer;
}
.fx-agent-page-info { font-size: 12.5px; color: #7d8f85; }

/* 套餐选择行 */
.fx-agent-plan-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 8px;
  box-shadow: 0 1px 6px rgba(60, 80, 70, .05);
  cursor: pointer;
}
.fx-agent-plan-row:active { background: #f0f7f2; }
.fx-agent-plan-name { flex: 1; font-size: 14px; color: #16241c; }
.fx-agent-plan-right { display: flex; align-items: center; gap: 8px; }
.fx-agent-plan-orig {
  font-size: 12px;
  color: #a8b5ad;
  text-decoration: line-through;
}
.fx-agent-plan-cost {
  font-size: 14.5px;
  font-weight: 700;
  color: #2f8a5c;
  font-variant-numeric: tabular-nums;
}

/* 表单控件 */
.fx-agent-select,
.fx-agent-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: #f7faf8;
  font-family: inherit;
  font-size: 14px;
  color: #16241c;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.fx-agent-input.wide { margin-bottom: 10px; }
.fx-agent-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.fx-agent-inline .fx-agent-input { margin-bottom: 0; }

.fx-agent-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 200px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: #f7faf8;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #16241c;
  resize: vertical;
  outline: none;
}

/* 上传二维码 */
.fx-agent-upload {
  margin: 10px 0;
  padding: 20px;
  border-radius: 14px;
  border: 1.5px dashed rgba(0, 0, 0, .14);
  background: #f8fbf9;
  text-align: center;
  cursor: pointer;
}
.fx-agent-upload-text { font-size: 13px; color: #7d8f85; }
.fx-agent-preview {
  display: block;
  max-width: 140px;
  max-height: 140px;
  margin: 10px auto 0;
  border-radius: 10px;
  object-fit: contain;
}

/* ---------- 邀请好友页 ---------- */
.fx-invite-page { margin-bottom: 14px; }

.fx-invite-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eaf6ff, #ffffff);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 2px 12px rgba(60, 80, 70, .07);
}
.fx-invite-emoji { font-size: 30px; flex: 0 0 auto; }
.fx-invite-title {
  font-size: 15px;
  font-weight: 600;
  color: #16241c;
  margin-bottom: 4px;
}
.fx-invite-sub { font-size: 12.5px; color: #6f8477; line-height: 1.45; }

.fx-invite-rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
  color: #4c5f55;
  line-height: 1.55;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.fx-invite-rule:last-child { border-bottom: none; }
.fx-invite-num {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(var(--glow-rgb), .55);
  color: #16241c;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* 小屏 */
@media (max-width: 360px) {
  .fx-agent-money-v { font-size: 18px; }
  .fx-agent-tab { font-size: 12.5px; }
  .fx-agent-body { padding: 12px 12px calc(20px + env(safe-area-inset-bottom)); }
}


/* ---------- 代理申请：等级选择高亮 ---------- */
.fx-agent-plan-row.active {
  background: linear-gradient(-75deg,
    rgba(var(--glow-rgb), .16),
    rgba(var(--glow-rgb), .28),
    rgba(var(--glow-rgb), .16));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 0 8px rgba(var(--glow-rgb), .35);
}

/* ---------- 二次点击确认态 ---------- */
.fx-agent-plan-row.armed {
  background: #fff4e6;
  box-shadow: inset 0 0 0 1.5px #ffb457;
}

/* ---------- 提现状态角标 ---------- */
.fx-agent-badge {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.fx-agent-badge.pending {
  color: #9a6a10;
  background: #fff4df;
}
.fx-agent-badge.paid {
  color: #217a4e;
  background: #e8f8ef;
}
.fx-agent-badge.rejected {
  color: #b4463a;
  background: #fdeceb;
}

/* ---------- 邀请成果统计 ---------- */
.fx-invite-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.fx-invite-stat {
  flex: 1;
  padding: 14px 8px;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  box-shadow: 0 2px 10px rgba(60, 80, 70, .06);
}
.fx-invite-stat-v {
  font-size: 20px;
  font-weight: 700;
  color: #16241c;
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}
.fx-invite-stat-l {
  font-size: 11.5px;
  color: #7d8f85;
}

/* ---------- 首页到期提醒 ---------- */
.fx-expire-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 12px;
  padding: 11px 14px;
  border-radius: 14px;
  background: #fff6e8;
  border: 1px solid #ffe0b0;
  font-size: 13px;
  color: #8a5f16;
}
.fx-expire-tip b { color: #6d4a0d; }
.fx-expire-tip .go {
  margin-left: auto;
  flex: 0 0 auto;
  color: #2f8a5c;
  font-weight: 600;
}
.fx-expire-tip .close {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: #b08c50;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
