/* ============================================
   极匠时代健身 - Web应用样式
   适配桌面端 (>= 768px) + 移动端 (< 768px)
   ============================================ */

/* === CSS变量 === */
:root {
  --primary: #4169e1;
  --primary-dark: #3158d4;
  --primary-light: #e8ecff;
  --danger: #f44336;
  --success: #4caf50;
  --warning: #ff9800;
  --info: #2196f3;
  --dark: #1a1a2e;
  --text: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg: #f5f6fa;
  --white: #ffffff;
  --border: #e8e8e8;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
  --tab-height: 60px;
  --header-height: 64px;
  --max-width: 1200px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* === 全局重置 === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 19.2px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
               'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 移动端留出TabBar空间 */
body.is-mobile .main-content {
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 20px);
}

/* 桌面端留出Header空间 */
body.is-desktop .main-content {
  padding-top: var(--header-height);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
}

/* === 桌面端头部 === */
.desktop-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

body.is-desktop .desktop-header {
  display: block;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  font-size: 28px;
}

.logo-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.logo-subtitle {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.header-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* === 主内容 === */
.main-content {
  min-height: 100vh;
}

.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* === 页面通用 === */
.page {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bottom-spacer {
  height: 20px;
}

/* === 卡片 === */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-link {
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
}

.section-badge {
  font-size: 11px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 10px;
}

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1.4;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary-light);
}

.btn-light {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
  border-color: var(--warning);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 16px;
}

.flex-1 {
  flex: 1;
}

/* === 表单 === */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(65,105,225,0.1);
}

.form-input::placeholder {
  color: #ccc;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23999'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* === 标签 === */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

/* === 间距 === */
.section {
  margin: 12px;
}

/* === Toast === */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: slideDown 0.3s ease;
  pointer-events: auto;
  white-space: nowrap;
}

.toast-icon {
  font-size: 16px;
  font-weight: bold;
}

.toast-message {
  font-size: 14px;
  color: var(--text);
}

