/*
  全站主题切换入口：所有页面继续只引用本文件。
  如需切换主题，只需要把下面这行 import 改成对应的主题覆盖文件。
  可选值示例：
  1. ./theme-default.css
  2. ./theme-blue.css
  3. ./theme-dark.css
  4. ./theme-light-green.css
*/

/* 主题基础 token：默认主题的全局设计变量 */
:root {
  /* 品牌与功能色：主色、价格色、状态色 */
  --theme-color-brand: #3d3d3d;
  --theme-color-brand-strong: #3d3d3d;
  --theme-color-price: #ef2f02;
  --theme-color-success: #2f7d56;
  --theme-color-warning: #b96b16;
  --theme-color-danger: #ef2f02;
  --theme-color-accent: #bf7d28;

  /* 文字色：正文、次级说明、占位、反白 */
  --theme-text-primary: #3d3d3d;
  --theme-text-regular: #4d4d4d;
  --theme-text-secondary: #8c8c8c;
  --theme-text-placeholder: #b0b0b0;
  --theme-text-inverse: #ffffff;
  --theme-text-title: var(--theme-text-primary);
  --theme-text-body: var(--theme-text-regular);
  --theme-text-description: var(--theme-text-regular);
  --theme-text-note: var(--theme-text-secondary);

  /* 边框色：标准边框、轻边框、弱分割线 */
  --theme-border-base: #d9d9d9;
  --theme-border-light: #e3e3e3;
  --theme-border-lighter: #ececec;

  /* 背景色：页面底、卡片底、浅面板、状态浅底 */
  --theme-bg-page: #f6f5f2;
  --theme-bg-surface: #ffffff;
  --theme-bg-surface-soft: #f7f7f7;
  --theme-bg-surface-elevated: #fafafa;
  --theme-bg-accent-soft: #f3ede1;
  --theme-bg-success-soft: #edf7f1;
  --theme-bg-warning-soft: #fff5eb;
  --theme-bg-danger-soft: #fff4f0;
  --theme-promo-card-bg: #f8f5ee;
  --theme-promo-card-text: #7a5b35;
  --theme-promo-card-border: rgba(191, 125, 40, 0.18);

  /* 圆角体系：小圆角到胶囊圆角 */
  --theme-radius-xs: 8px;
  --theme-radius-sm: 10px;
  --theme-radius-md: 14px;
  --theme-radius-lg: 16px;
  --theme-radius-xl: 24px;
  --theme-radius-pill: 999px;

  /* 阴影体系：普通卡片、强调卡片、首屏运营位 */
  --theme-shadow-card: 0 8px 18px rgba(0, 0, 0, 0.05);
  --theme-shadow-card-strong: 0 10px 24px rgba(17, 17, 17, 0.06);
  --theme-shadow-hero: 0 20px 44px rgba(0, 0, 0, 0.13);

  /* 间距体系：组件和模块的统一留白档位 */
  --theme-space-2xs: 8px;
  --theme-space-xs: 12px;
  --theme-space-sm: 16px;
  --theme-space-md: 20px;
  --theme-space-lg: 24px;
  --theme-space-xl: 32px;

  /* 控件高度：输入框、按钮、CTA 的统一高度档位 */
  --theme-control-height-sm: 30px;
  --theme-control-height-md: 34px;
  --theme-control-height-lg: 42px;
  --theme-control-height-xl: 44px;
  --theme-control-height-cta: 48px;

  /* 组件语义 token：输入框相关 */
  --theme-input-bg: var(--theme-bg-surface);
  --theme-input-border: #cfcfcf;
  --theme-input-border-hover: var(--theme-border-base);
  --theme-input-border-focus: var(--theme-color-brand);
  --theme-input-placeholder: var(--theme-text-placeholder);

  /* 组件语义 token：卡片相关 */
  --theme-card-bg: var(--theme-bg-surface);
  --theme-card-border: var(--theme-border-lighter);
  --theme-card-shadow: var(--theme-shadow-card);

  /* 组件语义 token：标签与 chip */
  --theme-chip-bg: #f3f3f3;
  --theme-chip-border: var(--theme-border-base);
  --theme-chip-text: #656565;

  /* 组件语义 token：选项卡与筛选激活态 */
  --theme-tab-bg: transparent;
  --theme-tab-active-bg: #ededed;
  --theme-tab-active-text: var(--theme-color-brand);

  /* 组件语义 token：分页 */
  --theme-pagination-bg: var(--theme-bg-surface);
  --theme-pagination-border: #e6e6e6;
  --theme-pagination-active-bg: #ededed;
  --theme-pagination-active-border: #ededed;
  --theme-pagination-active-text: var(--theme-color-brand);

  /* 组件语义 token：轮播点和轻导航点 */
  --theme-dot-bg: rgba(31, 31, 31, 0.22);
  --theme-dot-bg-active: rgba(31, 31, 31, 0.86);
  --theme-dot-bg-light: rgba(255, 255, 255, 0.35);
  --theme-dot-bg-light-active: #ffffff;

  /* 壳组件 token：顶部、底部、导航和底部导航 */
  --theme-shell-header-bg: rgba(255, 255, 255, 0.94);
  --theme-shell-header-border: rgba(232, 232, 232, 0.92);
  --theme-shell-nav-text: #2d2d2d;
  --theme-shell-nav-text-active: #3d3d3d;
  --theme-shell-nav-underline: #3d3d3d;
  --theme-shell-cart-icon: var(--theme-color-brand);
  --theme-shell-cart-text: var(--theme-text-regular);
  --theme-shell-footer-bg: transparent;
  --theme-shell-footer-text: #838383;
  --theme-shell-footer-border: #ececec;
  --theme-shell-mobile-header-bg: rgba(255, 255, 255, 0.96);
  --theme-shell-mobile-header-border: #f0f0f0;
  --theme-shell-mobile-status-text: #3d3d3d;
  --theme-shell-mobile-status-icon: #3d3d3d;
  --theme-shell-search-icon: #3d3d3d;
  --theme-shell-mobile-more-hover: #f6f5f2;
  --theme-shell-bottom-nav-bg: rgba(255, 255, 255, 0.98);
  --theme-shell-bottom-nav-text: #6d6d6d;
  --theme-shell-bottom-nav-text-active: #3d3d3d;
  --theme-shell-bottom-nav-icon-filter: none;
  --theme-shell-bottom-nav-icon-filter-active: none;

  /* 首页公告卡：背景、边框、正文和标签 */
  --theme-announce-bg: linear-gradient(90deg, #fff9ef 0%, #fff4e3 100%);
  --theme-announce-border: #eee6d9;
  --theme-announce-text: #66451a;
  --theme-announce-label-bg: rgba(191, 125, 40, 0.12);
  --theme-announce-label-text: #66451a;

  /* 课程详情购买卡：订阅标签和个人开团按钮 */
  --theme-detail-purchase-label-bg: #3d3d3d;
  --theme-detail-purchase-label-text: #ffffff;
  --theme-detail-secondary-btn-bg: var(--theme-btn-bg-soft);
  --theme-detail-secondary-btn-border: #3d3d3d;
  --theme-detail-secondary-btn-text: #3d3d3d;
  --theme-detail-secondary-btn-hover-bg: var(--theme-btn-bg-soft-hover);

  /* 组件语义 token：多选框 */
  --theme-checkbox-size: 16px;
  --theme-checkbox-radius: 4px;
  --theme-checkbox-border: #c8c8c8;
  --theme-checkbox-bg: #ffffff;
  --theme-checkbox-checked-bg: var(--theme-color-brand);
  --theme-checkbox-checked-border: var(--theme-color-brand);
  --theme-checkbox-check-color: #ffffff;
  --theme-checkbox-focus-ring: rgba(31, 31, 31, 0.16);

  /* 个人中心数据列表轻操作：查看、修改、删除等文字按钮 */
  --theme-account-list-action-color: #555555;
  --theme-account-list-action-hover: var(--theme-color-brand);
  --theme-account-list-action-size: 13px;
  --theme-account-list-action-weight: 600;
  --theme-account-list-action-height: 28px;

  /* 个人中心：侧栏导航、实名提示条、页内二级切换 */
  --theme-account-sidebar-item-bg: #f6f6f6;
  --theme-account-sidebar-item-border: transparent;
  --theme-account-sidebar-item-active-bg: var(--theme-btn-bg-primary-hover);
  --theme-account-sidebar-item-active-border: transparent;
  --theme-account-sidebar-item-active-text: var(--theme-text-inverse);
  --theme-account-sidebar-item-text: #3d3d3d;
  --theme-account-auth-notice-bg: #fff5eb;
  --theme-account-auth-notice-border: #f4dcbf;
  --theme-account-auth-notice-text: #b96b16;
  --theme-account-subnav-bg: #ffffff;
  --theme-account-subnav-border: #ece9e2;
  --theme-account-subnav-text: #6a6a6a;
  --theme-account-subnav-active-bg: #ededed;
  --theme-account-subnav-active-text: #3d3d3d;
  --theme-pill-tab-shell-bg: var(--theme-account-subnav-bg);
  --theme-pill-tab-shell-border: var(--theme-account-subnav-border);
  --theme-pill-tab-text: var(--theme-account-subnav-text);
  --theme-pill-tab-active-bg: var(--theme-account-subnav-active-bg);
  --theme-pill-tab-active-text: var(--theme-account-subnav-active-text);
  --theme-pill-tab-shell-padding: 4px;
  --theme-pill-tab-button-height: 34px;
  --theme-filter-chip-bg: transparent;
  --theme-filter-chip-border: transparent;
  --theme-filter-chip-text: var(--theme-color-brand);
  --theme-filter-chip-hover-bg: var(--theme-chip-bg);
  --theme-filter-chip-hover-text: var(--theme-color-brand);
  --theme-filter-chip-active-bg: var(--theme-color-brand);
  --theme-filter-chip-active-border: var(--theme-color-brand);
  --theme-filter-chip-active-text: var(--theme-text-inverse);
  --theme-account-message-unread-bg: #fff5eb;
  --theme-account-message-unread-text: #b96b16;
  --theme-account-message-read-bg: #f2f2f2;
  --theme-account-message-read-text: #6f6f6f;

  /* 购物车：列表标题、结算数量和金额语义 */
  --theme-cart-panel-title: var(--theme-text-title);
  --theme-cart-summary-quantity: var(--theme-text-body);
  --theme-cart-summary-amount: var(--theme-color-price);

  /* 弹出层按钮：个人中心等弹层中的主次操作 */
  --theme-modal-secondary-bg: var(--theme-btn-bg-light);
  --theme-modal-secondary-border: var(--theme-color-brand);
  --theme-modal-secondary-text: var(--theme-color-brand);
  --theme-modal-secondary-hover-bg: var(--theme-btn-bg-soft);
  --theme-modal-primary-bg: var(--theme-btn-bg-primary);
  --theme-modal-primary-text: var(--theme-text-inverse);
  --theme-modal-primary-hover-bg: var(--theme-btn-bg-primary-hover);
  --theme-modal-close-bg: var(--theme-btn-bg-soft);
  --theme-modal-close-text: var(--theme-text-regular);
  --theme-modal-close-hover-bg: var(--theme-btn-bg-soft-hover);

  /* 向后兼容的按钮 token：兼容现有页面按钮命名 */
  --theme-btn-bg-transparent: transparent;
  --theme-btn-bg-light: var(--theme-bg-surface);
  --theme-btn-bg-light-hover: var(--theme-bg-surface-elevated);
  --theme-btn-bg-soft: var(--theme-bg-surface-soft);
  --theme-btn-bg-soft-hover: #f3f3f3;
  --theme-btn-bg-soft-active: #e9e9e9;
  --theme-btn-bg-active: var(--theme-tab-active-bg);
  --theme-btn-bg-brand: var(--theme-color-brand);
  --theme-btn-bg-primary: var(--theme-color-brand-strong);
  --theme-btn-bg-primary-hover: #383838;
  --theme-btn-bg-primary-disabled: #d9d9d9;
  --theme-btn-border-primary: var(--theme-btn-bg-primary);
  --theme-btn-text-primary: var(--theme-text-inverse);
  --theme-btn-bg-secondary: var(--theme-bg-surface);
  --theme-btn-bg-secondary-hover: var(--theme-btn-bg-soft);
  --theme-btn-border-secondary: var(--theme-color-brand);
  --theme-btn-text-secondary: var(--theme-color-brand);
  --theme-btn-bg-hot: #ff5b2d;
  --theme-btn-bg-dot-light: var(--theme-dot-bg-light);
  --theme-btn-bg-dot-light-active: var(--theme-dot-bg-light-active);
  --theme-btn-bg-dot-dark: var(--theme-dot-bg);
  --theme-btn-bg-dot-dark-active: var(--theme-dot-bg-active);
}

/* 公共文本语义：标题、正文、描述、备注统一跟随主题 token 变化 */
html body {
  --text: var(--theme-text-body);
  --muted: var(--theme-text-note);
  --placeholder-text: var(--theme-text-placeholder);
  color: var(--theme-text-body);
}

body :where(.title,
  .section-title,
  .board-title,
  .bundle-title,
  .feature-card-title,
  .item-title,
  .course-title,
  .course-side strong,
  .course-side span,
  .certificate-title,
  .certificate-meta,
  .certificate-extra,
  .order-name,
  .order-name strong,
  .order-header,
  .order-amount,
  .record-header,
  .record-head,
  .data-header,
  .data-main strong,
  .data-amount,
  .code-value,
  .level-value,
  .redeem-label,
  .record-course,
  .record-value.amount,
  .record-value.strong,
  .empty-state strong,
  .empty-text,
  .message-title,
  .message-title-main,
  .profile-name,
  .panel-title,
  .summary-head h2,
  .dialog-title,
  .modal-title) {
  color: var(--theme-text-title) !important;
}

body :where(.desc,
  .description,
  .section-desc,
  .board-desc,
  .bundle-desc,
  .feature-card-desc,
  .course-side,
  .meta-value,
  .data-item,
  .record-row,
  .message-desc,
  .link-value,
  .action-meta,
  .content-desc,
  .detail-copy,
  .article-copy,
  .intro-text) {
  color: var(--theme-text-description) !important;
}

body :where(.subtitle,
  .section-subtitle,
  .panel-note,
  .toolbar-meta,
  .summary-note,
  .note,
  .muted,
  .sidebar-title,
  .course-meta,
  .course-extra,
  .course-expire,
  .meta-label,
  .order-helper,
  .data-main span,
  .data-time,
  .record-label,
  .record-time,
  .record-validity,
  .redeem-count,
  .empty-state,
  .empty-hint,
  .message-time,
  .profile-subtitle,
  .footer-meta,
  .item-subtitle,
  .item-meta,
  .bundle-meta,
  .meta,
  .summary-row,
  .pagination-text,
  .pagination-total,
  .category) {
  color: var(--theme-text-note) !important;
}

body :where(.record-row > div)::before {
  color: var(--theme-text-note) !important;
}

/* 个人中心数据列表：列表内部黑色主文案统一使用正文色，避免同一列表出现两档黑色 */
body :where(.course-row,
  .certificate-row,
  .course-card,
  .order-item,
  .order-card,
  .data-item,
  .record-row,
  .message-row,
  .message-card,
  .empty-state) :where(.course-side strong,
  .course-side span,
  .certificate-meta,
  .certificate-extra,
  .order-name,
  .order-name strong,
  .order-amount,
  .meta-value,
  .meta-value.amount,
  .data-main strong,
  .data-amount,
  .record-course,
  .record-value,
  .record-value.amount,
  .record-value.strong,
  strong,
  .empty-text) {
  color: var(--theme-text-body) !important;
}

/* 个人中心通用文本兜底：详情页、表单、推广记录、分页等剩余硬编码文本统一映射到主题色 */
body :where(.detail-title,
  .block-title,
  .order-no,
  .goods-name,
  .transaction-type,
  .summary-value,
  .field-value,
  .goods-table,
  .goods-meta,
  .mobile-auth-select,
  .mobile-auth-input,
  .mobile-auth-confirm,
  .mobile-auth-upload-plus,
  .link-value,
  .level-value,
  .record-value,
  .record-value.strong,
  .record-value.amount,
  .order-name strong,
  .order-amount,
  .pagination-page.is-active,
  .empty-state strong) {
  color: var(--theme-text-title) !important;
}

body :where(.mobile-auth-note,
  .mobile-auth-label,
  .mobile-auth-banner,
  .mobile-auth-upload-card span:last-child,
  .block-note,
  .order-no-label,
  .summary-time,
  .summary-label,
  .field-label,
  .price-origin,
  .level-title,
  .summary-row,
  .record-label,
  .message-time,
  .pagination,
  .pagination-text,
  .pagination-arrow,
  .pagination-arrow.is-enabled,
  .pagination-select,
  .pagination select,
  .pagination-jump,
  .empty-state,
  .hero-kicker,
  .action-link,
  .action-button,
  .sidebar-title) {
  color: var(--theme-text-note) !important;
}

body :where(.mobile-auth-confirm,
  .goods-meta,
  .link-value,
  .level-label,
  .record-row,
  .record-value,
  .order-item,
  .order-time,
  .message-desc,
  .mobile-auth-upload-card,
  .mobile-auth-select,
  .mobile-auth-input) {
  color: var(--theme-text-body) !important;
}

body :where(.mobile-auth-select:disabled,
  .mobile-auth-select.is-readonly,
  .mobile-auth-banner,
  .pagination-arrow,
  .pagination select:disabled) {
  color: var(--theme-text-placeholder) !important;
}

body :where(.solid-button,
  .mobile-auth-upload-plus,
  .theme-inverse-text) {
  color: var(--theme-text-inverse) !important;
}

body :where(.mobile-auth-error) {
  color: var(--theme-color-danger) !important;
}

/* 个人中心 PC 分页：统一右对齐的分页信息区 */
.user-center-page .pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 16px;
  padding: 0;
  color: var(--theme-text-note);
  font-size: 14px;
}

