/**
 * 全局样式
 * 移动端优先，简洁设计风格
 */

/* ========== 基础重置 ========== */
:root {
  --xxb-primary: #FF4D4F;
  --xxb-primary-dark: #FF7A45;
  --xxb-primary-light: #FFF1F0;
  --xxb-success: #52C41A;
  --xxb-warning: #FAAD14;
  --xxb-danger: #FF4D4F;
  --xxb-text: #333333;
  --xxb-text-secondary: #999999;
  --xxb-text-light: #CCCCCC;
  --xxb-bg: #F5F5F5;
  --xxb-bg-white: #FFFFFF;
  --xxb-border: #F0F0F0;
  --xxb-radius: 12px;
  --xxb-radius-sm: 8px;
  --xxb-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== 页面背景 ========== */
.page-content {
  background-color: var(--xxb-bg);
}

/* ========== 通用卡片样式 ========== */
.xxb-card {
  background: var(--xxb-bg-white);
  padding: 16px;
}

.xxb-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--xxb-text);
  margin-bottom: 12px;
}

/* ========== 余额展示区域 ========== */
.xxb-balance-card {
  background: linear-gradient(135deg, #FF4D4F, #FF7A45);
  color: #fff;
  border-radius: var(--xxb-radius);
  padding: 24px 20px;
  margin: 12px 16px;
}

.xxb-balance-label {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 6px;
}

.xxb-balance-amount {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.xxb-balance-frozen {
  font-size: 13px;
  opacity: 0.75;
  margin-top: 8px;
}

/* ========== 列表项样式 ========== */
.xxb-list-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--xxb-bg-white);
  border-bottom: 0.5px solid var(--xxb-border);
}

.xxb-list-item:last-child {
  border-bottom: none;
}

.xxb-list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--xxb-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.xxb-list-item-content {
  flex: 1;
  min-width: 0;
}

.xxb-list-item-title {
  font-size: 15px;
  color: var(--xxb-text);
  line-height: 1.4;
}

.xxb-list-item-subtitle {
  font-size: 13px;
  color: var(--xxb-text-secondary);
  margin-top: 2px;
}

.xxb-list-item-after {
  font-size: 14px;
  color: var(--xxb-text-secondary);
  flex-shrink: 0;
  margin-left: 8px;
}

/* ========== 按钮样式 ========== */
.xxb-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--xxb-radius);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.2s;
}

.xxb-btn:active {
  opacity: 0.7;
}

.xxb-btn-primary {
  background: var(--xxb-primary);
  color: #fff;
}

.xxb-btn-success {
  background: var(--xxb-success);
  color: #fff;
}

.xxb-btn-danger {
  background: var(--xxb-danger);
  color: #fff;
}

.xxb-btn-outline {
  background: transparent;
  color: var(--xxb-primary);
  border: 1px solid var(--xxb-primary);
}

.xxb-btn-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ========== 表单样式 ========== */
.xxb-form-group {
  margin: 12px 16px;
}

.xxb-form-label {
  font-size: 14px;
  color: var(--xxb-text-secondary);
  margin-bottom: 6px;
  display: block;
}

.xxb-form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--xxb-border);
  border-radius: var(--xxb-radius-sm);
  font-size: 15px;
  color: var(--xxb-text);
  background: var(--xxb-bg-white);
  outline: none;
  transition: border-color 0.2s;
}

.xxb-form-input:focus {
  border-color: var(--xxb-primary);
}

.xxb-form-input::placeholder {
  color: var(--xxb-text-light);
}

/* ========== 状态标签 ========== */
.xxb-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.xxb-status-pending {
  background: #FFF3E0;
  color: var(--xxb-warning);
}

.xxb-status-success {
  background: #E8F5E9;
  color: var(--xxb-success);
}

.xxb-status-danger {
  background: #FFEBEE;
  color: var(--xxb-danger);
}

.xxb-status-info {
  background: #E3F2FD;
  color: var(--xxb-primary);
}

/* ========== 启动页样式 ========== */
.splash-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(180deg, #FF4D4F, #FF7A45);
  color: #fff;
}

.splash-logo {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 20px;
}

.splash-name {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.splash-slogan {
  font-size: 14px;
  opacity: 0.8;
}

.splash-loading {
  margin-top: 40px;
  font-size: 13px;
  opacity: 0.6;
}

/* ========== 空状态 ========== */
.xxb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--xxb-text-secondary);
}

.xxb-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.xxb-empty-text {
  font-size: 14px;
}

/* ========== 导航网格 ========== */
.xxb-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
}

.xxb-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--xxb-text);
}

.xxb-nav-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--xxb-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 6px;
}

.xxb-nav-item-text {
  font-size: 12px;
  color: var(--xxb-text-secondary);
}

/* ========== 分割线 ========== */
.xxb-divider {
  height: 8px;
  background: var(--xxb-bg);
}