.toast-hide {
  animation: slideUp 0.3s ease forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

/* === Loading === */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-spinner {
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-body {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* === TabBar (移动端) === */
.tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tab-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
}

body.is-mobile .tab-bar {
  display: flex;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 0;
  cursor: pointer;
  position: relative;
  flex: 1;
  transition: var(--transition);
  color: var(--text-muted);
}

.tab-item.active {
  color: var(--primary);
}

.tab-icon {
  width: 25px;
  height: 25px;
  margin-bottom: 2px;
  flex-shrink: 0;
  transition: var(--transition);
}

.tab-label {
  font-size: 10px;
  font-weight: 500;
}

.tab-badge {
  position: absolute;
  top: 2px;
  right: 50%;
  transform: translateX(14px);
  background: var(--danger);
  color: white;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* === 回到顶部 === */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(65,105,225,0.4);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

body.is-desktop .back-to-top {
  bottom: 30px;
}

/* === 首页Banner === */
.home-banner {
  position: relative;
  overflow: hidden;
  margin: 12px;
  border-radius: var(--radius-lg);
  aspect-ratio: 16/7;
  min-height: 180px;
}

.banner-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a2e;
}

.banner-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-slide.active {
  opacity: 1;
}

.banner-content {
  text-align: center;
  color: white;
  padding: 20px;
}

.banner-content h2 {
  font-size: 28px;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.banner-content p {
  font-size: 16px;
  opacity: 0.9;
}

.banner-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

/* === 门店切换 === */
.gym-switch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.gym-name {
  font-weight: 700;
  font-size: 16px;
}

.gym-info-row {
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* === 团购核销 === */
.verify-section {
  margin: 12px;
}

.verify-btns {
  display: flex;
  gap: 10px;
}

.verify-btn {
  flex: 1;
  font-size: 13px;
  padding: 12px;
}

/* === 健身卡网格 === */
.fitness-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.fitness-card-item {
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  color: white;
}

.fitness-card-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.card-chip {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.card-name-text {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.card-duration {
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 8px;
}

.card-price-tag {
  margin-bottom: 6px;
}

.price-symbol {
  font-size: 14px;
  font-weight: 600;
}

.price-value {
  font-size: 24px;
  font-weight: 700;
}

.card-remark {
  font-size: 10px;
  opacity: 0.8;
}

/* === 饮品网格 === */
.drink-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.drink-item {
  background: #f8f9fa;
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.drink-item:hover {
  background: var(--primary-light);
}

.drink-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 4px;
}

.drink-name {
  font-size: 13px;
  font-weight: 500;
  display: block;
}

.drink-tag {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
}

.drink-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--danger);
  display: block;
  margin-top: 4px;
}

/* === 教练卡片 === */
.coach-card-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.coach-card-mini:last-child {
  border-bottom: none;
}

.coach-card-mini:hover {
  background: #fafafa;
  margin: 0 -16px;
  padding: 12px 16px;
}

.coach-avatar-mini {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.coach-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coach-info-mini {
  flex: 1;
  min-width: 0;
}

.coach-name-mini {
  font-weight: 600;
  font-size: 15px;
}

.coach-level-mini {
  font-size: 12px;
  color: var(--primary);
  margin-top: 2px;
}

.coach-price-mini {
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
  margin-top: 2px;
}

.coach-rating-mini {
  font-size: 12px;
  color: var(--warning);
  flex-shrink: 0;
}

/* === 团购 === */
.group-buy-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.group-buy-item:last-child {
  border-bottom: none;
}

.gb-left {
  flex: 1;
}

.gb-name {
  font-weight: 600;
  font-size: 14px;
}

.gb-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.gb-price {
  margin-top: 6px;
}

.gb-current {
  font-size: 20px;
  font-weight: 700;
  color: var(--danger);
}

.gb-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

.gb-btn {
  flex-shrink: 0;
}

/* === 商家网格 === */
.merchant-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.merchant-item {
  background: #f8f9fa;
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.merchant-item:hover {
  background: var(--primary-light);
}

.merchant-icon {
  font-size: 26px;
  display: block;
}

.merchant-name {
  font-size: 12px;
  font-weight: 500;
  display: block;
  margin-top: 4px;
}

.merchant-discount {
  font-size: 13px;
  font-weight: 700;
  color: var(--danger);
  display: block;
  margin-top: 2px;
}

/* === 功能网格 === */
.func-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.func-item {
  text-align: center;
  cursor: pointer;
  padding: 12px 6px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.func-item:hover {
  background: var(--primary-light);
}

.func-icon {
  font-size: 28px;
  display: block;
}

.func-name {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: block;
}

/* === 空状态 === */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  margin: 4px 0;
}

/* === 横向滚动 === */
.scroll-x {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-x::-webkit-scrollbar {
  display: none;
}

/* === 桌面端适配 === */
@media (min-width: 768px) {
  body {
    background: #f0f2f5;
  }

  .page-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
  }

  /* 桌面端Banner更大 */
  .home-banner {
    aspect-ratio: 21/9;
    min-height: 280px;
    margin: 16px 0;
    border-radius: var(--radius-xl);
  }

  .banner-content h2 {
    font-size: 36px;
  }

  .banner-content p {
    font-size: 18px;
  }

  /* 桌面端布局优化 */
  .page {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section, .card {
    margin: 0;
  }

  /* 首页双栏布局 */
  .page-home {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .page-home .home-banner {
    grid-column: 1 / -1;
  }

  .page-home .gym-switch {
    grid-column: 1 / -1;
  }

  .page-home .verify-section {
    grid-column: 1 / -1;
  }

  /* 教练页 */
  .page-coach {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
  }

  /* 铁馆页双栏 */
  .page-gym {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .page-gym .gym-banner {
    grid-column: 1 / -1;
  }

  /* 定制页双栏 */
  .page-custom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
  }

  .page-custom .custom-banner {
    grid-column: 1 / -1;
  }

  /* 个人中心 */
  .page-profile {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
  }

  /* 登录页 */
  .page-login {
    max-width: 420px;
    margin: 40px auto !important;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
  }

  /* 注册页 */
  .page-register {
    max-width: 500px;
    margin: 20px auto !important;
  }

  /* 健身卡网格：桌面端6列 */
  .fitness-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* 饮品：桌面端4列 */
  .drink-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* 商家：桌面端6列 */
  .merchant-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  /* 功能：桌面端6列 */
  .func-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  /* 侧边导航高亮 */
  .nav-link.active {
    background: var(--primary);
    color: white;
  }
}

/* === 大桌面端 (>=1200px) === */
@media (min-width: 1200px) {
  .page-home {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .page-home .home-banner,
  .page-home .gym-switch,
  .page-home .verify-section {
    grid-column: 1 / -1;
  }

  .page-gym {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-gym .gym-banner {
    grid-column: 1 / -1;
  }

  .page-custom {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-custom .custom-banner {
    grid-column: 1 / -1;
  }

  .fitness-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .drink-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ============ 新增样式：适配小程序页面 ============ */

/* === 门店切换选项卡 === */
.gym-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.gym-selector {
  display: flex;
  gap: 8px;
}

.gym-select-btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.gym-select-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* === 健身卡网格 === */
.fitness-card-item {
  position: relative;
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
}

.fitness-card-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-chip {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
}

.card-name-text {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-price-tag {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.price-symbol {
  font-size: 14px;
}

.price-value {
  font-size: 24px;
  font-weight: 700;
}

/* === 提示框 === */
.tip-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff8e1;
  border-radius: var(--radius);
  border: 1px solid #ffe082;
}

.tip-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.tip-text {
  font-size: 12px;
  color: #f57f17;
  line-height: 1.5;
}

/* === 团购核销 === */
.verify-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.verify-item {
  text-align: center;
  padding: 16px 12px;
  background: #f8f9fa;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.verify-item:hover {
  background: var(--primary-light);
}

.verify-icon-bg {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verify-icon-bg.douyin-bg {
  background: linear-gradient(135deg, #ff0050, #00f2ea);
}

.verify-icon-bg.meituan-bg {
  background: linear-gradient(135deg, #ffd100, #ff8c00);
}

.verify-icon-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.verify-icon-text {
  font-size: 24px;
}

.verify-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
}

.verify-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* === 饮品图片 === */
.drink-image-box {
  width: 100%;
  aspect-ratio: 1;
  background: #f0f0f0;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drink-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drink-fallback {
  font-size: 36px;
}

.drink-price-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.drink-btn {
  font-size: 11px;
  color: var(--primary);
  padding: 2px 8px;
  background: var(--primary-light);
  border-radius: 8px;
}

/* === 瓶装饮料滚动 === */
.bottle-drink-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bottle-drink-scroll::-webkit-scrollbar {
  display: none;
}

.drink-scroll-container {
  display: flex;
  gap: 10px;
  padding-bottom: 4px;
}

.drink-scroll-item {
  min-width: 100px;
  text-align: center;
  background: #f8f9fa;
  border-radius: var(--radius);
  padding: 12px 8px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.drink-scroll-item:hover {
  background: var(--primary-light);
}

.drink-thumb-wrapper {
  width: 64px;
  height: 64px;
  margin: 0 auto 6px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drink-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drink-scroll-name {
  font-size: 11px;
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drink-scroll-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
  display: block;
  margin-top: 2px;
}

.drink-scroll-action {
  font-size: 10px;
  color: var(--primary);
  display: block;
  margin-top: 2px;
}

/* === 教练列表 === */
.coach-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.coach-item:last-child {
  border-bottom: none;
}

.coach-item:hover {
  background: #fafafa;
  margin: 0 -16px;
  padding: 14px 16px;
}

.coach-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.coach-info {
  flex: 1;
  min-width: 0;
}

.coach-name {
  font-size: 16px;
  font-weight: 600;
  display: block;
}

.coach-title {
  font-size: 12px;
  color: var(--primary);
  display: block;
  margin-top: 2px;
}

.coach-course-level {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.coach-experience {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.coach-price {
  margin-top: 4px;
}

.price-label {
  font-size: 11px;
  color: var(--text-muted);
}

.price-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--danger);
}

.price-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.coach-rating {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating-score {
  font-weight: 700;
  color: var(--text);
}

.rating-star {
  color: var(--warning);
}

.rating-count {
  font-size: 11px;
  color: var(--text-muted);
}

/* === 团购商品 === */
.group-buy-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.group-buy-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.group-tag {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--danger);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 0 var(--radius) 0 var(--radius);
}

.group-buy-info {
  flex: 1;
  min-width: 0;
}

.group-buy-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
}

.group-buy-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0;
}

.group-buy-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.feature-item {
  font-size: 11px;
  color: var(--success);
  background: #e8f5e9;
  padding: 2px 8px;
  border-radius: 8px;
}

.group-buy-progress {
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--danger));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.group-buy-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.price-left {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.group-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--danger);
}

.original-price {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.group-btn {
  background: var(--primary);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* === 倒计时 === */
.countdown-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.countdown-label {
  font-size: 13px;
  color: var(--text-muted);
}

.countdown-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.time-item {
  background: var(--dark);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  font-family: monospace;
}

.time-separator {
  font-weight: 700;
  color: var(--dark);
}

.title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === 周边福利按钮 === */
.benefit-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff8e1, #fff3e0);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.benefit-button:hover {
  box-shadow: var(--shadow);
}

.benefit-icon {
  font-size: 24px;
}

.benefit-text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.benefit-arrow {
  color: var(--text-muted);
  font-size: 14px;
}

/* ============ 教练页 ============ */
.coach-header {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: white;
  padding: 28px 24px;
  text-align: center;
  border-radius: 0 0 24px 24px;
}

.coach-header-bg h2 {
  margin: 0;
  font-size: 22px;
}

.coach-header-bg p {
  margin: 6px 0 0;
  opacity: 0.8;
  font-size: 13px;
}

/* 筋膜刀 */
.fascia-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fascia-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.fascia-item:hover {
  background: var(--primary-light);
}

.fascia-icon {
  font-size: 28px;
  width: 44px;
  text-align: center;
  flex-shrink: 0;
}

.fascia-info {
  flex: 1;
  min-width: 0;
}

.fascia-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
}

.fascia-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.fascia-price-box {
  text-align: right;
  flex-shrink: 0;
}

.fascia-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--danger);
}

.fascia-duration {
  font-size: 11px;
  color: var(--text-muted);
}

.fascia-arrow {
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
}

/* 课程等级 */
.course-level-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.course-level-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.level-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.level-name {
  font-size: 14px;
  font-weight: 600;
}

.level-price-range {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.level-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* 教练完整卡片 */
.coach-full-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-card-full {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #f8f9fa;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.coach-card-full:hover {
  box-shadow: var(--shadow);
}

.coach-card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.coach-avatar-real {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.coach-avatar-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}

.coach-tag {
  position: absolute;
  bottom: 0;
  right: 0;
  color: white;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
}

.coach-card-body {
  flex: 1;
  min-width: 0;
}

.coach-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coach-card-name {
  font-size: 15px;
  font-weight: 600;
}

.coach-card-level {
  font-size: 12px;
  color: var(--primary);
}

.coach-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.coach-card-price {
  margin-top: 4px;
}

.coach-card-rating {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============ 门店页 ============ */
.gym-header {
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
  color: white;
  padding: 28px 24px;
  text-align: center;
  border-radius: 0 0 24px 24px;
}

.gym-header-bg h2 {
  margin: 0;
  font-size: 22px;
}

.gym-header-bg p {
  margin: 6px 0 0;
  opacity: 0.8;
  font-size: 13px;
}

/* 标签导航 */
.tab-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-nav-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.tab-nav-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* 状态徽章 */
.status-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 10px;
  background: #e0e0e0;
  color: #666;
}

.status-badge.active {
  background: #e8f5e9;
  color: var(--success);
}

/* 赛事信息 */
.competition-hero {
  margin-bottom: 12px;
}

.comp-hero-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comp-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.comp-label {
  color: var(--text-muted);
  font-size: 13px;
}

.comp-value {
  font-weight: 500;
  font-size: 13px;
}

.comp-description {
  padding: 12px;
  background: #f8f9fa;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* 赛事组别 */
.comp-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comp-group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.comp-group-item:hover {
  background: var(--primary-light);
}

.group-info {
  flex: 1;
  min-width: 0;
}

.group-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
}

.group-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.group-price-box {
  text-align: right;
  flex-shrink: 0;
}

.group-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--danger);
  display: block;
}

.group-action {
  font-size: 12px;
  color: var(--primary);
  margin-top: 2px;
  display: block;
}

/* 注册表单 */
.register-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 新闻 */
.news-item {
  padding: 4px 0;
}

.news-title {
  font-size: 15px;
  font-weight: 600;
  display: block;
}

.news-meta {
  display: flex;
  gap: 12px;
  margin: 6px 0;
}

.news-date {
  font-size: 11px;
  color: var(--text-muted);
}

.news-source {
  font-size: 11px;
  color: var(--primary);
}

.news-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

/* 商家 */
.merchant-intro {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 8px;
}

.merchant-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.merchant-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.merchant-icon {
  font-size: 24px;
}

.merchant-info {
  flex: 1;
  min-width: 0;
}

.merchant-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.merchant-name {
  font-size: 14px;
  font-weight: 600;
}

.merchant-tag {
  font-size: 10px;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 8px;
}

.merchant-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.merchant-meta {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.merchant-discount-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--danger), var(--warning));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.discount-text {
  font-size: 12px;
  font-weight: 700;
}

/* ============ 定制页 ============ */
.custom-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 28px 24px;
  text-align: center;
  border-radius: 0 0 24px 24px;
}

.custom-header-bg h2 {
  margin: 0;
  font-size: 22px;
}

.custom-header-bg p {
  margin: 6px 0 0;
  opacity: 0.8;
  font-size: 13px;
}

/* 步骤指示器 */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-item.active .step-number {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}

.step-label {
  font-size: 11px;
  color: var(--text-muted);
}

.step-item.active .step-label {
  color: var(--primary);
}

.step-line {
  width: 36px;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.step-line.active {
  background: var(--primary);
}

/* 训练类型 */
.training-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.training-type-item {
  text-align: center;
  padding: 16px 12px;
  background: #f8f9fa;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.training-type-item:hover,
.training-type-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.type-icon {
  font-size: 32px;
  display: block;
}

.type-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-top: 6px;
}

.type-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

/* 强度选择 */
.intensity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intensity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f8f9fa;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  transition: var(--transition);
}

.intensity-item:hover {
  box-shadow: var(--shadow);
}

.intensity-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.intensity-info {
  flex: 1;
}

.intensity-name {
  font-size: 15px;
  font-weight: 600;
  display: block;
}

.intensity-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* 确认信息 */
.confirm-info {
  padding: 16px;
  background: #e8f5e9;
  border-radius: var(--radius);
  text-align: center;
  color: var(--success);
  font-size: 14px;
}

/* 训练方案 */
.plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: var(--radius);
}

.plan-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.plan-info {
  flex: 1;
}

.plan-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
}

.plan-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.plan-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  background: #e3f2fd;
  border-radius: var(--radius);
}

/* ============ 饮品预约 ============ */
.drink-header {
  background: linear-gradient(135deg, #ff9800, #f44336);
  color: white;
  padding: 24px;
  text-align: center;
  border-radius: 0 0 24px 24px;
}

.drink-header-bg h2 {
  margin: 0;
  font-size: 22px;
}

.drink-header-bg p {
  margin: 6px 0 0;
  opacity: 0.8;
  font-size: 13px;
}

/*/* 咖啡网格 */
.coffee-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.coffee-item {
  text-align: center;
}

/* ============================================
   管理后台样式
   ============================================ */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 60px);
  background: #f0f2f5;
  position: relative;
}

/* === 移动端顶部栏 === */
.admin-mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, #4169e1, #764ba2);
  color: #fff;
  height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-mobile-title {
  font-size: 16px;
  font-weight: 600;
}

.admin-icon-btn {
  background: rgba(255,255,255,0.15);
  border: 0;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
}

/* === 侧边栏(默认向右展开,可向左收起) === */
.admin-layout {
  display: flex;
  flex-direction: row-reverse; /* 侧边栏在右侧,主内容在左侧 */
  position: relative;
  overflow-x: hidden;
}

.admin-sidebar {
  width: 220px;
  background: #001529;
  background: linear-gradient(180deg, #1f2d3d 0%, #1a2532 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s;
  flex-shrink: 0;
  z-index: 40;
  overflow: hidden;
  will-change: width, transform;
}

/* 移动端:固定在右侧的抽屉(默认展开) */
body.is-mobile .admin-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  height: 100vh;
  height: 100dvh;
  z-index: 200;
  width: 280px;
  max-width: 85vw;
  /* 默认展开:translateX(0),收起时向右滑出 */
  transform: translateX(0);
  box-shadow: -8px 0 24px rgba(0,0,0,0.2);
}

/* 移动端收起:向右滑出隐藏 */
body.is-mobile .admin-layout.sidebar-closed .admin-sidebar {
  transform: translateX(100%);
}

/* 移动端展开:已在原位 */
body.is-mobile .admin-layout.sidebar-open .admin-sidebar {
  transform: translateX(0);
}

/* 桌面端收起:宽度为 0 + 向左滑出(完全隐藏) */
body.is-desktop .admin-layout.sidebar-closed .admin-sidebar {
  width: 0 !important;
  min-width: 0;
  padding: 0;
  opacity: 0;
  transform: translateX(0); /* 收起时仅宽度变化 */
  pointer-events: none;
}

body.is-desktop .admin-layout.sidebar-open .admin-sidebar {
  width: 220px;
  opacity: 1;
  pointer-events: auto;
}

.admin-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.admin-brand-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.admin-brand-text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.admin-brand-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-brand-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.admin-collapse-btn {
  background: rgba(255,255,255,0.08);
  border: 0;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

body.is-mobile .admin-collapse-btn {
  display: none;
}

.admin-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.admin-menu::-webkit-scrollbar {
  width: 6px;
}

.admin-menu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.admin-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.35);
}

.admin-menu::-webkit-scrollbar-track {
  background: transparent;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border-right: 3px solid transparent;
  white-space: nowrap;
}

.admin-menu-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.admin-menu-item.active {
  background: linear-gradient(270deg, rgba(65,105,225,0.25), transparent);
  color: #fff;
  border-right-color: #4169e1;
  font-weight: 600;
}

.admin-menu-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.admin-sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.admin-logout-btn {
  width: 100%;
  background: rgba(244,67,54,0.15);
  color: #ff7875;
  border: 0;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.admin-logout-btn:hover {
  background: rgba(244,67,54,0.25);
}

.admin-sidebar-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 199;
}

body.is-mobile .admin-layout.sidebar-open .admin-sidebar-mask {
  display: block;
}

/* === 主内容区 === */
.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}

.admin-content {
  padding: 18px 22px 60px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

body.is-mobile .admin-content {
  padding: 12px;
  padding-bottom: 80px;
}

.admin-page-header {
  margin-bottom: 18px;
}

.admin-page-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
}

.admin-page-desc {
  margin: 4px 0 0;
  color: #888;
  font-size: 13px;
}

.admin-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 16px 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-section-title::before {
  content: '';
  width: 4px;
  height: 14px;
  background: #4169e1;
  border-radius: 2px;
}

/* === Tabs === */
.admin-tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab {
  flex-shrink: 0;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.admin-tab:hover {
  color: #4169e1;
  background: #f0f4ff;
}

.admin-tab.active {
  background: #4169e1;
  color: #fff;
  font-weight: 600;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
  animation: fadeIn 0.25s;
}

/* === 11 设置卡片 === */
.admin-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.admin-set-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
}

.admin-set-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(65,105,225,0.12);
  border-color: #4169e1;
}

.admin-set-card-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #4169e1, #764ba2);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.admin-set-card-body {
  flex: 1;
  min-width: 0;
}

