.account-page { min-height: 100%; background: var(--color-bg, #f5f6f8); color: var(--color-text, #1b1d22); }
.account-page .account-nav { position: sticky; top: 0; z-index: 8; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(18,21,27,.08); }
.account-page .account-nav-bar { height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.account-page .account-back { width: 28px; font-size: 30px; line-height: 1; cursor: pointer; }
.account-page .account-title { flex: 1; font-size: 17px; font-weight: 700; }
.account-page .account-action { border: 0; background: transparent; color: var(--color-primary, #e45a1b); font: inherit; font-size: 13px; }
.account-page .account-body { padding: 14px 14px calc(28px + env(safe-area-inset-bottom)); }
.account-page .account-card { background: #fff; border: 1px solid rgba(18,21,27,.07); border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: 0 5px 18px rgba(18,21,27,.04); }
.account-page .account-muted { color: #7a7f89; font-size: 12px; line-height: 1.65; }
.account-page .account-row { display: flex; align-items: center; gap: 12px; }
.account-page .account-grow { flex: 1; min-width: 0; }
.account-page .account-name { font-weight: 700; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.account-page .account-subtitle { color: #686d77; font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.account-page .account-snippet { color: #3f444d; font-size: 13px; line-height: 1.65; margin-top: 8px; overflow-wrap: anywhere; }
.account-page .account-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg,#f2b38f,#e45a1b); object-fit: cover; flex: none; }
.account-page .account-btn { border: 0; border-radius: 999px; padding: 8px 14px; background: #17191f; color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.account-page .account-btn-primary { background: var(--color-primary, #e45a1b); }
.account-page .account-btn-soft { background: #f4e9e3; color: #bf4815; }
.account-page .account-btn-danger { background: #fff0f0; color: #c93d3d; }
.account-page .account-input, .account-page .account-textarea, .account-page .account-select { width: 100%; box-sizing: border-box; border: 1px solid #dfe2e8; border-radius: 12px; background: #fff; color: #1b1d22; padding: 11px 12px; font: inherit; outline: none; }
.account-page .account-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.account-page .account-input:focus, .account-page .account-textarea:focus, .account-page .account-select:focus { border-color: #e45a1b; box-shadow: 0 0 0 3px rgba(228,90,27,.1); }
.account-page .account-label { display: block; font-size: 13px; font-weight: 650; margin: 12px 0 7px; }
.account-page .account-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; }
.account-page .account-tab { border: 1px solid #e3e5e9; background: #fff; border-radius: 999px; padding: 7px 13px; white-space: nowrap; font-size: 12px; }
.account-page .account-tab.active { color: #fff; background: #17191f; border-color: #17191f; }
.account-page .account-empty { text-align: center; color: #858a93; padding: 44px 20px; line-height: 1.7; }
.account-page .account-loading { text-align: center; color: #858a93; padding: 32px; }
.account-page .account-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #f3f4f6; color: #686d77; font-size: 11px; }
.account-page .account-badge.good { background: #eaf8ef; color: #26894b; }
.account-page .account-badge.warn { background: #fff5df; color: #a66a00; }
.account-page .account-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.account-page .account-stat { text-align: center; padding: 12px 6px; border-radius: 12px; background: #f7f8fa; }
.account-page .account-stat strong { display: block; font-size: 22px; margin-bottom: 4px; }
.account-page .account-toggle-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f0f1f3; }
.account-page .account-toggle-row:last-child { border-bottom: 0; }
.account-page input[type="checkbox"] { width: 20px; height: 20px; accent-color: #e45a1b; }
.account-page .legal-content { white-space: pre-wrap; font: 13px/1.8 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; margin: 0; overflow-wrap: anywhere; }
.account-page .coupon-value { font-size: 22px; color: #e45a1b; font-weight: 800; }
.account-page .account-spacer { height: 8px; }

/* ==================== 法律协议排版全新高质感升级 ==================== */
.legal-page {
  min-height: 100vh;
  background: #F8F9FB;
  color: #1F2937;
  display: flex;
  flex-direction: column;
}

.legal-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 0.5px solid #EAECF0;
}

.legal-nav-bar {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-sizing: border-box;
}

.legal-back-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F3F4F6;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
}
.legal-back-btn:active {
  background: #E5E7EB;
  transform: scale(0.95);
}

.legal-nav-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.in-miniprogram .legal-nav-title {
  display: none;
}

.legal-capsule-space {
  width: 8px;
}
.in-miniprogram .legal-capsule-space {
  width: 88px;
}

/* 正文容器 */
.legal-body {
  flex: 1;
  padding: 16px 16px calc(env(safe-area-inset-bottom, 20px) + 80px);
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.legal-article {
  background: #FFFFFF;
  border: 1px solid #EEF0F3;
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.legal-doc-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #F0F2F5;
}

.legal-doc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.legal-ver-tag {
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  background: #F3F4F6;
  padding: 3px 8px;
  border-radius: 6px;
}

.legal-status-tag {
  font-size: 11px;
  font-weight: 600;
  color: #D97706;
  background: #FEF3C7;
  padding: 3px 8px;
  border-radius: 6px;
}
.legal-status-tag.legal-tag-success {
  color: #059669;
  background: #D1FAE5;
}

/* Markdown 排版渲染 */
.legal-h1 {
  font-size: 21px;
  font-weight: 900;
  color: #111827;
  line-height: 1.35;
  margin: 0 0 14px 0;
  letter-spacing: 0.5px;
}

.legal-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
  background: #F9FAFB;
  border: 0.5px solid #E5E7EB;
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 20px;
}
.legal-date-badge svg {
  color: var(--brand-orange, #E45A1B);
}

.legal-h2 {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  margin: 26px 0 10px 0;
  padding-left: 10px;
  border-left: 3px solid var(--brand-orange, #E45A1B);
  line-height: 1.4;
}

.legal-h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1F2937;
  margin: 16px 0 8px 0;
}

.legal-p {
  font-size: 14px;
  line-height: 1.75;
  color: #374151;
  margin: 0 0 12px 0;
  text-align: justify;
}

.legal-list {
  margin: 0 0 14px 0;
  padding-left: 20px;
}

.legal-li {
  font-size: 13.5px;
  line-height: 1.7;
  color: #4B5563;
  margin-bottom: 6px;
}

/* 底部浮动签署栏 */
.legal-foot-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 0.5px solid #EAECF0;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 20px) + 10px);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.legal-action-btn {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: 48px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.legal-btn-primary {
  color: #FFFFFF;
  background: linear-gradient(135deg, #FF6B2B 0%, #E45A1B 100%);
  box-shadow: 0 8px 20px rgba(228, 90, 27, 0.32);
}
.legal-btn-primary:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(228, 90, 27, 0.2);
}

.legal-btn-done {
  color: #047857;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  cursor: default;
}
