/**
 * 微信小程序高保真设计规范与视觉体系
 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html, body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body {
  background: #e2e8f0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
}

/* 微信小程序手机外壳：尺寸与外观统一在此定义，页面内只需 <div id="app"> */
#app {
  width: 100%;
  max-width: 400px;
  height: 814px;
  min-height: 814px;
  max-height: 814px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background-color: #f5f6fa;
  border: 7px solid #1e293b;
  border-radius: 36px;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* 微信 iOS 底部安全区横条 (Home Indicator) */
.wx-home-bar {
  width: 134px;
  height: 5px;
  background-color: #000000;
  opacity: 0.2;
  border-radius: 100px;
  margin: 6px auto 4px auto;
  flex-shrink: 0;
}


.wx-din-font {
  font-family: -apple-system, BlinkMacSystemFont, "DIN Alternate", "PingFang SC", sans-serif;
}

/* 隐藏滚动条 */
.wx-no-scrollbar::-webkit-scrollbar {
  display: none;
}
.wx-no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 微信右上角原生标准胶囊 (87x32px) */
.wx-capsule {
  width: 87px;
  height: 32px;
  border-radius: 16px;
  border: 0.8px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  box-sizing: border-box;
}

.wx-capsule-dots {
  display: flex;
  align-items: center;
  gap: 3px;
}

.wx-capsule-dots span {
  width: 4px;
  height: 4px;
  background-color: #000000;
  border-radius: 50%;
}

.wx-capsule-line {
  width: 1px;
  height: 16px;
  background-color: rgba(0, 0, 0, 0.15);
}

.wx-capsule-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.8px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wx-capsule-circle::after {
  content: '';
  width: 5px;
  height: 5px;
  background-color: #000000;
  border-radius: 50%;
}

/* ===== 品牌色板（Figma 2026.9 对齐稿）===== */
:root {
  --brand-primary: #885CF7;      /* 主紫（图标/强调） */
  --brand-deep: #6437A9;         /* 深紫（深色文字/标签） */
  --brand-blue-violet: #8A6EFF;  /* 蓝紫（渐变深端） */
  --brand-pink: #F1A3FF;         /* 粉紫（渐变浅端光感） */
  --brand-pink-deep: #E05CF7;    /* 品红（辅助渐变） */
  --brand-violet-light: #C2BDFF; /* 淡紫（辅助） */
}

/* 主操作按钮：径向光感渐变（对应 Figma node-2157-10130） */
.wx-btn-primary {
  background: radial-gradient(130% 200% at 90% 10%, #F1A3FF 0%, #B67EF2 48%, #8A6EFF 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(136, 92, 247, 0.28);
}

/* 概览卡渐变：深紫基底 + 右上粉紫光晕，白字对比度保持 */
.wx-hero-grad {
  background:
    radial-gradient(120% 170% at 100% 0%, rgba(241, 163, 255, 0.95) 0%, rgba(241, 163, 255, 0) 55%),
    linear-gradient(135deg, #8A6EFF 0%, #7C3AED 100%);
}

/* 按压微动效：用独立的 scale 属性（而非 transform: scale），
   避免覆盖 Tailwind 的 translate 变换 —— 否则带动画位移的元素按下时会跳走，导致点击丢失 */
.wx-press:active {
  scale: 0.96;
  opacity: 0.9;
}

/* 平滑轮播轨道 */
.slider-track {
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 分页加载指示器：旋转圆环（配合触底加载演示） */
.wx-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  border-top-color: #885CF7;
  animation: wxSpin 0.7s linear infinite;
}

@keyframes wxSpin {
  to { transform: rotate(360deg); }
}

/* MasterGo 矢量图标容器 */
.mg-icon-box svg {
  width: 42px;
  height: 42px;
  display: block;
}

/* 列表行点击反馈（发票中心菜单） */
.wx-row:active {
  background-color: #f8fafc;
}

/* 底部弹层遮罩与抽屉 */
.wx-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 60;
}

.wx-sheet {
  animation: wxSlideUp 0.26s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes wxSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.wx-fade {
  animation: wxFadeIn 0.22s ease-out;
}