/* ============ 全局 ============ */
:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --income: #f56c2d;
  --expense: #16a377;
  --bg: #f5f6fa;
  --text-main: #1f2329;
  --text-sub: #86909c;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: #e8eaf1;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100vh; }
.page-wrap {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 60px;
}
.page-wrap.no-tabbar { padding-bottom: 24px; }

/* ============ 登录页 ============ */
.login-page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(160deg, #1d4ed8 0%, #2563eb 40%, #60a5fa 100%);
  padding: 56px 28px 40px;
}
.login-logo {
  text-align: center;
  color: #fff;
  margin-bottom: 36px;
}
.login-logo .logo-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: rgba(255,255,255,.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 14px;
}
.login-logo h1 { font-size: 22px; margin: 0 0 6px; font-weight: 600; }
.login-logo p { font-size: 13px; margin: 0; opacity: .82; }
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 6px 8px;
  box-shadow: 0 12px 32px rgba(15, 43, 108, .18);
}
.login-extra-title {
  font-size: 13px;
  color: var(--text-sub);
  padding: 4px 16px 0;
}
.login-agreement {
  font-size: 12px;
  color: var(--text-sub);
  text-align: center;
  margin-top: 16px;
}

/* ============ 首页 ============ */
.home-top {
  background: linear-gradient(150deg, #1e3fae 0%, #2563eb 45%, #4f8cf7 100%);
  padding: 20px 16px 52px;
  color: #fff;
}
.home-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.home-user-info { display: flex; align-items: center; gap: 10px; }
.home-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
}
.home-user-name { font-size: 16px; font-weight: 600; }
.home-user-tag { font-size: 11px; opacity: .85; margin-top: 2px; }
.points-card {
  background: linear-gradient(120deg, #ffd08a 0%, #ff9d5c 55%, #ff7a45 100%);
  border-radius: 16px;
  padding: 18px 18px 16px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 122, 69, .35);
  position: relative;
  overflow: hidden;
}
.points-card::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
}
.points-card .card-label { font-size: 12px; opacity: .9; }
.points-card .card-total {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  font-family: "DIN Alternate", "Helvetica Neue", sans-serif;
}
.points-card .card-frozen {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  background: rgba(255,255,255,.22);
  border-radius: 20px;
  padding: 3px 10px;
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  padding: 18px 16px 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.section-title .more {
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 400;
}
.brand-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 6px;
  -webkit-overflow-scrolling: touch;
}
.brand-scroll::-webkit-scrollbar { display: none; }
.brand-card {
  flex: 0 0 128px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 12px;
  box-shadow: 0 2px 8px rgba(31, 35, 41, .05);
}
.brand-card .brand-ava {
  width: 34px; height: 34px;
  border-radius: 9px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.brand-card .brand-name {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-card .brand-points {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
  font-family: "DIN Alternate", "Helvetica Neue", sans-serif;
}
.brand-card .brand-points em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 400;
  margin-left: 2px;
}
.quick-grid {
  background: #fff;
  border-radius: 12px;
  margin: 0 16px;
  box-shadow: 0 2px 8px rgba(31, 35, 41, .05);
}
.noti-list { margin: 0 16px; background: #fff; border-radius: 12px; overflow: hidden; }
.noti-item { padding: 12px 14px; border-bottom: 1px solid #f2f3f7; }
.noti-item:last-child { border-bottom: none; }
.noti-title {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.noti-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--income);
  flex: 0 0 auto;
}
.noti-dot.read { background: #d4d7de; }
.noti-content {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.noti-time { font-size: 11px; color: #b0b6c3; margin-top: 4px; }

/* ============ 积分明细 ============ */
.tx-amount { font-weight: 700; font-size: 16px; }
.tx-amount.in { color: var(--income); }
.tx-amount.out { color: var(--expense); }
.tx-desc { font-size: 13px; color: var(--text-main); }
.tx-meta { font-size: 11px; color: var(--text-sub); margin-top: 3px; }
.tx-expire { font-size: 11px; color: #b0b6c3; margin-top: 2px; }

/* ============ 商城 ============ */
.mall-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px 20px;
}
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(31, 35, 41, .05);
  cursor: pointer;
}
.product-cover {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
}
.product-body { padding: 10px 12px 12px; }
.product-name {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.4;
  height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
}
.product-points { color: #ff5722; font-weight: 700; font-size: 15px; }
.product-points em { font-style: normal; font-size: 11px; }
.product-stock { font-size: 11px; color: var(--text-sub); }

.detail-desc-block {
  background: #fff;
  border-radius: 12px;
  margin: 12px 16px 0;
  padding: 14px 16px;
}
.detail-desc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}
.detail-desc-text { font-size: 13px; color: #4e5561; line-height: 1.7; white-space: pre-wrap; }
.detail-hero {
  max-width: 480px;
  margin: 0 auto;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
}
.detail-points-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 16px 0;
}
.detail-points { color: #ff5722; font-size: 24px; font-weight: 700; }
.detail-points em { font-style: normal; font-size: 12px; }
.detail-stock { font-size: 12px; color: var(--text-sub); }
.detail-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: 0 -2px 10px rgba(31, 35, 41, .06);
  z-index: 10;
}
.detail-footer .van-button { width: 100%; }

/* ============ 订单 ============ */
.order-card {
  background: #fff;
  border-radius: 12px;
  margin: 10px 16px 0;
  padding: 13px 14px;
}
.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-no { font-size: 11px; color: var(--text-sub); }
.order-product { font-size: 14px; font-weight: 600; color: var(--text-main); margin: 8px 0 6px; }
.order-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-points { font-size: 13px; color: #ff5722; font-weight: 600; }
.order-time { font-size: 11px; color: #b0b6c3; }
.deduction-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-main);
  padding: 9px 0;
  border-bottom: 1px dashed #eef0f5;
}
.deduction-row:last-child { border-bottom: none; }
.deduction-row .pts { color: #ff5722; font-weight: 600; }

/* ============ 我的 ============ */
.profile-top {
  background: linear-gradient(150deg, #1e3fae 0%, #2563eb 55%, #4f8cf7 100%);
  padding: 30px 20px 30px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-avatar {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600;
  flex: 0 0 auto;
}
.profile-name { font-size: 18px; font-weight: 600; }
.profile-sub { font-size: 12px; opacity: .85; margin-top: 4px; }
.logout-wrap { padding: 24px 16px 10px; }
.logout-wrap .van-button { width: 100%; }
.auth-tag {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.auth-tag.ok { background: #e8f7ef; color: #16a377; }
.auth-tag.pending { background: #fff7e8; color: #e68b0e; }
.auth-tag.rejected { background: #ffeceb; color: #e5484d; }

/* vant 通用微调 */
.van-nav-bar { max-width: 480px; margin: 0 auto; }
.van-tabs--line { max-width: 480px; }
.van-tag--primary { border-radius: 4px; }
.empty-box { padding: 60px 0; }

/* 登录页演示账号提示 */
.demo-hint { margin: 0 16px; padding: 10px 14px; background: #fff7e6; border: 1px dashed #ffd591; border-radius: 10px; }
.demo-hint-title { font-size: 12px; font-weight: 600; color: #d46b08; margin-bottom: 4px; }
.demo-hint-row { font-size: 12px; color: #874d00; line-height: 1.7; }
