/* 小白通宝 - 支付宝风格完整版 */
:root {
  --blue: #1677ff;
  --blue-dark: #0958d9;
  --blue-light: #e6f4ff;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #333333;
  --text-secondary: #999999;
  --text-light: #666666;
  --border: #f0f0f0;
  --gold: #d4a017;
  --orange: #ff6a00;
  --green: #52c41a;
  --red: #ff4d4f;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 56px;
  --status-height: 44px;
  --max-width: 430px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #dfe8f5;
  color: var(--text);
  line-height: 1.4;
  overflow: hidden;
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }

.app {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* ===== 状态栏 ===== */
.status-bar {
  height: var(--status-height);
  padding: 12px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  z-index: 200;
  pointer-events: none;
}

.status-bar { color: var(--text); }
.status-bar .battery { border-color: var(--text); }
.status-bar .battery-level { background: var(--text); }
.status-bar .battery.low .battery-level { background: var(--red); }

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon-signal, .icon-wifi { width: 16px; height: 16px; }

.battery {
  width: 24px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  position: relative;
  padding: 1px;
}

.battery::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 2px;
  height: 4px;
  background: currentColor;
  border-radius: 0 1px 1px 0;
}

.battery-level {
  width: 20%;
  height: 100%;
  background: currentColor;
  border-radius: 1px;
}

/* ===== 页面容器 ===== */
.page {
  display: none;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
  scrollbar-width: none;
}

.page::-webkit-scrollbar { display: none; }
.page.active { display: block; }

.page-home { padding-top: 0; background: var(--bg); }
.page-wealth, .page-offers, .page-messages, .page-profile {
  padding-top: calc(var(--status-height) + 8px);
  background: linear-gradient(180deg, #e8f0fe 0%, var(--bg) 120px);
}

/* ===== 首页头部 ===== */
.home-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(var(--status-height) + 4px) 12px 10px;
  background: #fff;
}

.location {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.icon-chevron { width: 12px; height: 12px; color: var(--text-light); }

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 20px;
  padding: 0 12px;
  height: 36px;
  min-width: 0;
}

.search-icon { width: 16px; height: 16px; color: #bbb; flex-shrink: 0; }

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  padding: 0 8px;
  outline: none;
  min-width: 0;
  color: var(--text);
}

.search-bar input::placeholder { color: #bbb; }

.search-divider {
  width: 1px;
  height: 16px;
  background: #ddd;
  margin: 0 4px;
}

.search-btn {
  font-size: 14px;
  color: var(--blue);
  font-weight: 500;
  white-space: nowrap;
}

.plus-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.plus-btn svg { width: 18px; height: 18px; color: var(--text); }

/* ===== Hero 区域 ===== */
.hero {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(22,119,255,.85) 0%, rgba(9,88,217,.75) 50%, rgba(64,150,255,.6) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 400'%3E%3Cdefs%3E%3ClinearGradient id='sky' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%231677ff'/%3E%3Cstop offset='100%25' stop-color='%230958d9'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect fill='url(%23sky)' width='800' height='400'/%3E%3Cpolygon fill='%23ffffff15' points='0,280 200,180 400,250 600,150 800,220 800,400 0,400'/%3E%3Crect x='620' y='80' width='30' height='200' fill='%23ffffff20' rx='2'/%3E%3Crect x='655' y='100' width='25' height='180' fill='%23ffffff18' rx='2'/%3E%3Crect x='685' y='120' width='20' height='160' fill='%23ffffff15' rx='2'/%3E%3Cpath d='M100 180 Q400 80 700 160 L720 140 Q400 50 80 160 Z' fill='%23ffffff25'/%3E%3C/svg%3E") center/cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px 20px;
}

.hero-actions {
  display: flex;
  justify-content: space-around;
  padding-top: 8px;
}

.hero-action,
.service-item,
.list-row,
.grid-item,
.wealth-item,
.product-item,
[data-nav] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hero-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
}

.hero-action:active,
.service-item:active,
.list-row:active {
  opacity: 0.75;
}

.hero-action-icon {
  width: 52px;
  height: 52px;
  position: relative;
}

