/* ==================== 推广中心专用样式 ==================== */

/* 复用main.css的基础变量和组件，这里只写推广中心特有的 */

/* ==================== 推广头部 ==================== */
.promote-header {
  background: linear-gradient(135deg, #1a237e, #283593);
  color: white;
  padding: 24px 16px 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.promote-header::before {
  content: '💰';
  position: absolute;
  top: -10px;
  right: 20px;
  font-size: 80px;
  opacity: 0.08;
}
.promote-header h1 {
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}
.promote-header p {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 4px;
  position: relative;
}

/* ==================== 等级徽章 ==================== */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}

/* ==================== 概览统计卡 ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: -50px 16px 0;
  position: relative;
  z-index: 10;
}
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 16px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  text-align: center;
}
.stat-card .stat-icon { font-size: 22px; }
.stat-card .stat-num {
  font-size: 24px;
  font-weight: 800;
  margin: 4px 0 2px;
}
.stat-card .stat-label {
  font-size: 11px;
  color: #999;
}
.stat-card.highlight .stat-num { color: #ff9800; }
.stat-card.success .stat-num { color: #4caf50; }
.stat-card.primary .stat-num { color: #1e88e5; }

/* ==================== 推广物料区 ==================== */
.material-card {
  background: white;
  border-radius: 12px;
  padding: 18px;
  margin: 14px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.material-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 推广链接 */
.link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f5f6f8;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.link-box .link-text {
  flex: 1;
  font-size: 13px;
  color: #333;
  word-break: break-all;
  line-height: 1.4;
}
.link-box .copy-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  background: #1e88e5;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* 二维码 */
.qr-section {
  text-align: center;
  padding: 12px 0;
}
.qr-canvas-wrap {
  display: inline-block;
  padding: 12px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
}
.qr-canvas-wrap canvas {
  display: block;
}
.qr-hint {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

/* 分享文案 */
.share-templates {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.share-tag {
  padding: 6px 12px;
  background: #f0f4f8;
  border-radius: 16px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
}
.share-tag.active {
  background: #e3f2fd;
  border-color: #1e88e5;
  color: #1e88e5;
  font-weight: 600;
}
.share-text-box {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 10px;
  max-height: 180px;
  overflow-y: auto;
}

/* 卖点列表 */
.selling-points {
  list-style: none;
  margin: 8px 0;
}
.selling-points li {
  padding: 6px 0;
  font-size: 13px;
  color: #555;
}

/* ==================== 线索列表 ==================== */
.lead-item {
  background: white;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.lead-item .lead-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.lead-item .lead-name {
  font-weight: 700;
  font-size: 14px;
}
.lead-item .lead-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.status-new { background: #fff3e0; color: #e65100; }
.status-contacted { background: #e3f2fd; color: #1565c0; }
.status-deal { background: #e8f5e9; color: #2e7d32; }
.lead-item .lead-meta {
  font-size: 12px;
  color: #999;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lead-item .lead-commission {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.lead-item .lead-commission .amount {
  color: #ff9800;
  font-weight: 700;
}

/* ==================== 佣金明细 ==================== */
.commission-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.commission-item:last-child { border-bottom: none; }
.commission-item .comm-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.commission-item .comm-type { font-weight: 600; }
.commission-item .comm-date { font-size: 11px; color: #999; }
.commission-item .comm-amount {
  font-weight: 800;
  color: #ff9800;
  font-size: 15px;
}
.commission-item.bonus .comm-amount { color: #4caf50; }

/* ==================== 提现 ==================== */
.withdraw-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(255,152,0,0.3);
}
.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: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: white;
  border-radius: 16px;
  padding: 24px 20px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}
.modal-close {
  float: right;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

/* 提现记录 */
.withdraw-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.withdraw-item:last-child { border-bottom: none; }
.withdraw-item .wd-left { display: flex; flex-direction: column; gap: 2px; }
.withdraw-item .wd-amount { font-weight: 700; color: #ff9800; }
.withdraw-item .wd-status { font-size: 11px; }

/* ==================== 注册/登录页 ==================== */
.auth-card {
  margin: -50px 16px 0;
  background: white;
  border-radius: 16px;
  padding: 28px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: #f0f4f8;
  border-radius: 10px;
  padding: 4px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active {
  background: white;
  color: #1e88e5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 佣金规则展示 */
.rules-card {
  margin: 14px 16px;
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  border-radius: 12px;
  padding: 18px;
  border-left: 4px solid #ff9800;
}
.rules-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #e65100;
}
.rule-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,152,0,0.15);
}
.rule-row:last-child { border-bottom: none; }
.rule-row .rule-amount {
  font-weight: 700;
  color: #e65100;
}

/* ==================== 等级进度条 ==================== */
.level-progress {
  margin: 14px 16px;
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.level-progress-bar {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  margin: 10px 0 6px;
  overflow: hidden;
}
.level-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ff9800);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.level-progress-text {
  font-size: 12px;
  color: #999;
  display: flex;
  justify-content: space-between;
}

/* ==================== 推广浮窗（报价系统内） ==================== */
.promote-float {
  position: fixed;
  bottom: 90px;
  right: 16px;
  z-index: 90;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: white;
  padding: 10px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255,152,0,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  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; }
}