.admin-set-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 2px;
}

.admin-set-card-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-set-card-arrow {
  color: #ccc;
  font-size: 24px;
  font-weight: 300;
  flex-shrink: 0;
}

/* === Toolbar === */
.admin-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  background: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  flex-wrap: wrap;
}

.admin-toolbar .admin-input {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
}

.admin-toolbar h3 {
  flex: 1;
  margin: 0;
}

.admin-toolbar .admin-btn {
  flex-shrink: 0;
}

/* === Buttons === */
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1.4;
}

.admin-btn-xs {
  padding: 3px 8px;
  font-size: 12px;
}

.admin-btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.admin-btn-primary {
  background: #4169e1;
  color: #fff;
  border-color: #4169e1;
}

.admin-btn-primary:hover {
  background: #3158d4;
  border-color: #3158d4;
}

.admin-btn-default {
  background: #fff;
  color: #555;
  border-color: #d9d9d9;
}

.admin-btn-default:hover {
  color: #4169e1;
  border-color: #4169e1;
}

.admin-btn-danger {
  background: #f44336;
  color: #fff;
  border-color: #f44336;
}

.admin-btn-danger:hover {
  background: #d32f2f;
}

.admin-btn-warning {
  background: #ff9800;
  color: #fff;
  border-color: #ff9800;
}