.hero-action-icon svg { width: 100%; height: 100%; color: #fff; }

.badge-dot::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.8);
}

.hero-welcome {
  text-align: right;
  font-size: 22px;
  font-weight: 300;
  color: rgba(255,255,255,.95);
  letter-spacing: 2px;
  font-style: italic;
  padding-right: 8px;
}

/* ===== 服务网格 ===== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px 4px;
  padding: 16px 12px 8px;
  background: #fff;
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text);
}

.svc-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svc-icon svg { width: 28px; height: 28px; }

.svc-icon.c1 { background: linear-gradient(135deg, #6366f1, #818cf8); }
.svc-icon.c2 { background: linear-gradient(135deg, #1677ff, #4096ff); }
.svc-icon.c3 { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.svc-icon.c4 { background: linear-gradient(135deg, #0284c7, #0ea5e9); }
.svc-icon.c5 { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.svc-icon.c6 { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.svc-icon.c7 { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.svc-icon.c8 { background: linear-gradient(135deg, #0369a1, #0284c7); }
.svc-icon.c9 { background: linear-gradient(135deg, #1677ff, #69b1ff); }
.svc-icon.c10.ai {
  background: linear-gradient(135deg, #ec4899, #f472b6);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

/* ===== 区域 Tab ===== */
.region-tabs {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 12px 0 8px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.region-tab {
  font-size: 15px;
  color: var(--text-light);
  padding-bottom: 8px;
  position: relative;
}

.region-tab.active {
  color: var(--blue);
  font-weight: 600;
}

.region-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
}

/* ===== 卡片通用 ===== */
.card {
  background: var(--card);
  border-radius: 0;
  margin: 10px 0;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
}

.card-more {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-more .dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
}

/* ===== 消息卡片 ===== */
.messages-card { margin-top: 0; }