/* 移动端内容壳：约束主内容容器宽度和顶部留白 */
.theme-mobile-content-shell .content {
  padding: 0;
}

.theme-mobile-content-shell .container {
  width: calc(100% - 24px);
  margin: 0 auto;
}

.theme-mobile-content-shell .content>.container {
  padding: 18px 0 0;
}

/* 统一多选框皮肤：登录协议、筛选勾选等场景复用 */
.theme-checkbox {
  appearance: none;
  width: var(--theme-checkbox-size);
  height: var(--theme-checkbox-size);
  min-width: var(--theme-checkbox-size);
  border: 1.5px solid var(--theme-checkbox-border);
  border-radius: var(--theme-checkbox-radius);
  background: var(--theme-checkbox-bg);
  cursor: pointer;
  position: relative;
  flex: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  margin: 0;
}

.theme-checkbox:checked {
  background: var(--theme-checkbox-checked-bg);
  border-color: var(--theme-checkbox-checked-border);
}

.theme-checkbox:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 7px;
  border: 1.5px solid var(--theme-checkbox-check-color);
  border-top: 0;
  border-left: 0;
  transform: rotate(43deg);
}

.theme-checkbox:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--theme-checkbox-focus-ring);
}

/* 统一价格标记：确保 ￥ 与金额数字保持同一 token 体系 */
.theme-price-token.theme-price-token {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  white-space: nowrap;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  text-decoration: inherit;
}

