/* ==================== 推广中心专用样式 — v3.0 优化版（深色模式） ==================== */

/* ==================== 推广头部 ==================== */
.promote-header {
  background: linear-gradient(180deg, #14121F, #0E0E14);
  color: #E6E6EF;
  padding: 18px 14px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.promote-header::before {
  content: '💰';
  position: absolute;
  top: -10px;
  right: 20px;
  font-size: 64px;
  opacity: 0.06;
}
.promote-header h1 {
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}
.promote-header p {
  font-size: var(--fs-xs, 12px);
  opacity: 0.72;
  margin-top: 3px;
  position: relative;
}

/* ==================== 等级徽章 ==================== */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 16px;
  font-size: var(--fs-xs, 12px);
  font-weight: 700;
  margin-top: 6px;
}

/* ==================== 概览统计卡 ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: -40px 14px 0;
  position: relative;
  z-index: 10;
}
.stat-card {
  background: #16161F;
  border-radius: 10px;
  padding: 14px 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  text-align: center;
}
.stat-card .stat-icon { font-size: var(--fs-xs, 12px); }
.stat-card .stat-num {
  font-size: var(--fs-xs, 12px);
  font-weight: 800;
  margin: 3px 0 1px;
}
.stat-card .stat-label {
  font-size: var(--fs-xs, 12px);
  color: #9A9AB0;
}
.stat-card.highlight .stat-num { color: var(--accent); }
.stat-card.success .stat-num { color: var(--success); }
.stat-card.primary .stat-num { color: var(--primary); }

/* ==================== 推广物料区 ==================== */
.material-card {
  background: #16161F;
  border-radius: 10px;
  padding: 11px;
  margin: 10px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.material-title {
  font-size: var(--fs-xs, 12px);
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 推广链接 */
.link-box {
  display: flex;
  gap: 6px;
  align-items: center;
  background: #1A1A24;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.link-box .link-text {
  flex: 1;
  font-size: var(--fs-xs, 12px);
  color: #E6E6EF;
  word-break: break-all;
  line-height: 1.4;
}
.link-box .copy-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: var(--fs-xs, 12px);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* 二维码 */
.qr-section {
  text-align: center;
  padding: 10px 0;
}
.qr-canvas-wrap {
  display: inline-block;
  padding: 8px;
  background: #1A1A24;
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 10px;
}
.qr-canvas-wrap canvas {
  display: block;
}
.qr-hint {
  font-size: var(--fs-xs, 12px);
  color: #9A9AB0;
  margin-top: 6px;
}

/* 分享文案 */
.share-templates {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.share-tag {
  padding: 5px 10px;
  background: #1A1A24;
  border-radius: 14px;
  font-size: var(--fs-xs, 12px);
  color: #9A9AB0;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.12);
  transition: all 0.2s;
}
.share-tag.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: #cbbcff;
  font-weight: 600;
}
.share-text-box {
  background: #1A1A24;
  border-radius: 6px;
  padding: 8px;
  font-size: var(--fs-xs, 12px);
  color: #C8C8D8;
  line-height: 1.5;
  white-space: pre-wrap;
  margin-bottom: 8px;
  max-height: 150px;
  overflow-y: auto;
}

/* 卖点列表 */
.selling-points {
  list-style: none;
  margin: 6px 0;
}
.selling-points li {
  padding: 4px 0;
  font-size: var(--fs-xs, 12px);
  color: #9A9AB0;
}

/* ==================== 线索列表 ==================== */
.lead-item {
  background: #16161F;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.lead-item .lead-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.lead-item .lead-name {
  font-weight: 700;
  font-size: var(--fs-xs, 12px);
}
.lead-item .lead-status {
  font-size: var(--fs-xs, 12px);
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 600;
}
.status-new { background: rgba(34,211,238,.14); color: var(--accent); }
.status-contacted { background: var(--primary-soft); color: #cbbcff; }
.status-deal { background: rgba(52,211,153,.14); color: #34D399; }
.lead-item .lead-meta {
  font-size: var(--fs-xs, 12px);
  color: #9A9AB0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lead-item .lead-commission {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs, 12px);
}
.lead-item .lead-commission .amount {
  color: var(--accent);
  font-weight: 700;
}

/* ==================== 佣金明细 ==================== */
.commission-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: var(--fs-xs, 12px);
}
.commission-item:last-child { border-bottom: none; }
.commission-item .comm-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.commission-item .comm-type { font-weight: 600; }
.commission-item .comm-date { font-size: var(--fs-xs, 12px); color: #9A9AB0; }
.commission-item .comm-amount {
  font-weight: 800;
  color: var(--accent);
  font-size: var(--fs-xs, 12px);
}
.commission-item.bonus .comm-amount { color: #34D399; }

/* ==================== 提现 ==================== */
.withdraw-btn {
  display: block;
  width: 100%;
  padding: 11px;
  background: var(--grad-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: var(--fs-xs, 12px);
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 4px 14px rgba(139,124,246,.32);
}
.withdraw-btn:active { transform: scale(0.98); }
.withdraw-btn:disabled { opacity: 0.5; }

/* 提现弹窗 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #16161F;
  border-radius: 14px;
  padding: 20px 16px;
  max-width: 380px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-title {
  font-size: var(--fs-xs, 12px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
}
.modal-close {
  float: right;
  font-size: var(--fs-xs, 12px);
  color: #9A9AB0;
  cursor: pointer;
  line-height: 1;
}

/* 提现记录 */
.withdraw-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: var(--fs-xs, 12px);
}
.withdraw-item:last-child { border-bottom: none; }
.withdraw-item .wd-left { display: flex; flex-direction: column; gap: 1px; }
.withdraw-item .wd-amount { font-weight: 700; color: var(--accent); }
.withdraw-item .wd-status { font-size: var(--fs-xs, 12px); }

/* ==================== 注册/登录页 ==================== */
.auth-card {
  margin: -40px 14px 0;
  background: #16161F;
  border-radius: 14px;
  padding: 22px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  position: relative;
  z-index: 10;
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 8px;
  background: #1A1A24;
  border-radius: 8px;
  padding: 3px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  font-size: var(--fs-base, 14px);
  font-weight: 600;
  color: #9A9AB0;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active {
  background: #16161F;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* 佣金规则展示 */
.rules-card {
  margin: 10px 14px;
  background: linear-gradient(135deg, rgba(139,124,246,.14), rgba(34,211,238,.05));
  border-radius: 10px;
  padding: 11px;
  border-left: 4px solid var(--primary);
}
.rules-card h3 {
  font-size: var(--fs-xs, 12px);
  font-weight: 700;
  margin-bottom: 8px;
  color: #cbbcff;
}
.rule-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: var(--fs-xs, 12px);
  border-bottom: 1px solid rgba(139,124,246,.18);
}
.rule-row:last-child { border-bottom: none; }
.rule-row .rule-amount {
  font-weight: 700;
  color: #cbbcff;
}

/* ==================== 等级进度条 ==================== */
.level-progress {
  margin: 10px 14px;
  background: #16161F;
  border-radius: 10px;
  padding: 11px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.level-progress-bar {
  height: 6px;
  background: rgba(255,255,255,.12);
  border-radius: 3px;
  margin: 8px 0 4px;
  overflow: hidden;
}
.level-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: 3px;
  transition: width 0.5s ease;
}
.level-progress-text {
  font-size: var(--fs-xs, 12px);
  color: #9A9AB0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==================== 推广浮窗（报价系统内） ==================== */
.promote-float {
  position: fixed;
  bottom: 80px;
  right: 14px;
  z-index: 90;
  background: var(--grad-primary);
  color: white;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1;
  height: 20px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(139,124,246,.36);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  animation: floatPulse 2s ease-in-out infinite;
}
@keyframes floatPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ==================== 响应式 ==================== */
@media (min-width: 600px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); max-width: 600px; margin-left: auto; margin-right: auto; }
  .material-card, .rules-card, .level-progress { max-width: 600px; margin-left: auto; margin-right: auto; }
}