/* ========== 页面底部安全区域 ========== */
.xxb-safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ========== 文本辅助类 ========== */
.text-primary { color: var(--xxb-primary); }
.text-success { color: var(--xxb-success); }
.text-warning { color: var(--xxb-warning); }
.text-danger { color: var(--xxb-danger); }
.text-secondary { color: var(--xxb-text-secondary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-bold { font-weight: 600; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 18px; }

/* ========== 间距辅助类 ========== */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-16 { padding: 16px; }

/* ========== 导航栏红色主题 ========== */
.navbar .navbar-bg {
  /* background: linear-gradient(135deg, #FF4D4F, #FF7A45) !important; */
}

.navbar .title {
  /* color: #fff !important; */
}

.navbar .link {
  /* color: #fff !important; */
}

.navbar .icon-back {
  /* color: #fff !important; */
}

/* ========== 按钮红色主题 ========== */
.xxb-btn-primary {
  background: linear-gradient(135deg, #FF4D4F, #FF7A45);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}

.xxb-btn-outline {
  background: transparent;
  color: #FF4D4F;
  border: 1px solid #FF4D4F;
}

/* ========== Framework7 按钮覆盖 ========== */
.button-fill {
  background: linear-gradient(135deg, #FF4D4F, #FF7A45) !important;
}

/* ========== Tabbar 红色主题 ========== */
.tabbar .tab-link-active {
  /* color: #FF4D4F !important; */
}

.tabbar .tab-link-active i {
  color: #FF4D4F !important;
}

/* ========== 状态标签更新 ========== */
.xxb-status-info {
  background: #FFF1F0;
  color: #FF4D4F;
}

.navbar-previous {
  display: none;
}

/* 修复 F7 导航栏标题偏移：让 title 始终居中 */
.navbar .navbar-inner .title {
  margin-left: auto !important;
  margin-right: auto !important;
  left: 0 !important;
  right: 0 !important;
  text-align: center !important;
  position: absolute !important;
  width: auto !important;
  pointer-events: none;
}

.lottery-btn {
  font-size: 16px;
  font-weight: bold;
  color: #ff4800;
  background-color: #ffd0a4;
}

/* ========== 加盟详情页 ========== */
.frand-info-row { display: flex; line-height: 2.2; }
.frand-info-label { color: #999; white-space: nowrap; flex-shrink: 0; }
.frand-info-value { color: #333; word-break: break-all; }

/* ========== 加盟确认页 ========== */
.franc-info-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 0.5px solid var(--xxb-border); }
.franc-info-row:last-child { border-bottom: none; }
.franc-info-label { font-size: 14px; color: var(--xxb-text-secondary); }
.franc-info-value { font-size: 14px; font-weight: 500; color: var(--xxb-text); }
.franc-profit-amount { font-size: 28px; font-weight: 700; color: var(--xxb-primary); text-align: center; padding: 8px 0; }

/* ========== 加盟成功页 ========== */
.frans-info-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 0.5px solid var(--xxb-border); }
.frans-info-row:last-child { border-bottom: none; }
.frans-info-label { font-size: 14px; color: var(--xxb-text-secondary); }
.frans-info-value { font-size: 14px; font-weight: 500; color: var(--xxb-text); }

/* ========== 合同详情页 ========== */
.ct-td-label, .ct-td-value { padding: 12px 14px; border: 1px solid #d0d0d0; font-size: 13px; }
.ct-td-label { color: #666; width: 40%; }
.ct-td-value { color: #333; font-weight: 500; }

/* ========== 大转盘页 ========== */
.lottery-cell { background: #fff; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 78px; transition: all 0.1s; position: relative; }
.lottery-cell.active { background: #FFE44D; box-shadow: 0 0 12px rgba(255,228,77,0.6); }
.lottery-cell .lottery-icon { font-size: 28px; margin-bottom: 4px; }
.lottery-cell .lottery-label { font-size: 12px; color: #666; white-space: nowrap; }
.lottery-btn { background: linear-gradient(135deg, #FF4D4F, #FF7A45) !important; cursor: pointer; }
.lottery-btn .lottery-label { color: #fff !important; font-size: 14px !important; font-weight: 700 !important; }
.lottery-btn .lottery-sub { color: #FFE44D; font-size: 22px; font-weight: 900; font-style: italic; }

/* ========== 团队成员页 ========== */
.tm-tab-active { background: var(--xxb-primary) !important; color: #fff !important; border-color: var(--xxb-primary) !important; }

/* ========== 西信宝订单页 ========== */
.xxbao-order-card { display: flex; align-items: flex-start; padding: 14px 16px; background: var(--xxb-bg-white); margin: 8px 16px; border-radius: var(--xxb-radius); box-shadow: var(--xxb-shadow); cursor: pointer; }
.xxbao-order-card.selected { border: 2px solid var(--xxb-primary); }
.xxbao-checkbox { width: 22px; height: 22px; border: 2px solid var(--xxb-border); border-radius: 4px; margin-right: 12px; flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center; }
.xxbao-order-card.selected .xxbao-checkbox { background: var(--xxb-primary); border-color: var(--xxb-primary); }
.xxbao-order-card.selected .xxbao-checkbox::after { content: '✓'; color: #fff; font-size: 14px; font-weight: 700; }


