/* ============================================
   华为盒子 · 小程序 UI 重设计 v2.0
   设计系统: Ink & Paper · 轻量现代
   暖白纸感底 + 墨黑主色 + 荧光柠点缀
   发丝线边框 / 大圆角 / 点阵纹理 / 等宽数字
   ============================================ */

:root {
  /* 主色调 - 墨黑 + 紫罗兰点缀 */
  --ink:      #141417;
  --ink-2:    #1D1D23;
  --lime:     #D9F99D;   /* 荧光柠 · 高亮点缀 */
  --lime-ink: #3D5A1E;   /* 荧光柠上的深字 */

  --brand-50:  #F5F4FF;
  --brand-100: #EDEBFF;
  --brand-200: #DFDBFF;
  --brand-300: #C8C0FF;
  --brand-400: #A99BFF;
  --brand-500: #7C66FF;
  --brand-600: #6E56CF;
  --brand-700: #5746B8;
  --brand-accent: #A99BFF;

  /* "渐变"统一收敛为墨色(保留变量名兼容旧页面) */
  --gradient-brand: linear-gradient(160deg, #1D1D23 0%, #101013 100%);
  --gradient-soft:  linear-gradient(135deg, #F5F4FF 0%, #F2F9EE 100%);
  --gradient-warm:  linear-gradient(135deg, #F97316 0%, #F43F5E 100%);
  --gradient-mint:  linear-gradient(135deg, #10B981 0%, #34D399 100%);

  /* 功能色 */
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #D97706;
  --warning-bg: #FFF7E6;
  --danger:  #E11D48;
  --danger-bg: #FFF1F2;
  --info:    #0284C7;
  --info-bg: #F0F9FF;

  /* 中性色(暖灰) */
  --gray-950: #101013;
  --gray-900: #191A1E;
  --gray-800: #2A2B30;
  --gray-700: #3F4046;
  --gray-600: #55565C;
  --gray-500: #74757B;
  --gray-400: #9C9DA3;
  --gray-300: #C9C9C4;
  --gray-200: #E4E4DF;
  --gray-100: #EFEFEA;
  --gray-50:  #F7F7F3;

  /* 背景 */
  --bg-page: #F6F6F3;
  --bg-card: #FFFFFF;
  --bg-overlay: rgba(16, 16, 19, 0.42);

  /* 边框 / 阴影(发丝线 + 极轻投影) */
  --border: #EBEBE6;
  --border-strong: #E0E0DA;
  --shadow-xs: 0 1px 2px rgba(20, 20, 23, .03);
  --shadow-sm: 0 1px 3px rgba(20, 20, 23, .04);
  --shadow-md: 0 6px 20px rgba(20, 20, 23, .06);
  --shadow-lg: 0 12px 32px rgba(20, 20, 23, .10);
  --shadow-glow: 0 6px 16px rgba(20, 20, 23, .16);

  /* 圆角(整体放大一档) */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-2xl: 28px;
  --r-pill: 999px;

  /* 字体 */
  --font-mono: 'SF Mono', 'JetBrains Mono', Consolas, 'Liberation Mono', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
               'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* 动效 */
  --ease-spring: cubic-bezier(.22, 1, .36, 1);
}

/* ============ 全局 ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--gray-900);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }

/* ============ 展示容器 (在 PC 浏览器中预览) ============ */
body.preview-mode {
  display: flex;
  min-height: 100vh;
  background: #F1F1EC;
}

.preview-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background:
    radial-gradient(rgba(20,20,23,.055) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* 手机外壳(轻量化) */
.phone-frame {
  position: relative;
  width: 390px;
  height: 820px;
  background: #FFFFFF;
  border-radius: 52px;
  padding: 10px;
  border: 1px solid #DCDCD6;
  box-shadow:
    0 1px 2px rgba(20, 23, 42, .04),
    0 24px 60px -18px rgba(20, 20, 23, .22);
}
.phone-frame::before {
  content: ''; position: absolute;
  top: 18px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px;
  background: var(--ink); border-radius: 14px;
  z-index: 100;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 42px;
  background: var(--bg-page);
  overflow: hidden;
  position: relative;
}

/* ============ 小程序页面骨架 ============ */
.mini-page {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: var(--bg-page);
  overflow: hidden;
  position: relative;
}

/* 状态栏 */
.status-bar {
  height: 44px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px 0 26px;
  font-size: 15px; font-weight: 600;
  color: var(--gray-900);
  flex-shrink: 0;
}
.status-bar.dark { color: #fff; }
.status-bar .icons { display: flex; align-items: center; gap: 5px; }
.status-bar .icons svg { display: block; }

/* 顶部导航栏 */
.navbar {
  flex-shrink: 0;
  height: 44px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  padding: 0 16px;
}
.navbar .nav-back {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--gray-800);
  background: #fff;
  border: 1px solid var(--border);
}
.navbar .nav-back:active { transform: translateY(-50%) scale(.92); }
.navbar .nav-title {
  font-size: 17px; font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -.01em;
}
.navbar .nav-right {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  display: flex; gap: 8px;
}
.navbar .nav-right .icon-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--gray-800);
}

/* 二级页面左上角悬浮返回按钮(由 app.js 注入) */
body.has-page-back .mini-page { padding-top: 44px; }
body.has-page-back .mini-page > .page-back {
  position: absolute;
  top: 6px; left: 12px;
  z-index: 60;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--gray-800);
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(20, 20, 23, .1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform .18s var(--ease-spring);
}
body.has-page-back .mini-page > .page-back:active { transform: scale(.92); }

/* 主滚动区 */
.scroll-area {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-area::-webkit-scrollbar { display: none; }
.scroll-area.padded { padding: 16px; }

/* ============ 通用卡片(白卡 + 发丝线) ============ */
.card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

/* ============ 按钮(胶囊 · 墨黑 CTA) ============ */
.btn {
  display: flex; align-items: center; justify-content: center;
  height: 50px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600;
  letter-spacing: .01em;
  transition: transform .18s var(--ease-spring), box-shadow .18s ease, opacity .18s ease;
  user-select: none;
}
.btn:active { transform: scale(.965); }
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:disabled { background: var(--gray-200); box-shadow: none; color: #fff; cursor: not-allowed; }
.btn-secondary {
  background: var(--brand-50);
  color: var(--brand-600);
  box-shadow: inset 0 0 0 1px var(--brand-100);
}
.btn-ghost { background: transparent; color: var(--gray-700); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn-pill { border-radius: var(--r-pill); }

/* ============ 表单(白底 · 发丝线) ============ */
.field {
  display: flex; align-items: center;
  height: 54px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 0 16px;
  margin-bottom: 12px;
  transition: all .18s ease;
}
.field:focus-within {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(124, 102, 255, .12);
}
.field input {
  flex: 1; height: 100%;
  border: 0; outline: 0;
  background: transparent;
  font-size: 15px;
  color: var(--gray-900);
}
.field input::placeholder { color: var(--gray-400); }
.field .prefix, .field .suffix {
  display: flex; align-items: center;
  color: var(--gray-500);
  font-size: 13px;
}
.field .suffix { padding-left: 12px; }
.field .suffix.link { color: var(--brand-600); font-weight: 500; cursor: pointer; }
.field.has-btn .code-btn {
  margin-left: 12px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
  transition: opacity .15s ease;
}
.field.has-btn .code-btn:active { transform: scale(.95); }
.field.has-btn .code-btn:disabled { color: #fff; background: var(--gray-200); }

/* ============ 标签 / 徽章(描边轻标签) ============ */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600;
  background: #fff;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.tag.success { background: var(--success-bg); color: var(--success); border-color: #D1F2E4; }
.tag.warning { background: var(--warning-bg); color: var(--warning); border-color: #F5E6C4; }
.tag.danger  { background: var(--danger-bg); color: var(--danger); border-color: #F8D8DD; }
.tag.info    { background: var(--info-bg); color: var(--info); border-color: #CBE7F7; }
.tag.brand   { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-100); }
.tag.lime    { background: var(--lime); color: var(--lime-ink); border-color: #C4EF8E; }

/* ============ Hero(白底轻量 · 发丝线) ============ */
.hero {
  background: var(--bg-card);
  color: var(--gray-900);
  border-radius: 0 0 var(--r-2xl) var(--r-2xl);
  padding: 16px 20px 64px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 24px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.02em; color: var(--ink); }
.hero p { margin: 0; color: var(--gray-500); font-size: 13px; }

/* ============ 列表项 ============ */
.list {
  background: #fff;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
}
.list-item {
  display: flex; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  transition: background .15s ease;
}
.list-item:last-child { border-bottom: 0; }
.list-item:active { background: var(--gray-50); }
.list-item .icon {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  color: var(--gray-700);
  display: flex; align-items: center; justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}
.list-item .icon.warn    { background: var(--warning-bg); color: var(--warning); border-color: #F5E6C4; }
.list-item .icon.success { background: var(--success-bg); color: var(--success); border-color: #D1F2E4; }
.list-item .icon.danger  { background: var(--danger-bg); color: var(--danger); border-color: #F8D8DD; }
.list-item .icon.info    { background: var(--info-bg); color: var(--info); border-color: #CBE7F7; }
.list-item .label { flex: 1; font-size: 14px; color: var(--gray-800); }
.list-item .value { color: var(--gray-500); font-size: 13px; }
.list-item .arrow { color: var(--gray-300); margin-left: 4px; }

/* ============ 统计卡(Bento 风) ============ */
.stat-card {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 16px;
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  gap: 6px;
}
.stat-card .stat-label { font-size: 12px; color: var(--gray-500); }
.stat-card .stat-value {
  font-size: 26px; font-weight: 700;
  font-family: var(--font-mono);
  color: var(--gray-900);
  letter-spacing: -.5px;
}
.stat-card .stat-delta { font-size: 12px; color: var(--success); display: flex; align-items: center; gap: 2px; }
.stat-card.green  .stat-value { color: var(--success); }
.stat-card.orange .stat-value { color: var(--warning); }
.stat-card.rose   .stat-value { color: var(--danger); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.stat-grid .stat-card { padding: 12px 8px; align-items: flex-start; }
.stat-grid .stat-card .stat-value { font-size: 19px; }

/* ============ 邀请码展示(白卡 + 荧光柠码) ============ */
.invite-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px 18px;
  color: var(--gray-900);
  position: relative;
  overflow: hidden;
}
.invite-card .label { font-size: 12px; color: var(--gray-500); }
.invite-card .code {
  font-family: var(--font-mono);
  font-size: 26px; font-weight: 700;
  letter-spacing: 3px;
  margin-top: 6px;
  color: var(--ink);
}
.invite-card .row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
}
.invite-card .copy {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--ink);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 12px;
}

/* ============ TabBar(轻量 · 墨色激活) ============ */
.tabbar {
  flex-shrink: 0;
  height: 64px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
}
.tabbar .tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: var(--gray-400);
  font-size: 11px;
  position: relative;
  transition: color .15s ease;
}
.tabbar .tab svg { width: 24px; height: 24px; }
.tabbar .tab.active { color: var(--ink); font-weight: 600; }
.tabbar .tab.active::after {
  content: '';
  width: 16px; height: 3px;
  border-radius: 3px;
  background: var(--lime);
  margin-top: 3px;
}
.tabbar .tab.center {
  margin-top: -22px;
}
.tabbar .tab.center .fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-glow);
}

/* ============ 通用分隔 ============ */
.divider { height: 1px; background: var(--gray-100); margin: 8px 0; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.py-12 { padding-top: 12px; padding-bottom: 12px; }
.text-center { text-align: center; }

/* ============ H5 独立模式（PC 居中 / 移动全屏） ============ */
body.h5-standalone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #EDEDE8;
  background-image: radial-gradient(rgba(20,20,23,.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

body.h5-standalone .phone-frame {
  width: 390px;
  height: 820px;
  margin: 24px 0;
  border: 1px solid #DCDCD6;
  box-shadow:
    0 1px 2px rgba(20,23,42,.04),
    0 24px 60px -18px rgba(20,20,23,.22);
}

/* 移动端：去掉外壳，全屏占满 */
@media (max-width: 768px) {
  body.h5-standalone {
    display: block;
    background: var(--bg-page);
    background-image: none;
  }
  body.h5-standalone .phone-frame {
    width: 100%;
    height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }
  body.h5-standalone .phone-frame::before { display: none; } /* 隐藏刘海装饰 */
  body.h5-standalone .phone-screen { border-radius: 0; }
}
@media (max-width: 420px) {
  .phone-frame { transform: scale(.95); transform-origin: top center; height: 760px; }
}

/* ============ App 内嵌适配（界外 App WebView 打开时生效）============
   上面的手机外壳 / 模拟状态栏是给浏览器独立预览用的；在 App 内嵌时，
   App 已提供真实状态栏与原生标题栏，这里强制全屏铺满并隐藏模拟状态栏，
   避免“真实状态栏 + 原生标题栏 + H5 模拟状态栏”三层叠加，以及 <=420px 缩放留边。
   注：仅改动 App 打包副本，不影响源站点。 */
body.h5-standalone { background: var(--bg-page) !important; }
body.h5-standalone .status-bar { display: none !important; }
/* App 内嵌时原生 MiniAppTopBar 已提供“返回 + 标题 + 胶囊”，
   故隐藏 H5 自带的 navbar，避免顶部出现两套返回/标题。 */
body.h5-standalone .navbar { display: none !important; }
body.h5-standalone .phone-frame {
  transform: none !important;
  width: 100% !important;
  height: 100vh !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
body.h5-standalone .phone-frame::before { display: none !important; }
body.h5-standalone .phone-screen { border-radius: 0 !important; }

/* ============ 动画(弹簧曲线) ============ */
@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .7; transform: scale(.96); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .45s var(--ease-spring) both; }
.fade-up-1 { animation-delay: .05s; }
.fade-up-2 { animation-delay: .10s; }
.fade-up-3 { animation-delay: .15s; }
.fade-up-4 { animation-delay: .20s; }
.fade-up-5 { animation-delay: .25s; }

/* ============ 提示 ============ */
.toast {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(16,16,19,.88);
  color: #fff; padding: 10px 20px;
  border-radius: var(--r-pill);
  font-size: 13px;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transition: opacity .2s ease;
}
.toast.show { opacity: 1; }

/* ============================================
   v2.0 组件增补 · 交互引擎配套样式
   ============================================ */

/* ---- 眼睛切换(密码可见性) ---- */
.eye-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  cursor: pointer;
  border-radius: 50%;
  transition: color .15s ease;
}
.eye-btn:active { transform: scale(.9); }
.eye-btn.show { color: var(--brand-500); }
.eye-btn.show svg.slash { display: none; }

/* ---- 复选框(协议 / 记住登录) ---- */
.checkbox {
  width: 18px; height: 18px;
  border: 1.5px solid var(--gray-300);
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
  cursor: pointer;
  transition: all .15s var(--ease-spring);
  flex-shrink: 0;
}
.checkbox svg { opacity: 0; transform: scale(.5); transition: all .15s var(--ease-spring); }
.checkbox.checked {
  background: var(--ink);
  border-color: var(--ink);
}
.checkbox.checked svg { opacity: 1; transform: scale(1); }

/* ---- 密码强度指示 ---- */
.pwd-strength {
  display: flex; gap: 5px;
  margin: -2px 0 6px;
}
.pwd-strength .bar {
  flex: 1; height: 4px;
  border-radius: 2px;
  background: var(--gray-200);
  transition: background .25s ease;
}
.pwd-strength-text {
  font-size: 11px;
  color: var(--gray-500);
  margin: 0 0 14px;
  min-height: 14px;
}

/* ---- 快捷金额 Chip ---- */
.quick-amount {
  text-align: center;
  padding: 9px 0;
  background: var(--gray-50);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--gray-600);
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all .15s var(--ease-spring);
  user-select: none;
}
.quick-amount:active { transform: scale(.94); }
.quick-amount.active {
  background: var(--ink);
  color: var(--lime);
  border-color: var(--ink);
  font-weight: 600;
}

/* ---- Segment Tab(下划线式) ---- */
.segment {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.segment .seg-item {
  padding: 10px 0;
  color: var(--gray-400);
  font-size: 14px;
  cursor: pointer;
  position: relative;
  transition: color .15s ease;
  user-select: none;
}
.segment .seg-item::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2.5px;
  border-radius: 2px;
  background: transparent;
  transition: background .2s ease;
}
.segment .seg-item.active {
  color: var(--gray-900);
  font-weight: 600;
}
.segment .seg-item.active::after { background: var(--ink); }

/* ---- Segment Tab(胶囊式,筛选用) ---- */
.segment-pill {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.segment-pill::-webkit-scrollbar { display: none; }
.segment-pill .seg-item {
  padding: 7px 16px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-pill);
  color: var(--gray-600);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s var(--ease-spring);
  user-select: none;
  flex-shrink: 0;
}
.segment-pill .seg-item:active { transform: scale(.94); }
.segment-pill .seg-item.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--lime);
  font-weight: 600;
}

/* ---- 按钮 Loading 态 ---- */
.btn.loading {
  pointer-events: none;
  opacity: .85;
}
.btn.loading::before {
  content: '';
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  margin-right: 8px;
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ---- 骨架屏 ---- */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- 空状态 ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}
.empty-state .empty-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--gray-50);
  border: 1px dashed var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-300);
}
.empty-state .empty-title {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 600;
  margin-bottom: 4px;
}
.empty-state .empty-desc { font-size: 12px; }

/* ---- 首页我的订单数量角标 ---- */
.order-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
}