.msg-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.msg-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.msg-icon.orange { background: linear-gradient(135deg, #ff8c00, #ff6a00); }
.msg-icon.blue { background: linear-gradient(135deg, #1677ff, #4096ff); }

.msg-body { flex: 1; min-width: 0; }

.msg-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

.msg-desc {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-time {
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===== Banner 轮播 ===== */
.banner-carousel {
  margin: 10px 0 16px;
  position: relative;
}

.banner-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0;
}

.banner-track::-webkit-scrollbar { display: none; }

.banner-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  border-radius: 0;
  height: 120px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.banner-slide.primary {
  background: linear-gradient(135deg, #69b1ff 0%, #1677ff 60%, #0958d9 100%);
}

.banner-slide.secondary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.banner-text {
  padding: 16px 20px;
  color: #fff;
  z-index: 2;
}

.banner-tag {
  font-size: 11px;
  opacity: .85;
  margin-bottom: 4px;
}

.banner-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.banner-sub {
  font-size: 14px;
  opacity: .9;
  margin-top: 2px;
}

.banner-illus {
  position: absolute;
  right: 10px;
  bottom: 0;
  width: 120px;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100'%3E%3Cellipse cx='60' cy='90' rx='50' ry='8' fill='%2300000020'/%3E%3Ccircle cx='55' cy='35' r='18' fill='%23ffd6e7'/%3E%3Cpath d='M37 35 Q55 15 73 35' fill='%239333ea'/%3E%3Crect x='42' y='50' width='26' height='35' rx='8' fill='%23ff85c0'/%3E%3Crect x='35' y='60' width='12' height='18' rx='3' fill='%23ff4d9e'/%3E%3Crect x='63' y='58' width='14' height='20' rx='3' fill='%23eb2f96'/%3E%3C/svg%3E") no-repeat center/contain;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.banner-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9d9d9;
}

.banner-dots .dot.active {
  background: var(--blue);
  width: 16px;
  border-radius: 3px;
}

/* ===== 子页面头部 ===== */
.sub-header {
  padding: 8px 16px 16px;
}

.sub-header h1 {
  font-size: 22px;
  font-weight: 700;
}

/* ===== 理财页 ===== */
.wealth-summary {
  text-align: center;
  padding: 24px 16px;
}

.wealth-label { font-size: 14px; color: var(--text-light); }

.wealth-amount {
  font-size: 36px;
  font-weight: 700;
  margin: 8px 0;
  letter-spacing: -1px;
}

.wealth-yesterday { font-size: 13px; color: var(--text-secondary); }
.green { color: var(--green); }

.wealth-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px 12px 16px;
}

.wealth-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.wealth-item em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-secondary);
}

.w-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.w-icon.yeb { background: linear-gradient(135deg, #ff8c00, #ff6a00); }
.w-icon.fund { background: linear-gradient(135deg, #1677ff, #4096ff); }
.w-icon.gold { background: linear-gradient(135deg, #faad14, #ffc53d); }
.w-icon.stock { background: linear-gradient(135deg, #52c41a, #73d13d); }

.product-list { padding: 0 16px 12px; }

.product-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.product-info strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.product-info span {
  font-size: 12px;
  color: var(--text-secondary);
}

.product-rate {
  font-size: 24px;
  font-weight: 700;
  color: var(--red);
}

.product-rate span { font-size: 14px; }

/* ===== 优惠页 ===== */
.offer-banner-inner {
  background: linear-gradient(135deg, #ff6a00, #ff8c00);
  border-radius: 12px;
  padding: 20px;
  color: #fff;
}

.offer-tag { font-size: 12px; opacity: .85; }
.offer-title { font-size: 22px; font-weight: 700; margin: 4px 0; }
.offer-desc { font-size: 14px; opacity: .9; }

.offer-list { padding: 0 16px 8px; }

.offer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.offer-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1677ff, #4096ff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.offer-icon.red { background: linear-gradient(135deg, #ff4d4f, #ff7875); }
.offer-icon.green { background: linear-gradient(135deg, #52c41a, #73d13d); }

.offer-body { flex: 1; min-width: 0; }
.offer-body strong { display: block; font-size: 15px; margin-bottom: 2px; }
.offer-body span { font-size: 12px; color: var(--text-secondary); }

.offer-btn {
  padding: 6px 14px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}

/* ===== 消息页 ===== */
.msg-list-full { padding: 0; }

.msg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 0;
  padding: 14px 16px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.msg-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.msg-avatar.orange { background: linear-gradient(135deg, #ff8c00, #ff6a00); }
.msg-avatar.blue { background: linear-gradient(135deg, #1677ff, #4096ff); }
.msg-avatar.purple { background: linear-gradient(135deg, #722ed1, #9254de); }
.msg-avatar.teal { background: linear-gradient(135deg, #13c2c2, #36cfc9); }

.msg-content { flex: 1; min-width: 0; }

.msg-row-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.msg-name { font-size: 15px; font-weight: 500; }
.msg-preview { font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.unread-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== 我的页面 ===== */
.page-profile {
  background: linear-gradient(180deg, #dce8f8 0%, var(--bg) 180px);
}

.profile-header {
  padding: calc(var(--status-height) + 4px) 16px 16px;
}

.profile-top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 12px;
}

.profile-top-actions button {
  width: 28px;
  height: 28px;
  color: var(--text-light);
}

.profile-top-actions svg { width: 100%; height: 100%; }

.profile-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e8e8e8;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-info { flex: 1; min-width: 0; }

.profile-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.profile-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
}

.badge-id {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 10px;
}

.arrow {
  color: #ccc;
  font-size: 20px;
  flex-shrink: 0;
}

/* 列表卡片 */
.list-card { padding: 0; }

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.list-row:last-child { border-bottom: none; }

.list-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.list-icon.member { background: linear-gradient(135deg, #1677ff, #4096ff); }
.list-icon.shop { background: linear-gradient(135deg, #1677ff, #69b1ff); }
.list-icon.bill { background: linear-gradient(135deg, #ff8c00, #ff6a00); }
.list-icon.asset { background: linear-gradient(135deg, #1677ff, #4096ff); }
.list-icon.balance { background: linear-gradient(135deg, #1677ff, #69b1ff); }
.list-icon.yeb { background: linear-gradient(135deg, #ff8c00, #ffa940); }
.list-icon.hb { background: linear-gradient(135deg, #1677ff, #597ef7); }
.list-icon.setting { background: #999; }
.list-icon.help { background: #52c41a; }
.list-icon.about { background: #722ed1; }
.list-icon.admin { background: linear-gradient(135deg, #1677ff, #0958d9); }

.list-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-right: 4px;
}

/* ===== 管理后台内嵌页 ===== */
.page-admin {
  padding-top: 0;
  padding-bottom: 0;
  display: none;
  flex-direction: column;
  background: #fff;
  height: 100dvh;
  overflow: hidden;
}

.page-admin.active {
  display: flex;
}

.admin-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--status-height) + 4px) 12px 10px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.admin-back {
  font-size: 16px;
  color: var(--blue);
  min-width: 64px;
  text-align: left;
}

.admin-title {
  font-size: 16px;
  font-weight: 600;
}

.admin-open {
  font-size: 14px;
  color: var(--blue);
  min-width: 64px;
  text-align: right;
}

.admin-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #f5f7fa;
}

.bottom-nav.hidden {
  display: none;
}

/* ===== 退出登录 ===== */
.logout-row {
  width: 100%;
  text-align: left;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
}

.logout-text {
  color: var(--red);
  font-weight: 500;
}

.list-icon.logout {
  background: linear-gradient(135deg, #ff7875, #ff4d4f);
}

.profile-user.guest .profile-name {
  color: var(--blue);
}

.profile-user.guest .profile-phone span:first-child {
  color: var(--text-secondary);
}

.hidden-user .requires-login {
  opacity: 0.45;
  pointer-events: none;
}

/* ===== 登录弹窗 ===== */
.login-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.login-mask .login-sheet {
  max-width: var(--max-width);
  margin: 0 auto;
}

.login-mask.hidden {
  display: none;
}

.login-sheet {
  width: 100%;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 0 0 calc(16px + var(--safe-bottom));
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  font-weight: 600;
}

.login-close {
  font-size: 28px;
  line-height: 1;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
}

.login-body {
  padding: 20px;
}

.login-field {
  display: block;
  margin-bottom: 16px;
}

.login-field span {
  display: block;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.login-field input {
  width: 100%;
  height: 44px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 16px;
  outline: none;
}

.login-field input:focus {
  border-color: var(--blue);
}

.login-submit {
  width: 100%;
  height: 48px;
  background: var(--blue);
  color: #fff;
  border-radius: 24px;
  font-size: 17px;
  font-weight: 600;
  margin-top: 8px;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.toast.show {
  opacity: 1;
}

.list-label {
  flex: 1;
  font-size: 16px;
}

.list-badge.gold {
  font-size: 12px;
  color: var(--gold);
  font-weight: 500;
}

/* 网格卡片 */
.grid-card { padding: 14px 8px 16px; }

.section-title {
  font-size: 16px;
  font-weight: 600;
  padding: 0 8px 12px;
}

.icon-grid {
  display: grid;
  gap: 16px 4px;
}

.icon-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
}

.g-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.g-icon.i1 { background: linear-gradient(135deg, #1677ff, #4096ff); }
.g-icon.i2 { background: linear-gradient(135deg, #1677ff, #597ef7); }
.g-icon.i3 { background: linear-gradient(135deg, #0958d9, #1677ff); }
.g-icon.i4 { background: linear-gradient(135deg, #ff8c00, #ffa940); }
.g-icon.i5 { background: linear-gradient(135deg, #13c2c2, #36cfc9); }
.g-icon.i6 { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.g-icon.i7 { background: linear-gradient(135deg, #1677ff, #69b1ff); }
.g-icon.i8 { background: linear-gradient(135deg, #ff6a00, #ff8c00); }
.g-icon.m1 { background: linear-gradient(135deg, #1677ff, #4096ff); }
.g-icon.m2 { background: linear-gradient(135deg, #1677ff, #597ef7); }
.g-icon.m3 { background: linear-gradient(135deg, #0958d9, #1677ff); }
.g-icon.m4 { background: linear-gradient(135deg, #1677ff, #69b1ff); }

/* ===== 底部导航 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--border);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  padding: 4px 0;
  color: var(--text-secondary);
  font-size: 10px;
  position: relative;
}

.nav-item.active { color: var(--blue); }

.nav-icon {
  width: 28px;
  height: 28px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg { width: 26px; height: 26px; }

.nav-icon.home-icon svg { width: 32px; height: 32px; }

.nav-icon.badge .nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ===== 首页状态栏透明覆盖 ===== */
.page-home.active ~ .status-bar,
.page-home.active .status-bar { /* handled above */ }


/* ===== 响应式 ===== */
@media (min-width: 431px) {
  body { display: flex; justify-content: center; align-items: flex-start; min-height: 100dvh; padding: 20px 0; background: #dfe8f5; }
  .app { min-height: calc(100dvh - 40px); border-radius: 24px; overflow: hidden; box-shadow: 0 0 40px rgba(0,0,0,.12); }
}

.hidden { display: none !important; }

/* ===== 子页面 ===== */
.sub-page {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: 100dvh;
  background: var(--bg);
  z-index: 400;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--safe-bottom) + 20px);
}

.sub-page.active { display: block; }

.sub-page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(var(--status-height) + 4px) 12px 12px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.sub-back {
  width: 36px;
  height: 36px;
  font-size: 28px;
  line-height: 1;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sub-page-header h1 {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  margin-right: 36px;
}

.sub-page-body {
  padding: 16px;
}

.form-block label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin: 12px 0 6px;
}

.form-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
  background: #fff;
}

.form-input:focus { border-color: var(--blue); }

.btn-primary, .btn-outline {
  display: block;
  width: 100%;
  margin-top: 16px;
  height: 44px;
  border-radius: 22px;
  font-size: 16px;
  font-weight: 500;
}

.btn-primary { background: var(--blue); color: #fff; }
.btn-outline { background: #fff; color: var(--blue); border: 1px solid var(--blue); }

.big-num {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin: 24px 0 8px;
}

.big-num small { font-size: 18px; font-weight: 500; }

.intro, .empty, .page-h2 {
  color: var(--text-light);
  font-size: 14px;
  text-align: center;
  margin: 8px 0 16px;
}

.page-h2 { font-size: 20px; color: var(--text); font-weight: 600; }

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.detail-row.clickable { cursor: pointer; }
.detail-row .v { color: var(--text-secondary); }

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 14px;
}

.chip.active { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.menu-cell {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  font-size: 15px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.scan-box {
  background: #111;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  color: #fff;
  margin-bottom: 16px;
}

.scan-frame {
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  border: 2px solid rgba(255,255,255,.6);
  border-radius: 8px;
}

.pkg-list { list-style: none; }

.pkg-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 15px;
}

.bill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.bill-row strong { display: block; font-size: 15px; }
.bill-row span { font-size: 12px; color: var(--text-secondary); }
.bill-row em { font-style: normal; font-size: 16px; font-weight: 600; color: var(--text); }
.bill-row em.income { color: var(--green); }

.card-item {
  background: linear-gradient(135deg, #1677ff, #0958d9);
  color: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  font-size: 16px;
}

.chat-box {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  min-height: 200px;
  margin-bottom: 12px;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 14px;
}

.chat-bubble.bot { background: #f0f0f0; }
.chat-bubble.user { background: var(--blue-light); margin-left: auto; }

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex: 1;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 14px;
  outline: none;
}

.chat-input-row button {
  padding: 0 16px;
  background: var(--blue);
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
}

.result-box {
  background: var(--blue-light);
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--blue);
  margin: 8px 0;
}

.faq details {
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin-top: 8px; font-size: 14px; color: var(--text-light); }

.msg-detail h3 { font-size: 18px; margin-bottom: 12px; }
.msg-detail p { font-size: 15px; line-height: 1.6; color: var(--text-light); }

.offer-btn:disabled { opacity: 0.5; }

.wealth-summary[data-nav],
.product-item[data-nav],
.banner-slide[data-nav],
.offer-banner[data-nav],
.msg-item[data-nav],
.msg-row[data-nav] {
  cursor: pointer;
}

.wealth-summary[data-nav]:active,
.product-item[data-nav]:active {
  opacity: 0.85;
}

@media (max-width: 360px) {
  .service-item { font-size: 10px; }
  .svc-icon { width: 36px; height: 36px; }
  .hero-welcome { font-size: 18px; }
}
