:root {
  --fx-bg: #f6f1e8;
  --fx-paper: #fffdf8;
  --fx-ink: #1c1917;
  --fx-mute: #78716c;
  --fx-line: #e7e0d4;
  --fx-sky: #3d8bcc;
  --fx-mint: #3fa89a;
  --fx-coral: #e25b4c;
  --fx-gold: #d4a017;
  --fx-dock: 72px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--fx-bg);
  color: var(--fx-ink);
}
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
.fx-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--fx-dock) + 18px);
  position: relative;
}
.fx-hero {
  background: linear-gradient(160deg, #d9eef7 0%, #f6f1e8 62%);
  padding: 22px 18px 48px;
  position: relative;
}
.fx-hero:after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 28px;
  background: var(--fx-bg);
  border-radius: 28px 28px 0 0;
}
.fx-hero .hi { font-size: 13px; color: #5b7c8a; margin: 0 0 4px; }
.fx-hero h1 { margin: 0; font-size: 24px; font-weight: 750; letter-spacing: .02em; }
.fx-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  margin-top: 12px; background: #fff; border-radius: 999px;
  padding: 6px 12px 6px 10px; font-size: 12px; color: var(--fx-mute);
  box-shadow: 0 6px 18px rgba(61,139,204,.12);
}
.fx-chip b { color: var(--fx-ink); font-size: 15px; }
.fx-search {
  position: relative; margin: -18px 16px 14px; z-index: 2;
}
.fx-search input {
  width: 100%; height: 46px; border: 0; border-radius: 16px;
  padding: 0 14px 0 42px; background: var(--fx-paper);
  box-shadow: 0 10px 30px rgba(28,25,23,.06);
  font-size: 14px;
}
.fx-search i { position: absolute; left: 14px; top: 14px; color: #a8a29e; }
.fx-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 0 16px 12px;
}
.fx-tiles a {
  background: var(--fx-paper); border-radius: 14px; text-align: center;
  padding: 10px 4px 8px; font-size: 12px; color: #57534e;
}
.fx-tiles a.on { background: #1c1917; color: #fff; }
.fx-tiles a i { display: block; font-size: 18px; margin-bottom: 4px; color: var(--fx-sky); }
.fx-tiles a.on i { color: #fff; }
.fx-note {
  margin: 0 16px 14px; padding: 10px 12px; border-radius: 12px;
  background: #fff6d8; color: #7a5b12; font-size: 13px;
}
.fx-stream { padding: 0 16px 8px; display: flex; flex-direction: column; gap: 12px; }
.fx-goods {
  display: grid; grid-template-columns: 112px 1fr; gap: 12px;
  background: var(--fx-paper); border-radius: 18px; overflow: hidden;
  padding: 10px;
}
.fx-goods img {
  width: 112px; height: 112px; object-fit: cover; border-radius: 12px; background: #eee;
}
.fx-goods .name { font-size: 15px; font-weight: 650; line-height: 1.4; max-height: 42px; overflow: hidden; }
.fx-goods .meta { margin-top: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.fx-goods .price { color: var(--fx-coral); font-weight: 800; font-size: 18px; }
.fx-goods .price small { font-size: 12px; font-weight: 600; }
.fx-act { display: flex; gap: 8px; }
.fx-buy {
  border: 0; background: var(--fx-ink); color: #fff; height: 32px;
  padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 650;
}
.fx-buy[disabled] { background: #d6d3d1; }
.fx-add {
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: #e8f4fb; color: var(--fx-sky);
}
.fx-empty { text-align: center; padding: 70px 20px; color: var(--fx-mute); }
.fx-empty i { font-size: 42px; display: block; margin-bottom: 10px; color: #d6d3d1; }
.fx-dock {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
  width: min(420px, calc(100% - 28px));
  height: 58px; border-radius: 20px;
  background: #1c1917; color: #a8a29e;
  display: flex; align-items: center; justify-content: space-around;
  z-index: 40; box-shadow: 0 14px 40px rgba(28,25,23,.28);
}
.fx-dock a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; color: #a8a29e;
}
.fx-dock a.on { color: #fff; }
.fx-dock a.on i { background: var(--fx-sky); color: #fff; }
.fx-dock i {
  width: 28px; height: 28px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.fx-badge {
  position: absolute; top: -5px; right: -8px; min-width: 16px; height: 16px;
  padding: 0 4px; background: var(--fx-coral); color: #fff; border-radius: 99px;
  font-size: 10px; display: none; align-items: center; justify-content: center;
}

.fx-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 8px;
}
.fx-bar h1 { margin: 0; font-size: 22px; }
.fx-ghost {
  width: 36px; height: 36px; border-radius: 12px; background: var(--fx-paper);
  display: flex; align-items: center; justify-content: center; color: var(--fx-ink);
}
.fx-receipt { padding: 8px 16px 90px; }
.fx-row {
  display: grid; grid-template-columns: 86px 1fr; gap: 12px;
  background: var(--fx-paper); border-radius: 16px; padding: 12px; margin-bottom: 10px;
  border-bottom: 1px dashed var(--fx-line);
}
.fx-row img { width: 86px; height: 86px; object-fit: cover; border-radius: 12px; }
.fx-qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.fx-qty button {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--fx-line);
  background: #fff;
}
.fx-qty input {
  width: 36px; height: 26px; text-align: center; border: 0; background: transparent; font-size: 14px;
}
.fx-paybar {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  width: min(420px, calc(100% - 28px));
  background: var(--fx-paper); border-radius: 18px; padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 10px 30px rgba(28,25,23,.12); z-index: 30;
}
.fx-paybar .sum { font-size: 13px; color: var(--fx-mute); }
.fx-paybar b { display: block; font-size: 20px; color: var(--fx-coral); }
.fx-paybar button {
  border: 0; background: var(--fx-mint); color: #fff; height: 40px;
  padding: 0 18px; border-radius: 12px; font-weight: 700;
}

.fx-time { padding: 8px 18px 20px; position: relative; }
.fx-time:before {
  content: ""; position: absolute; left: 26px; top: 8px; bottom: 20px;
  width: 2px; background: #eadfce;
}
.fx-bill {
  position: relative; margin: 0 0 14px 22px;
  background: var(--fx-paper); border-radius: 16px; padding: 14px;
}
.fx-bill:before {
  content: ""; position: absolute; left: -20px; top: 18px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--fx-sky);
  box-shadow: 0 0 0 4px #d9eef7;
}
.fx-bill .no { font-size: 12px; color: var(--fx-mute); }
.fx-bill .amt { font-size: 20px; font-weight: 800; margin: 6px 0; }
.fx-bill .go {
  display: inline-flex; margin-top: 8px; background: var(--fx-ink); color: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: 12px;
}

.fx-auth { min-height: 100vh; background: var(--fx-bg); }
.fx-auth-top {
  background: linear-gradient(180deg, #8ecae6 0%, #f6f1e8 100%);
  padding: 48px 24px 64px;
}
.fx-auth-top h1 { margin: 8px 0 4px; font-size: 28px; }
.fx-auth-top p { margin: 0; color: #4b6b78; font-size: 14px; }
.fx-sheet {
  margin: -40px 16px 24px; background: var(--fx-paper);
  border-radius: 24px; padding: 22px 18px 28px;
  box-shadow: 0 16px 40px rgba(28,25,23,.08);
}
.fx-switch { display: flex; background: #f3eee4; border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.fx-switch button {
  flex: 1; height: 38px; border: 0; background: transparent; border-radius: 12px; font-weight: 700; color: var(--fx-mute);
}
.fx-switch button.on { background: #fff; color: var(--fx-ink); }
.fx-field { margin-bottom: 14px; }
.fx-field label { display: block; font-size: 12px; color: var(--fx-mute); margin-bottom: 6px; }
.fx-field input, .fx-field .form-control {
  width: 100%; height: 46px; border: 1px solid var(--fx-line); border-radius: 12px;
  padding: 0 12px; background: #fff; font-size: 15px;
}
.fx-submit {
  width: 100%; height: 46px; border: 0; border-radius: 14px;
  background: var(--fx-sky); color: #fff; font-size: 16px; font-weight: 700;
}
.fx-upload {
  display: block; border: 1px dashed #c8ddd8; border-radius: 16px;
  padding: 18px; text-align: center; background: #f7fbfa; color: var(--fx-mute);
}
.fx-check {
  display: block; text-align: center; margin: 18px; color: #4b6b78; font-size: 14px;
}

.fx-pick { padding: 12px 16px 28px; }
.fx-pick-amt {
  background: #1c1917; color: #fff; border-radius: 18px; padding: 16px;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.fx-pick-amt .lab { font-size: 12px; color: #a8a29e; }
.fx-pick-amt b { font-size: 26px; }
.fx-choice {
  display: flex; align-items: center; gap: 12px;
  background: var(--fx-paper); border-radius: 16px; padding: 12px; margin-bottom: 8px;
}
.fx-choice .ico {
  width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; flex: none;
}
.fx-choice .name { font-weight: 750; }
.fx-choice .sub { font-size: 12px; color: var(--fx-mute); }

.bg-dache { background: #FF7D00; }
.bg-yu { background: #FFE60F; color: #222; }
.bg-dou { background: #161823; }
.bg-eleme { background: #0087FF; }
.bg-taobao { background: #FF5000; }
.bg-taobao-light { background: #E91E8C; }
.bg-jd { background: #E1251B; }
.bg-pdd { background: #FF5777; }
.bg-dewu { background: #111111; }
.bg-ctrip { background: #2577E3; }
.bg-ctrip-hotel { background: #00B578; }
.bg-fliggy { background: #FF6A00; }
.bg-maoyan { background: #EF4238; }
.bg-didi-green { background: #29C378; }
.bg-weidian { background: #2B6DE5; }
.bg-suning { background: #FFAA00; }
.bg-secondary { background: #9AA0A6; }

.app-container {
  max-width: 480px; margin: 0 auto; min-height: 100vh;
  background: var(--fx-bg); padding-bottom: calc(var(--fx-dock) + 12px);
}
.top-header, .page-header {
  padding: 16px 18px 8px; background: transparent;
  display: flex; align-items: center; gap: 10px;
}
.header-title, .page-title { margin: 0; font-size: 22px; font-weight: 750; }
.back-btn {
  width: 36px; height: 36px; border-radius: 12px; background: var(--fx-paper);
  display: flex; align-items: center; justify-content: center; color: var(--fx-ink);
}
.user-card {
  margin: 8px 16px 14px; background: linear-gradient(135deg, #3fa89a, #3d8bcc);
  color: #fff; border-radius: 22px; padding: 18px;
}
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,.5); }
.user-name { font-size: 20px; font-weight: 750; }
.user-id { font-size: 12px; opacity: .85; }
.balance-section { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 16px; }
.balance-label { font-size: 12px; opacity: .85; }
.balance-amount { font-size: 28px; font-weight: 800; }
.btn-withdraw {
  background: #fff; color: #1c1917; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700;
}
.main-content { padding: 0 16px 20px; }
.stats-grid {
  display: flex; background: var(--fx-paper); border-radius: 18px; overflow: hidden; margin-bottom: 16px;
}
.stat-card { flex: 1; text-align: center; padding: 14px 8px; }
.stat-card + .stat-card { border-left: 1px solid var(--fx-line); }
.stat-value { font-size: 16px; font-weight: 800; }
.stat-label { font-size: 11px; color: var(--fx-mute); margin-top: 4px; }
.menu-section { margin-bottom: 16px; }
.menu-title { font-size: 13px; color: var(--fx-mute); margin: 0 4px 8px; }
.menu-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.menu-item {
  background: var(--fx-paper); border-radius: 16px; padding: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.menu-item-content { display: flex; align-items: center; gap: 10px; }
.menu-icon {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff;
}
.menu-icon-primary { background: var(--fx-sky); }
.menu-icon-secondary { background: var(--fx-mint); }
.menu-icon-accent { background: var(--fx-gold); }
.menu-arrow { color: #d6d3d1; }
.logout-section { padding: 8px 0 20px; }
.btn-logout, .btn-primary {
  width: 100%; height: 44px; border: 0; border-radius: 14px;
  background: var(--fx-ink); color: #fff; font-weight: 700;
}
.btn-primary { background: var(--fx-sky); }
.bottom-nav {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
  width: min(420px, calc(100% - 28px)); height: 58px; border-radius: 20px;
  background: #1c1917; display: flex; z-index: 40;
  box-shadow: 0 14px 40px rgba(28,25,23,.28);
}
.nav-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: #a8a29e; font-size: 10px;
}
.nav-tab.active { color: #fff; }
.nav-tab-icon { font-size: 16px; }
.content-card, .pending-card {
  background: var(--fx-paper); border-radius: 16px; padding: 14px; margin-bottom: 12px;
}
.form-label { font-size: 12px; color: var(--fx-mute); }
.form-control {
  width: 100%; height: 44px; border: 1px solid var(--fx-line); border-radius: 12px; padding: 0 12px;
}
.form-group { margin-bottom: 12px; }
.agent-item, .pending-item {
  background: var(--fx-paper); border-radius: 14px; padding: 12px; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.empty-cart, .empty-orders { text-align: center; padding: 70px 20px; color: var(--fx-mute); }
.empty-icon { font-size: 42px; display: block; margin-bottom: 8px; color: #d6d3d1; }
.status-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #fff6d8; color: #7a5b12; }
.header-actions .btn-icon, .btn-icon {
  width: 36px; height: 36px; border-radius: 12px; background: var(--fx-paper);
  display: inline-flex; align-items: center; justify-content: center; color: var(--fx-ink);
}
.header-content { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.cart-list, .order-list { padding: 0; }
.cart-item { background: var(--fx-paper); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.item-content, .order-item { display: flex; gap: 12px; }
.item-image { width: 80px; height: 80px; object-fit: cover; border-radius: 12px; }
.item-name { font-weight: 650; }
.item-price { color: var(--fx-coral); font-weight: 700; margin-top: 4px; }
.quantity-control { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.qty-btn { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--fx-line); background: #fff; }
.qty-input { width: 36px; text-align: center; border: 0; }
.remove-btn { color: var(--fx-coral); font-size: 13px; }
.checkout-bar {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  width: min(420px, calc(100% - 28px)); background: var(--fx-paper);
  border-radius: 18px; padding: 12px 14px; z-index: 30;
  box-shadow: 0 10px 30px rgba(28,25,23,.12);
}
.checkout-content { display: flex; align-items: center; justify-content: space-between; }
.total-amount { font-size: 20px; font-weight: 800; color: var(--fx-coral); }
.checkout-btn {
  border: 0; background: var(--fx-mint); color: #fff; height: 40px; padding: 0 18px;
  border-radius: 12px; font-weight: 700;
}
.order-card { background: var(--fx-paper); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.order-header-content { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--fx-mute); }
.order-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.btn { padding: 6px 12px; border-radius: 999px; font-size: 12px; }
.btn-secondary { background: var(--fx-ink); color: #fff; }
.btn-outline { border: 1px solid var(--fx-line); color: var(--fx-mute); }
.modal-content { border-radius: 18px; border: 0; }
body, html { overflow: auto !important; height: auto !important; }