.admin-btn-warning:hover {
  background: #f57c00;
}

/* === Inputs === */
.admin-input,
.admin-textarea,
.admin-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
  color: #333;
}

.admin-input:focus,
.admin-textarea:focus,
.admin-select:focus {
  border-color: #4169e1;
  box-shadow: 0 0 0 2px rgba(65,105,225,0.12);
}

.admin-textarea {
  resize: vertical;
  min-height: 60px;
}

/* === Table === */
.admin-table-wrap {
  background: #fff;
  border-radius: 10px;
  overflow: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}

.admin-table th {
  background: #fafafa;
  font-weight: 600;
  color: #555;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-table tbody tr:hover {
  background: #f8faff;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-empty {
  text-align: center;
  color: #999;
  padding: 40px 0 !important;
  font-size: 13px;
}

/* === Badges === */
.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #666;
}

.admin-badge-blue {
  background: #e8ecff;
  color: #4169e1;
}

.admin-badge-green {
  background: #e8f5e9;
  color: #4caf50;
}

.admin-badge-red {
  background: #ffebee;
  color: #f44336;
}

.admin-badge-gray {
  background: #f0f0f0;
  color: #999;
}

/* === Form === */
.admin-form-row {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-form-row > label {
  flex-shrink: 0;
  width: 96px;
  font-size: 13px;
  color: #555;
  padding-top: 7px;
}

.admin-form-row > .admin-input,
.admin-form-row > .admin-textarea,
.admin-form-row > .admin-select,
.admin-form-row > .admin-checkbox-group,
.admin-form-row > .admin-switch,
.admin-form-row > .admin-qr-list {
  flex: 1;
  min-width: 0;
}

.admin-form-row > input[type="file"].admin-input {
  padding: 5px;
}

.admin-form-tip {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
  flex-basis: 100%;
  padding-left: 108px;
}

/* === Switch === */
.admin-switch {
  display: inline-block;
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 3px;
}

.admin-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-switch span {
  position: absolute;
  inset: 0;
  background: #d9d9d9;
  border-radius: 22px;
  cursor: pointer;
  transition: 0.2s;
}

.admin-switch span::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.admin-switch input:checked + span {
  background: #4169e1;
}

.admin-switch input:checked + span::before {
  transform: translateX(18px);
}

/* === Checkbox group === */
.admin-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding-top: 4px;
}

.admin-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}

.admin-checkbox input {
  cursor: pointer;
}

/* === QR items === */
.admin-qr-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-qr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #f0f0f0;
}

.admin-qr-preview {
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.admin-qr-info {
  flex: 1;
  min-width: 0;
}

.admin-qr-name {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.admin-qr-tip {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

/* === Permission grid === */
.admin-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-perm-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #fafafa;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
}

.admin-perm-icon {
  font-size: 16px;
}

/* === Modal === */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.admin-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.admin-modal-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 48px rgba(0,0,0,0.2);
  animation: adminModalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes adminModalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
}

.admin-modal-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
}

.admin-modal-close {
  background: none;
  border: 0;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  line-height: 1;
}

.admin-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.admin-modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid #f0f0f0;
}

/* === Toast === */
.admin-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(0,0,0,0.78);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 99999;
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
  max-width: 80vw;
  text-align: center;
}

.admin-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.admin-toast-success { background: rgba(76,175,80,0.92); }
.admin-toast-error { background: rgba(244,67,54,0.92); }
.admin-toast-info { background: rgba(0,0,0,0.78); }

/* === 移动端适配(手机预览界面字体 +30%、容器放大、侧边栏默认展开) === */
@media (max-width: 767px) {
  /* 全局字体 +30%(基准 16px → 20.8px) */
  body.is-mobile {
    font-size: 20.8px;
  }
  body.is-mobile .admin-content {
    font-size: 20.8px;
  }
  body.is-mobile .admin-card,
  body.is-mobile .admin-set-card,
  body.is-mobile .admin-toolbar,
  body.is-mobile .admin-perm-grid,
  body.is-mobile .admin-table-wrap,
  body.is-mobile .admin-modal-box,
  body.is-mobile .admin-modal-body,
  body.is-mobile .admin-modal-footer,
  body.is-mobile .admin-modal-header,
  body.is-mobile .admin-form-row,
  body.is-mobile .admin-input,
  body.is-mobile .admin-textarea,
  body.is-mobile .admin-btn,
  body.is-mobile .admin-tab,
  body.is-mobile .admin-section-title,
  body.is-mobile .admin-page-header,
  body.is-mobile .admin-page-desc {
    font-size: inherit;
  }

  /* 顶部栏高度放大(48 → 88) */
  .admin-mobile-topbar {
    display: flex;
    height: 88px;
    padding: 0 16px;
  }
  .admin-mobile-title {
    font-size: 26px;
  }
  /* 顶部按钮放大(36 → 64) */
  .admin-icon-btn {
    width: 64px;
    height: 64px;
    font-size: 32px;
    border-radius: 14px;
  }

  /* 布局改为列向(主内容在下) */
  .admin-layout {
    flex-direction: column;
  }

  /* 主内容区预留顶部栏高度 + 侧边栏宽度(默认展开) */
  .admin-main {
    padding-top: 8px;
    padding-right: 65vw; /* 默认侧边栏占位(与 sidebar 宽度对应) */
  }
  .admin-layout.sidebar-closed .admin-main {
    padding-right: 0; /* 收起时主内容占满 */
  }
  .admin-content {
    padding: 16px;
  }

  /* === 侧边栏(移动端 - 默认展开,容器放大一倍) === */
  .admin-sidebar {
    width: 65vw !important;
    max-width: 320px;
    min-width: 240px;
  }
  .admin-sidebar-header {
    padding: 28px 22px;
  }
  .admin-brand-icon {
    font-size: 56px;
  }
  .admin-brand-title {
    font-size: 28px;
  }
  .admin-brand-sub {
    font-size: 20px;
    margin-top: 4px;
  }
  .admin-collapse-btn {
    width: 56px;
    height: 56px;
    font-size: 32px;
  }

  /* 菜单项(放大一倍,适合大拇指) */
  .admin-menu {
    padding: 16px 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .admin-menu-item {
    padding: 24px 28px;
    font-size: 26px;
    gap: 18px;
    min-height: 88px;
  }
  .admin-menu-icon {
    font-size: 36px;
    width: 44px;
  }
  .admin-menu-label {
    font-size: 26px;
  }

  /* 底部退出按钮 */
  .admin-sidebar-footer {
    padding: 20px;
  }
  .admin-logout-btn {
    font-size: 22px;
    padding: 18px 16px;
    border-radius: 12px;
  }

  /* === 主内容区(以下模块统一放大 30%) === */
  .admin-page-header {
    margin-bottom: 24px;
  }
  .admin-page-header h2 {
    font-size: 30px;
  }
  .admin-page-desc {
    font-size: 20px;
    margin-top: 6px;
  }
  .admin-section-title {
    font-size: 24px;
    margin: 20px 0 14px;
  }
  .admin-section-title::before {
    width: 6px;
    height: 18px;
  }

  /* 设置卡片 - 放大 */
  .admin-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .admin-set-card {
    padding: 20px 22px;
    gap: 16px;
    border-radius: 14px;
  }
  .admin-set-card-icon {
    width: 72px;
    height: 72px;
    font-size: 36px;
    border-radius: 14px;
  }
  .admin-set-card-title {
    font-size: 22px;
    margin-bottom: 4px;
  }
  .admin-set-card-desc {
    font-size: 18px;
    line-height: 1.55;
    -webkit-line-clamp: 3;
  }
  .admin-set-card-arrow {
    font-size: 32px;
  }

  /* 工具栏 */
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    gap: 10px;
    border-radius: 14px;
  }
  .admin-toolbar .admin-input,
  .admin-toolbar .admin-btn {
    max-width: 100%;
    width: 100%;
    font-size: 22px;
    padding: 14px 18px;
    height: 56px;
  }
  .admin-toolbar h3 {
    font-size: 24px;
  }

  /* Tabs(放大) */
  .admin-tabs {
    padding: 6px;
    border-radius: 14px;
  }
  .admin-tab {
    padding: 14px 20px;
    font-size: 20px;
    min-height: 50px;
  }

  /* 表格(放大) */
  .admin-table {
    font-size: 18px;
    min-width: 720px;
  }
  .admin-table th,
  .admin-table td {
    padding: 16px 18px;
  }
  .admin-table th {
    font-size: 18px;
  }

  /* 按钮统一放大(拇指友好) */
  .admin-btn {
    padding: 14px 22px;
    font-size: 20px;
    border-radius: 10px;
  }
  .admin-btn-xs {
    padding: 8px 14px;
    font-size: 18px;
  }
  .admin-btn-sm {
    padding: 10px 16px;
    font-size: 18px;
  }

  /* 表单 */
  .admin-form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 18px;
  }
  .admin-form-row > label {
    width: auto;
    padding-top: 0;
    font-size: 20px;
    color: #333;
    font-weight: 500;
  }
  .admin-form-tip {
    padding-left: 0;
    font-size: 16px;
  }
  .admin-input,
  .admin-textarea,
  .admin-select {
    padding: 14px 16px;
    font-size: 20px;
    border-radius: 10px;
    min-height: 50px;
  }
  .admin-textarea {
    min-height: 100px;
  }

  /* 开关 */
  .admin-switch {
    width: 60px;
    height: 32px;
    margin-top: 6px;
  }
  .admin-switch span::before {
    width: 26px;
    height: 26px;
  }
  .admin-switch input:checked + span::before {
    transform: translateX(28px);
  }

  /* 复选框 */
  .admin-checkbox-group {
    gap: 14px 18px;
  }
  .admin-checkbox {
    font-size: 20px;
    gap: 6px;
  }
  .admin-checkbox input {
    width: 22px;
    height: 22px;
  }

  /* 二维码列表 */
  .admin-qr-item {
    padding: 14px 16px;
    gap: 14px;
    border-radius: 10px;
  }
  .admin-qr-preview {
    width: 64px;
    height: 64px;
    font-size: 32px;
  }
  .admin-qr-name {
    font-size: 20px;
  }
  .admin-qr-tip {
    font-size: 16px;
  }

  /* 权限网格 */
  .admin-perm-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 14px;
    gap: 10px;
    border-radius: 14px;
  }
  .admin-perm-item {
    font-size: 18px;
    padding: 14px 12px;
    gap: 8px;
    min-height: 50px;
  }
  .admin-perm-icon {
    font-size: 24px;
  }

  /* 模态框 */
  .admin-modal {
    padding: 8px;
    align-items: flex-end;
  }
  .admin-modal-box {
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
  }
  .admin-modal-header {
    padding: 20px 22px;
  }
  .admin-modal-header h3 {
    font-size: 22px;
  }
  .admin-modal-close {
    width: 40px;
    height: 40px;
    font-size: 30px;
  }
  .admin-modal-body {
    padding: 22px;
  }
  .admin-modal-footer {
    padding: 16px 22px;
    gap: 12px;
  }
  .admin-modal-footer .admin-btn {
    flex: 1;
    min-height: 52px;
  }

  /* Badge */
  .admin-badge {
    padding: 4px 10px;
    font-size: 16px;
    border-radius: 6px;
  }

  /* 空状态 */
  .admin-empty {
    padding: 60px 0 !important;
    font-size: 18px;
  }

  /* Toast */
  .admin-toast {
    font-size: 18px;
    padding: 14px 24px;
  }
}