.theme-price-token>.theme-currency-symbol {
  flex: none;
  display: inline-block;
  font-size: calc(1em - 4px);
  line-height: 1;
  margin-bottom: 0;
  color: inherit;
  text-decoration: inherit;
}

.theme-price-token>.theme-price-amount {
  display: inline-block;
  font-size: 1em;
  line-height: inherit;
  margin-bottom: 0;
  color: inherit;
  text-decoration: inherit;
}

/* 个人中心 PC 分页控件：页数、箭头、跳页输入框 */
.user-center-page .pagination-select {
  height: 34px;
  padding: 0 28px 0 12px;
  border: 1px solid #dddddd;
  border-radius: 4px;
  background: #ffffff;
  color: var(--theme-text-regular);
}

.user-center-page .pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-center-page .pagination-arrow,
.user-center-page .pagination-page {
  width: 34px;
  height: 34px;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--theme-text-placeholder);
  line-height: 1;
}

.user-center-page .pagination-arrow.is-enabled {
  background: #ffffff;
  color: var(--theme-text-note);
}

.user-center-page .pagination-page {
  background: var(--theme-pagination-active-bg);
  border-color: var(--theme-pagination-active-border, var(--theme-pagination-active-bg));
  color: var(--theme-pagination-active-text);
  font-weight: 600;
}

