/* ===========================================================================
   全局样式（独立文件）—— 由 scripts/build-global-css.mjs 自动生成，勿手改
   真源：src/styles/variables.scss + src/styles/common.scss + src/styles/tokens.css
   作用：绕过 16MB 主 CSS 的规则数截断（Blink 单表约 6.5 万条上限）
   =========================================================================== */
/* ---------- 页面基础 ---------- */
page { background: #F4F5F7; color: #1A1A1E; font-size: 0.875rem; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif; }
html, body { background: #F4F5F7; }
/* ---------- 设计令牌 ---------- */
:root {
  /* 品牌色 */
  --xx-brand: #FF4D6D;
  --xx-brand-press: #E6395B;
  --xx-brand-2: #FF7A93;
  --xx-brand-soft: #FFEEF2;
  --xx-brand-soft-2: #FFF4F6;
  /* 辅助色 */
  --xx-success: #12B76A;
  --xx-success-soft: #E7F8EF;
  --xx-warning: #F79009;
  --xx-warning-soft: #FEF4E6;
  --xx-danger: #EF4444;
  --xx-danger-soft: #FDECEC;
  --xx-wx: #07C160;
  --xx-admin: #2D3340;
  /* 中性色 */
  --xx-ink-1: #1A1A1E;
  --xx-ink-2: #6B6B78;
  --xx-ink-3: #9A9AA8;
  --xx-ink-4: #C5C5CE;
  --xx-bg: #F4F5F7;
  --xx-card: #FFFFFF;
  --xx-line: #ECECEF;
  --xx-fill: #F4F5F7;
  --xx-on-brand: #FFFFFF;
  --xx-mask: rgba(0, 0, 0, .5);
  /* 字号 */
  --xx-fs-h1: 1.25rem;
  --xx-fs-h2: 1.125rem;
  --xx-fs-h3: 1rem;
  --xx-fs-body: 0.875rem;
  --xx-fs-sub: 0.8125rem;
  --xx-fs-tip: 0.75rem;
  --xx-fs-mini: 0.625rem;
  /* 间距 */
  --xx-sp-xxs: 0.125rem;
  --xx-sp-xs: 0.25rem;
  --xx-sp-sm: 0.5rem;
  --xx-sp-md: 0.75rem;
  --xx-sp-lg: 1rem;
  --xx-sp-xl: 1.5rem;
  --xx-sp-xxl: 2rem;
  /* 圆角 */
  --xx-radius-sm: 0.25rem;
  --xx-radius-md: 0.5rem;
  --xx-radius-lg: 0.75rem;
  --xx-radius-xl: 1rem;
  --xx-radius-round: 31.2188rem;
}
/* ---------- uview 主题令牌 ---------- */
:root {
  --up-primary: var(--xx-brand);
  --up-primary-dark: var(--xx-brand-press);
  --up-primary-disabled: rgba(255, 77, 109, .35);
  --up-primary-light: var(--xx-brand-soft);
  --up-warning: var(--xx-warning);
  --up-warning-dark: var(--xx-warning);
  --up-success: var(--xx-success);
  --up-error: var(--xx-danger);
  --up-info: #5AC8FA;
}
/* ---------- 全局公共类（common.scss 编译产物） ---------- */
page {
  background: #F4F5F7;
  color: #1A1A1E;
  font-size: 0.875rem;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}

.xx-page {
  min-height: 100vh;
  background: #F4F5F7;
}

.xx-page--pad {
  padding: 0.75rem;
}

.xx-page--fixed-bottom {
  padding-bottom: calc(4.375rem + env(safe-area-inset-bottom));
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-start {
  display: flex;
  align-items: center;
}

.flex-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.flex-1 {
  flex: 1;
  min-width: 0;
}

.flex-wrap {
  flex-wrap: wrap;
}

.text-main {
  color: #1A1A1E;
}

.text-sub {
  color: #6B6B78;
}

.text-tip {
  color: #9A9AA8;
  font-size: 0.75rem;
}

.text-primary {
  color: #FF4D6D;
}

.text-success {
  color: #12B76A;
}

.text-warning {
  color: #F79009;
}

.text-error {
  color: #EF4444;
}

.text-bold {
  font-weight: 600;
}

.text-medium {
  font-weight: 500;
}

.fs-h1 {
  font-size: 1.25rem;
}

.fs-h2 {
  font-size: 1.125rem;
}

.fs-h3 {
  font-size: 1rem;
}

.fs-body {
  font-size: 0.875rem;
}

.fs-sub {
  font-size: 0.8125rem;
}

.fs-tip {
  font-size: 0.75rem;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.xx-card {
  background: #FFFFFF;
  border-radius: 0.5rem;
  padding: 0.75rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.04);
  margin-bottom: 0.75rem;
}

.xx-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #1A1A1E;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}
.xx-card__title::before {
  content: "";
  width: 0.1875rem;
  height: 0.875rem;
  background: #FF4D6D;
  border-radius: 0.0938rem;
  margin-right: 0.5rem;
}

.xx-money {
  color: #FF4D6D;
  font-weight: 600;
  font-family: "DIN Alternate", -apple-system, sans-serif;
}
.xx-money__symbol {
  font-size: 0.75rem;
  margin-right: 0.0625rem;
}

.xx-footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
  background: #FFFFFF;
  box-shadow: 0 -0.125rem 0.5rem rgba(0, 0, 0, 0.05);
}

.xx-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  background: #FFEEF2;
  color: #FF4D6D;
  margin-right: 0.25rem;
}

.xx-divider {
  height: 0.0313rem;
  background: #ECECEF;
  margin: 0.75rem 0;
}

.xx-form-row {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0;
  border-bottom: 0.0313rem solid #ECECEF;
}
.xx-form-row:last-child {
  border-bottom: none;
}
.xx-form-row__label {
  width: 5.625rem;
  font-size: 0.875rem;
  color: #1A1A1E;
  flex-shrink: 0;
}
.xx-form-row__label--required::before {
  content: "*";
  color: #EF4444;
  margin-right: 0.125rem;
}
.xx-form-row__value {
  flex: 1;
  font-size: 0.875rem;
  color: #6B6B78;
  text-align: right;
}

.xx-grid {
  display: grid;
  gap: 0.5rem;
}
.xx-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.xx-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.xx-empty {
  padding: 3.75rem 0;
  text-align: center;
  color: #9A9AA8;
  font-size: 0.8125rem;
}

.xx-fade-enter-active,
.xx-fade-leave-active {
  transition: opacity 0.25s ease;
}

.xx-fade-enter-from,
.xx-fade-leave-to {
  opacity: 0;
}

.xx-press {
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.xx-press:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.grad-brand {
  background: linear-gradient(135deg, #FF4D6D 0%, #FF7A93 100%);
}

.text-heavy {
  font-weight: 700;
}

.text-on-brand {
  color: #FFFFFF;
}

.xx-tag--success {
  background: #E7F8EF;
  color: #12B76A;
}

.xx-tag--warning {
  background: #FEF4E6;
  color: #F79009;
}

.xx-tag--error {
  background: #FDECEC;
  color: #EF4444;
}
/* ---------- uview 组件关键样式兜底 ---------- */

/* uview 组件关键样式兜底（修复页面 chunk reset 规则同特异性覆盖） */
.u-button--primary { background-color: var(--xx-brand) !important; color: var(--xx-on-brand) !important; border-color: var(--xx-brand) !important; }
.u-button--primary.u-button--hover { background-color: var(--xx-brand-press) !important; border-color: var(--xx-brand-press) !important; }
.u-button--success { background-color: var(--xx-success) !important; border-color: var(--xx-success) !important; color: var(--xx-on-brand) !important; }
.u-button--warning { background-color: var(--xx-warning) !important; border-color: var(--xx-warning) !important; color: var(--xx-on-brand) !important; }
.u-button--error { background-color: var(--xx-danger) !important; border-color: var(--xx-danger) !important; color: var(--xx-on-brand) !important; }
.u-button--info { background-color: var(--xx-info) !important; border-color: var(--xx-info) !important; color: var(--xx-on-brand) !important; }
.u-button--primary.u-button--plain { background-color: transparent !important; color: var(--xx-brand) !important; border-color: var(--xx-brand) !important; }