/* 小屏手机 (iPhone SE 等,375px 以下) */
@media (max-width: 375px) {
  body.is-mobile {
    font-size: 18px;
  }
  .admin-content {
    padding: 12px;
  }
  .admin-card,
  .admin-set-card,
  .admin-toolbar,
  .admin-perm-grid {
    border-radius: 10px;
  }
  .admin-tab {
    padding: 10px 14px;
    font-size: 16px;
    min-height: 42px;
  }
  .admin-page-header h2 {
    font-size: 24px;
  }
  .admin-page-desc {
    font-size: 16px;
  }
  .admin-section-title {
    font-size: 20px;
  }
  .admin-perm-grid {
    grid-template-columns: 1fr;
  }
  .admin-table th,
  .admin-table td {
    padding: 10px 12px;
    font-size: 16px;
  }
  .admin-set-card {
    padding: 14px 16px;
  }
  .admin-set-card-icon {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }
  .admin-set-card-title {
    font-size: 18px;
  }
  .admin-set-card-desc {
    font-size: 14px;
  }
  .admin-menu-item {
    padding: 16px 18px;
    font-size: 20px;
    min-height: 68px;
  }
  .admin-menu-icon {
    font-size: 28px;
  }
  .admin-menu-label {
    font-size: 20px;
  }
  .admin-mobile-topbar {
    height: 70px;
  }
  .admin-icon-btn {
    width: 52px;
    height: 52px;
    font-size: 26px;
  }
}

/* 极小屏 (320px,iPhone 5 等) */
@media (max-width: 320px) {
  body.is-mobile {
    font-size: 16px;
  }
  .admin-content {
    padding: 8px;
  }
  .admin-set-card {
    padding: 12px;
    gap: 12px;
  }
  .admin-set-card-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  .admin-set-card-title {
    font-size: 16px;
  }
  .admin-set-card-desc {
    font-size: 13px;
  }
  .admin-modal-box {
    border-radius: 14px 14px 0 0;
  }
  .admin-mobile-topbar {
    height: 60px;
    padding: 0 8px;
  }
  .admin-icon-btn {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .admin-menu-item {
    padding: 14px 14px;
    font-size: 18px;
    min-height: 60px;
  }
}

/* 横屏手机/小平板 */
@media (min-width: 568px) and (max-width: 767px) and (orientation: landscape) {
  .admin-mobile-topbar {
    height: 64px;
    padding: 0 14px;
  }
  .admin-icon-btn {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  .admin-mobile-title {
    font-size: 20px;
  }
  .admin-content {
    padding: 12px 18px;
  }
}

/* 隐藏桌面端 Header(在管理后台页面时) */
body:has(.page-admin) .desktop-header,
body.page-admin-active .desktop-header {
  display: none !important;
}
body:has(.page-admin).is-mobile .main-content,
body.page-admin-active.is-mobile .main-content {
  padding-top: 0;
  padding-bottom: 0;
}

.coffee-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.coffee-item:hover {
  box-shadow: var(--shadow);
}

.coffee-image-box {
  width: 100%;
  aspect-ratio: 1;
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coffee-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coffee-fallback {
  font-size: 36px;
}

.coffee-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
}

.coffee-specs {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin: 6px 0;
  flex-wrap: wrap;
}

.spec-tag {
  font-size: 10px;
  padding: 2px 6px;
  background: #e3f2fd;
  color: var(--primary);
  border-radius: 6px;
}

.coffee-price-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.coffee-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
}

.coffee-btn {
  font-size: 11px;
  color: var(--primary);
  padding: 2px 8px;
  background: var(--primary-light);
  border-radius: 8px;
}

/* 瓶装饮料网格 */
.bottle-drink-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bottle-drink-item {
  text-align: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.bottle-drink-item:hover {
  box-shadow: var(--shadow);
}

.bottle-drink-image {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottle-drink-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bottle-fallback {
  font-size: 28px;
}

.bottle-drink-name {
  font-size: 12px;
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottle-drink-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
  display: block;
  margin-top: 2px;
}

.bottle-drink-action {
  font-size: 10px;
  color: var(--primary);
  display: block;
  margin-top: 2px;
}

/* ============ 健身卡页 ============ */
.fitness-card-header {
  background: linear-gradient(135deg, #4169e1, #764ba2);
  color: white;
  padding: 28px 24px;
  text-align: center;
  border-radius: 0 0 24px 24px;
}

.fitness-card-header-bg h2 {
  margin: 0;
  font-size: 22px;
}

.fitness-card-header-bg p {
  margin: 6px 0 0;
  opacity: 0.8;
  font-size: 13px;
}

.fitness-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fitness-card-full {
  padding: 14px;
  background: #f8f9fa;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.fitness-card-full.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.card-full-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-full-name {
  font-size: 16px;
  font-weight: 600;
}

.card-full-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
}

.card-full-remark {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.card-full-price-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 8px;
}

.card-full-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--danger);
}

.card-full-unit {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============ 团购页 ============ */
.group-buy-header {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
  padding: 24px;
  text-align: center;
  border-radius: 0 0 24px 24px;
}

.group-buy-header-bg h2 {
  margin: 0;
  font-size: 22px;
}

.group-buy-header-bg p {
  margin: 6px 0 0;
  opacity: 0.8;
  font-size: 13px;
}

/* ============ 教练详情 ============ */
.coach-detail-header {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: white;
  padding: 32px 24px;
  text-align: center;
  border-radius: 0 0 24px 24px;
}

.coach-detail-bg {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.coach-detail-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  min-width: 80px;
  max-width: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.coach-tag-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
}

.coach-detail-bg h2 {
  margin: 0;
  font-size: 22px;
}

.coach-level-text {
  font-size: 13px;
  opacity: 0.8;
  margin: 4px 0 0;
}

.coach-detail-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

/* 标签列表 */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  font-size: 12px;
  padding: 6px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 16px;
}

/* 成就列表 */
.achievement-list {
  list-style: none;
  padding: 0;
}

.achievement-item {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  color: var(--text-secondary);
}

.achievement-item:last-child {
  border-bottom: none;
}

.achievement-item::before {
  content: '🏆 ';
}

/* 教练课程列表 */
.coach-course-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coach-course-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.coach-course-item:hover {
  background: var(--primary-light);
}

.course-info {
  flex: 1;
  min-width: 0;
}

.course-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
}