.user-center-page .pagination-page.is-active {
  background: var(--theme-pagination-active-bg);
  border-color: var(--theme-pagination-active-border, var(--theme-pagination-active-bg));
  color: var(--theme-pagination-active-text);
  font-weight: 600;
}

.user-center-page .pagination-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--theme-text-note);
}

/* 个人中心数据列表的轻操作按钮：保持文字型，不升级成营销按钮 */
.profile-panel .list-row>a,
.subpanel .list-row>a,
.order-actions .action-link,
.order-actions .action-button,
.message-actions .delete-button,
.course-side .action-button {
  min-height: var(--theme-account-list-action-height);
  padding: 0;
  border: 0;
  border-radius: var(--theme-radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--theme-account-list-action-color);
  font-size: var(--theme-account-list-action-size);
  font-weight: var(--theme-account-list-action-weight);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.order-actions .action-button,
.message-actions .delete-button,
.course-side .action-button {
  cursor: pointer;
}

.profile-panel .list-row>a:hover,
.subpanel .list-row>a:hover,
.order-actions .action-link:hover,
.order-actions .action-button:hover,
.message-actions .delete-button:hover,
.course-side .action-button:hover {
  background: transparent;
  color: var(--theme-account-list-action-hover);
}

/* PC 兑换记录分页区和空态容器：保证分页在底部稳定停靠 */
.user-center-page .pagination-jump {
  width: 46px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #dddddd;
  border-radius: 4px;
  background: #ffffff;
  color: #555555;
  text-align: center;
}

.user-center-page .record-panel .pagination {
  margin-top: 0;
  padding: 18px 22px 12px;
  border-top: 1px solid #f0f0f0;
}

/* 个人中心移动端分页：兼容小屏下的总数、选择器和当前页展示 */
.user-center-mobile-page .pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line, #ececec);
  color: #646464;
  font-size: 12px;
}

.user-center-mobile-page .pagination strong {
  color: var(--brand, #3d3d3d);
  font-size: 14px;
}

.user-center-mobile-page .pagination select {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  background: #ffffff;
  color: #5d5d5d;
}

/* 个人中心移动端二级页：隐藏首页式模块导航和底部一级导航 */
.user-center-secondary-page .module-tabs,
.user-center-secondary-page .mobile-module-tabs {
  display: none !important;
}

.user-center-secondary-page .bottom-nav,
.user-center-secondary-page .mall-shell-bottom-nav {
  display: none !important;
}

.user-center-secondary-page .page {
  padding-bottom: 24px;
}