.course-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.course-price-box {
  text-align: right;
  flex-shrink: 0;
}

.course-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--danger);
  display: block;
}

.course-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.course-action {
  font-size: 12px;
  color: var(--primary);
  display: block;
  margin-top: 4px;
}

/* ============ 教练轮播 ============ */
.coach-swiper-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}
.coach-swiper-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.coach-swiper-slide {
  min-width: 100%;
  flex-shrink: 0;
  cursor: pointer;
}
.coach-slide-bg {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 140px;
  border-radius: 12px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.coach-slide-bg::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.coach-slide-avatar {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  z-index: 1;
}
.coach-slide-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.coach-slide-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1;
}
.coach-slide-name {
  font-size: 20px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.coach-slide-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  align-self: flex-start;
}
.coach-slide-level {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
}
.coach-slide-exp {
  font-size: 11px;
  opacity: 0.75;
}
/* 轮播指示器 */
.coach-swiper-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 4px;
}
.coach-swiper-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  transition: all 0.3s;
  cursor: pointer;
}
.coach-swiper-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

/* ============ 课程级别块 V2 ============ */
.course-level-list-v2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.course-level-block {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  transition: var(--transition);
}
.level-block-header {
  margin-bottom: 12px;
}
.level-block-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.level-block-name {
  font-size: 16px;
  font-weight: 700;
}
.level-block-desc {
  font-size: 12px;
  color: var(--text-muted);
}
.level-block-coaches {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.level-coach-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  cursor: pointer;
  transition: var(--transition);
}
.level-coach-mini:active {
  transform: scale(0.98);
  background: #f5f5ff;
}
.level-coach-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.level-coach-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.level-coach-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.level-coach-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}
.level-coach-title {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.level-coach-price {
  text-align: right;
  flex-shrink: 0;
}
.level-coach-price-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--danger);
  display: block;
}
.level-coach-price-meta {
  font-size: 10px;
  color: var(--text-muted);
}

/* ============ 教练详情-价格卡片 ============ */
.coach-price-hero {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 12px;
  color: #fff;
}
.coach-price-hero-label {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 4px;
}
.coach-price-hero-value {
  font-size: 36px;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.coach-price-hero-meta {
  font-size: 13px;
  opacity: 0.7;
  margin-top: 4px;
}

/* ============ 教练不可约状态 ============ */
.coach-unavailable {
  opacity: 0.55;
  pointer-events: none;
}

/* ============ 桌面端适配补充 ============ */
@media (min-width: 768px) {
  .training-type-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .coffee-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bottle-drink-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .gym-selector {
    gap: 12px;
  }
  .gym-tabs {
    gap: 12px;
  }
}

@media (min-width: 1200px) {
  .coffee-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .bottle-drink-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* === 深色模式支持 === */
@media (prefers-color-scheme: dark) {
  /* 保留亮色主题为主，可扩展暗色 */
}

/* ============================================
   AI定制训练页面样式 (Gym Page)
   ============================================ */

/* 页面容器 */
.ai-custom-page {
  min-height: 100vh;
  background: #f5f7fa;
  padding-bottom: 180px;
}

/* 版块一：顶部品牌价值主张区（浅色系，与首页协调） */
.hero-section {
  background: linear-gradient(135deg, #eaf2ff 0%, #f7faff 60%, #fff7ef 100%);
  padding: 56px 40px 48px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #e3ecf8;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(65, 105, 225, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -30%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(255, 183, 111, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  display: block;
  font-size: 42px;
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.hero-subtitle {
  display: block;
  font-size: 18px;
  color: #3e4c6b;
  margin-bottom: 30px;
  line-height: 1.6;
}

.feature-tags {
  white-space: nowrap;
  margin-bottom: 30px;
  overflow-x: auto;
}

.feature-tag {
  display: inline-block;
  background: #fff;
  color: #1e3a8a;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  margin-right: 12px;
  border: 1px solid #d9e2ef;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.04);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
}

.hero-buttons .btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #4169e1 0%, #5b8def 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 14px 0;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 14px rgba(65, 105, 225, 0.3);
  cursor: pointer;
  transition: all 0.3s;
}

.hero-buttons .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(65, 105, 225, 0.4);
}

.hero-buttons .btn-secondary {
  flex: 1;
  background: #fff;
  color: #1e3a8a;
  border: 2px solid #d9e2ef;
  border-radius: 30px;
  padding: 14px 0;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.hero-buttons .btn-secondary:hover {
  background: #eaf2ff;
  border-color: #c5d3ef;
}

.hero-desc {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-desc p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* 通用版块样式 */
.ai-custom-page .section {
  background: #fff;
  margin: 20px;
  border-radius: 16px;
  padding: 30px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.ai-custom-page .section-header {
  margin-bottom: 30px;
}

.ai-custom-page .section-title {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 10px;
  line-height: 1.4;
}

.ai-custom-page .section-subtitle {
  display: block;
  font-size: 14px;
  color: #7f8c8d;
  line-height: 1.6;
}

/* 版块二：流程时间轴 */
.process-timeline {
  display: flex;
  gap: 20px;
  padding: 15px 0;
  overflow-x: auto;
}

.process-step {
  min-width: 180px;
  position: relative;
  padding-right: 20px;
}

.process-step::after {
  content: '';
  position: absolute;
  top: 35px;
  right: 0;
  width: 20px;
  height: 2px;
  background: #e0e0e0;
}

.process-step:last-child::after {
  display: none;
}

.step-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.step-number {
  font-size: 14px;
  color: #667eea;
  font-weight: bold;
  margin-bottom: 8px;
}

.step-title {
  font-size: 16px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 8px;
  line-height: 1.4;
}

.step-desc {
  font-size: 13px;
  color: #7f8c8d;
  line-height: 1.6;
}

/* 版块三：体测卡片 */
.test-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.test-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 24px;
  border-left: 4px solid #667eea;
}

.test-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.test-card-title {
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
}

.test-card-count {
  background: #667eea;
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: bold;
}

.test-card-device,
.test-card-method,
.test-card-items,
.test-card-highlight {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.device-label,
.method-label,
.items-label,
.highlight-label {
  color: #7f8c8d;
  margin-right: 5px;
}

.device-name,
.method-name,
.items-content,
.highlight-content {
  color: #2c3e50;
}

.btn-full {
  width: 100%;
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 16px 0;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.btn-full:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 152, 0, 0.5);
}

/* 版块四：AI报告卡片 */
.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.report-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s;
}

.report-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.report-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.report-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  margin-right: 12px;
}

.report-title {
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
}

.report-content {
  margin-bottom: 18px;
}

.content-item {
  margin-bottom: 8px;
  padding-left: 16px;
  position: relative;
}

.content-item::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #667eea;
  font-size: 16px;
}

.content-text {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.report-value {
  background: #f8f9fa;
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.value-label {
  color: #667eea;
  font-weight: bold;
  margin-right: 5px;
}

.value-text {
  color: #2c3e50;
}

.report-note {
  background: #fff3e0;
  padding: 18px;
  border-radius: 8px;
  border-left: 4px solid #ff9800;
}

.report-note p {
  font-size: 14px;
  color: #e65100;
  line-height: 1.8;
  margin: 0;
}

/* 版块五：训练模块标签 */
.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.module-tab {
  flex: 1;
  min-width: calc(50% - 6px);
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  cursor: pointer;
}

.module-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: #fff;
}

.tab-name {
  font-size: 15px;
  font-weight: bold;
}

.tab-tag {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff5722;
  color: #fff;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
}

.module-content {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
}

.module-header {
  margin-bottom: 18px;
}

.module-name {
  display: block;
  font-size: 20px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 10px;
}

.module-tech,
.module-audience {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.6;
}

.tech-label,
.audience-label,
.features-label,
.services-label {
  color: #667eea;
  font-weight: bold;
  margin-right: 5px;
}

.tech-content,
.audience-content {
  color: #555;
}

.module-features,
.module-services {
  margin-bottom: 18px;
}

.feature-item,
.service-item {
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.feature-item::before,
.service-item::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #4caf50;
  font-weight: bold;
}

.feature-text,
.service-text {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* 版块六：训练计划卡片 */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.plan-card {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.plan-name {
  font-size: 20px;
  font-weight: bold;
  color: #2c3e50;
}

.plan-duration {
  background: #667eea;
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.plan-audience,
.plan-goal,
.plan-features {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.6;
}

.goal-label,
.features-label {
  color: #667eea;
  font-weight: bold;
  margin-right: 5px;
}

.audience-content,
.goal-content,
.features-content {
  color: #555;
}

.plan-notes {
  background: #e3f2fd;
  padding: 18px;
  border-radius: 8px;
}

.plan-notes p {
  font-size: 14px;
  color: #1565c0;
  line-height: 1.8;
  margin: 0;
}

/* 版块七：配套服务 */
.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.service-card {
  display: flex;
  align-items: flex-start;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
}

.service-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 16px;
  flex-shrink: 0;
}

.service-content {
  flex: 1;
}

.service-name {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 10px;
}

.service-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.service-features .feature-text {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

/* 版块八：会员权益 */
.membership-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.membership-card {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 24px 18px;
  text-align: center;
  transition: all 0.3s;
}

.membership-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.membership-header {
  margin-bottom: 18px;
}

.membership-name {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 8px;
}

.membership-price {
  font-size: 28px;
  font-weight: bold;
  color: #ff5722;
}

.price-unit {
  font-size: 13px;
  color: #7f8c8d;
  font-weight: normal;
}

.membership-features {
  margin-bottom: 18px;
  text-align: left;
}

.membership-features .feature-item {
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
}

.membership-features .feature-item::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #4caf50;
  font-size: 12px;
}

.membership-features .feature-text {
  font-size: 12px;
  color: #555;
}

.membership-btn {
  width: 100%;
  background: #667eea;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.membership-btn:hover {
  background: #5a6fd6;
}

.membership-buttons {
  display: flex;
  gap: 16px;
}

.membership-buttons .btn-primary,
.membership-buttons .btn-secondary {
  flex: 1;
}

/* 版块九：用户案例 */
.case-filter {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-item {
  padding: 8px 18px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  font-size: 14px;
  color: #555;
  transition: all 0.3s;
  cursor: pointer;
}

.filter-item.active {
  background: #667eea;
  border-color: #667eea;
  color: #fff;
}

.case-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.case-card {
  min-width: 320px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.case-images {
  position: relative;
  height: 180px;
  display: flex;
}

.case-before,
.case-after {
  width: 50%;
  height: 100%;
  object-fit: cover;
}

.case-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #667eea;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.case-info {
  padding: 18px;
}

.case-header {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.case-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.case-name {
  font-size: 16px;
  font-weight: bold;
  color: #2c3e50;
}

.case-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 14px;
  padding: 12px 0;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 12px;
  color: #7f8c8d;
}

.case-comment {
  background: #fff3e0;
  padding: 12px;
  border-radius: 8px;
}

.comment-text {
  font-size: 13px;
  color: #e65100;
  line-height: 1.6;
}

/* 版块十：常见问题 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s;
}

.faq-item:hover {
  background: #e9ecef;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  cursor: pointer;
}

.question-text {
  flex: 1;
  font-size: 15px;
  font-weight: bold;
  color: #2c3e50;
  line-height: 1.5;
}

.faq-icon {
  font-size: 14px;
  color: #667eea;
  transition: transform 0.3s;
  margin-left: 10px;
}

.faq-icon.expanded {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 24px 18px;
  border-top: 1px solid #e9ecef;
}

.answer-text {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  padding-top: 14px;
}

/* 版块十一：底部行动区 */
.bottom-action {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
  padding: 18px 24px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.3s;
}

.bottom-action.visible {
  opacity: 1;
  transform: translateY(0);
}

.bottom-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bottom-text {
  text-align: center;
}

.text-main {
  display: block;
  font-size: 15px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 4px;
}

.text-sub {
  display: block;
  font-size: 13px;
  color: #7f8c8d;
}

.bottom-buttons {
  display: flex;
  gap: 16px;
}

.btn-outline {
  flex: 1;
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
  border-radius: 30px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-outline:hover {
  background: #667eea;
  color: #fff;
}

.bottom-buttons .btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.bottom-buttons .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 152, 0, 0.5);
}

/* 预约表单弹窗 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  width: 90%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.modal-title {
  font-size: 18px;
  font-weight: bold;
}

.modal-close {
  font-size: 28px;
  line-height: 1;
  padding: 0 8px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

.form-item {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  color: #2c3e50;
  font-weight: bold;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  color: #2c3e50;
  box-sizing: border-box;
  transition: all 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  background: #fff;
}

.modal-footer {
  padding: 0 24px 24px;
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 14px 0;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 152, 0, 0.5);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .ai-custom-page .section {
    margin: 12px;
    padding: 20px 16px;
  }
  
  .ai-custom-page .section-title {
    font-size: 20px;
  }
  
  .test-cards,
  .report-cards,
  .plan-cards,
  .service-cards {
    grid-template-columns: 1fr;
  }
  
  .membership-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .module-tab {
    min-width: calc(50% - 6px);
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
  }
  
  .membership-cards {
    grid-template-columns: 1fr;
  }
  
  .bottom-buttons {
    flex-direction: column;
  }
  
  .bottom-buttons .btn-outline,
  .bottom-buttons .btn-primary {
    width: 100%;
  }
}

/* ============================================
   首页V2优化版样式
   ============================================ */

/* --- 全局Section容器 --- */
.page-home-v2 .section {
  padding: 0 12px;
  margin-bottom: 14px;
}
.page-home-v2 .section-card {
  background: var(--white);
  margin: 0 12px 14px;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* --- Section标题栏 --- */
.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-title-bar .section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.3px;
}
.section-title-bar .section-more {
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.section-title-bar .section-more:hover {
  color: var(--primary);
}
.title-with-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- 核心业务入口区 (4图标) --- */
.core-entries {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--white);
  margin: 0 12px 14px;
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  box-shadow: var(--shadow);
}
.core-entry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.core-entry-item:active {
  background: var(--bg);
  transform: scale(0.95);
}
.core-entry-icon {
  font-size: 32px;
  line-height: 1;
}
.core-entry-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.core-entry-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- 健身卡V2 --- */
.fitness-cards-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.fc-v2-item {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px;
  aspect-ratio: 1.58;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 
    0 10px 20px rgba(0, 0, 0, 0.3),
    0 5px 10px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: perspective(500px) rotateX(5deg) rotateY(-5deg);
}
.fc-v2-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.15) 100%),
    repeating-linear-gradient(45deg, transparent, transparent 1px, rgba(255,255,255,0.03) 1px, rgba(255,255,255,0.03) 2px);
  pointer-events: none;
}
.fc-v2-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  animation: cardShine 4s ease-in-out infinite;
}
@keyframes cardShine {
  0% { left: -100%; }
  50%, 100% { left: 200%; }
}
.fc-v2-item:active {
  transform: perspective(500px) rotateX(0deg) rotateY(0deg) translateY(-6px) scale(1.05);
  box-shadow: 
    0 15px 30px rgba(0, 0, 0, 0.35),
    0 8px 15px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.fc-v2-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  z-index: 1;
}
.fc-v2-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  line-height: 1.4;
}
.tag-hot { background: #f44336; }
.tag-rec { background: #ff9800; }
.tag-best { background: #e91e63; }
.tag-stu { background: #9c27b0; }
.tag-try { background: #607d8b; }
.tag-flex { background: #00bcd4; }
.tag-default { background: #999; }

.fc-v2-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  letter-spacing: 1px;
  z-index: 1;
  font-style: italic;
  text-transform: uppercase;
}
.fc-v2-dur {
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  z-index: 1;
}
.fc-v2-price-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  z-index: 1;
}
.fc-v2-symbol {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.fc-v2-price {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  font-style: italic;
  line-height: 1;
}
.fc-v2-remark {
  display: none;
}
.fc-v2-btn {
  display: none;
}

/* --- 教练滚动V2 --- */
.coach-scroll-v2 {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.coach-scroll-v2::-webkit-scrollbar { display: none; }

.coach-card-v2 {
  min-width: 280px;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
}
.coach-card-v2:active {
  border-color: var(--primary);
  transform: scale(0.98);
}
.coach-avatar-v2 {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8ecff, #d0d8ff);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.coach-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.coach-avatar-placeholder {
  font-size: 28px;
}
.coach-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.coach-dot.online { background: var(--success); }

.coach-body-v2 {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.coach-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.coach-name-v2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}
.coach-level-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}
.coach-course {
  font-size: 12px;
  color: var(--text-secondary);
}
.coach-exp {
  font-size: 12px;
  color: var(--text-muted);
}
.coach-pricing-v2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}
.coach-per-lesson {
  font-size: 18px;
  font-weight: 800;
  color: var(--danger);
}
.coach-monthly {
  font-size: 12px;
  color: var(--text-muted);
}
.coach-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.coach-stars { color: #ff9800; font-weight: 600; }
.coach-booked { color: var(--text-muted); }

.coach-book-btn {
  flex-shrink: 0;
  margin-top: 4px;
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  white-space: nowrap;
}
.coach-book-btn:active {
  background: var(--primary-dark);
  transform: scale(0.95);
}

/* --- 团购V2 --- */
.gb-v2-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
}
.gb-v2-item:last-child { margin-bottom: 0; }
.gb-v2-item:active {
  border-color: var(--primary);
  transform: scale(0.99);
}
.gb-v2-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gb-v2-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  align-self: flex-start;
}
.tag-student { background: #e91e63; }
.tag-regular { background: #ff9800; }

.gb-v2-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
}
.gb-v2-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gb-v2-bar {
  flex: 1;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}
.gb-v2-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff9800, #f44336);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.gb-v2-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.gb-v2-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: 16px;
  flex-shrink: 0;
}
.gb-v2-cur {
  font-size: 22px;
  font-weight: 800;
  color: var(--danger);
  line-height: 1;
}
.gb-v2-ori {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}
.gb-v2-btn {
  padding: 7px 20px;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #f44336;
  cursor: pointer;
  white-space: nowrap;
}
.gb-v2-btn:active {
  background: #d32f2f;
  transform: scale(0.96);
}

/* --- 倒计时徽章 --- */
.countdown-badge {
  display: inline-flex;
  align-items: center;
  background: #fff5f5;
  border: 1px solid #ffcdd2;
  border-radius: 12px;
  padding: 2px 10px;
}
.time-chip {
  font-size: 12px;
  font-weight: 700;
  color: #f44336;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* --- 团购核销入口 --- */
.verify-entry {
  display: flex;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.verify-split {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: var(--transition);
}
.verify-split:active {
  background: var(--bg);
}
.verify-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.verify-arrow {
  font-size: 14px;
  color: var(--text-muted);
}
.verify-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

/* --- 运动补给站 --- */
.supply-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.supply-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.supply-tab.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.supply-tab:active {
  transform: scale(0.96);
}
.supply-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.supply-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.supply-item:active {
  background: var(--bg);
  transform: scale(0.95);
}
.supply-img-box {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.supply-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.supply-fallback {
  font-size: 28px;
}
.supply-name {
  font-size: 12px;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.supply-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
}

/* --- 周边商家 --- */
.nearby-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.nearby-scroll::-webkit-scrollbar { display: none; }
.nearby-item {
  min-width: 90px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
}
.nearby-item:active {
  transform: scale(0.95);
}
.nearby-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.nearby-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.nearby-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- 底部留白 --- */
.bottom-spacer {
  height: 20px;
}

/* ============================================
   移动端适配 - 首页V2
   ============================================ */
@media (max-width: 767px) {
  .page-home-v2 .section-card {
    margin: 0 8px 12px;
    padding: 14px 12px;
    border-radius: 12px;
  }
  .core-entries {
    margin: 0 8px 12px;
    gap: 6px;
    padding: 14px 8px;
  }
  .core-entry-icon {
    font-size: 28px;
  }
  .core-entry-label {
    font-size: 12px;
  }
  .core-entry-desc {
    font-size: 10px;
  }

  /* 健身卡 - 移动端2列 */
  .fitness-cards-v2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .fc-v2-item {
    padding: 8px;
    aspect-ratio: 1.58;
  }
  .fc-v2-name {
    font-size: 11px;
  }
  .fc-v2-price {
    font-size: 17px;
  }
  .fc-v2-dur {
    font-size: 9px;
  }

  /* 教练卡片移动端适配 */
  .coach-card-v2 {
    min-width: 260px;
    padding: 14px;
  }

  /* 教练轮播移动端 */
  .coach-slide-bg {
    padding: 16px 14px;
    gap: 12px;
    min-height: 110px;
  }
  .coach-slide-avatar {
    width: 60px;
    height: 60px;
  }
  .coach-slide-name {
    font-size: 17px;
  }
  .coach-slide-level {
    font-size: 12px;
  }
  .coach-slide-exp {
    font-size: 10px;
  }

  /* 教练列表移动端 */
  .coach-card-full {
    padding: 12px;
  }
  .coach-card-avatar {
    width: 60px;
    height: 60px;
  }
  .coach-card-name {
    font-size: 15px;
  }
  .coach-card-level {
    font-size: 11px;
  }

  /* 课程级别块移动端 */
  .level-coach-mini {
    padding: 8px;
    gap: 8px;
  }
  .level-coach-name {
    font-size: 13px;
  }
  .level-coach-price-val {
    font-size: 14px;
  }

  /* 教练详情价格卡片移动端 */
  .coach-price-hero {
    padding: 16px;
  }
  .coach-price-hero-value {
    font-size: 28px;
  }

  /* 团购移动端 */
  .gb-v2-item {
    padding: 12px;
  }
  .gb-v2-cur {
    font-size: 20px;
  }

  /* 补给站移动端3列 */
  .supply-panel {
    grid-template-columns: repeat(3, 1fr);
  }
  .supply-hide-mobile {
    display: none;
  }
  .supply-img-box {
    width: 56px;
    height: 56px;
  }

  /* 周边 - 移动端 */
  .nearby-item {
    min-width: 80px;
    padding: 10px 6px;
  }
}

@media (min-width: 768px) {
  .page-home-v2 {
    max-width: 800px;
    margin: 0 auto;
  }
  .fitness-cards-v2 {
    grid-template-columns: repeat(3, 1fr);
  }
  .supply-panel {
    grid-template-columns: repeat(4, 1fr);
  }
  .supply-hide-mobile {
    display: flex;
  }
}

@media (min-width: 1200px) {
  .page-home-v2 {
    max-width: 960px;
  }
  .fitness-cards-v2 {
    grid-template-columns: repeat(3, 1fr);
  }
  .supply-panel {
    grid-template-columns: repeat(5, 1fr);
  }
}
