:root {
  --wallet-bg: #070806;
  --wallet-panel: #14130e;
  --wallet-line: rgba(212, 175, 55, .3);
  --wallet-gold: #e8c56a;
  --wallet-gold-soft: #f3dfa2;
  --wallet-text: #efe7d2;
  --wallet-muted: #9d947d;
  --wallet-green: #6ee7a0;
  --wallet-red: #ff9a9a;
  --wallet-primary-bg: linear-gradient(180deg, #f3d77f, #b88b2e);
  --wallet-primary-border: #e3c66f;
  --wallet-secondary-bg: #171812;
  --wallet-secondary-border: #4a4028;
  --wallet-secondary-color: #d9c68f;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.wallet-page {
  min-height: 100vh;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  background: #11130f;
  color: var(--wallet-text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
}
.wallet-header {
  position: relative;
  z-index: 1;
  width: min(460px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(212, 175, 55, .2);
}
.wallet-brand { display: flex; align-items: center; gap: 9px; color: var(--wallet-gold-soft); text-decoration: none; font-size: 13px; letter-spacing: .08em; }
.wallet-brand span { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #b99b55; border-radius: 50%; color: var(--wallet-gold); font: 18px Georgia, serif; }
.wallet-nav { display: flex; gap: 14px; align-items: center; }
.wallet-nav a { color: #cdbb88; text-decoration: none; font-size: 12px; }
.wallet-nav a:hover { color: #ffe9a8; }
.wallet-main { position: relative; z-index: 1; width: min(460px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 70px; }
.wallet-hero { margin: 16px 0 18px; }
.wallet-kicker { color: #b79a52; font-size: 9px; letter-spacing: .24em; }
.wallet-hero h1 { margin: 7px 0 7px; font: 500 27px/1.25 Georgia, "Microsoft YaHei", serif; color: #ffe7a4; }
.wallet-hero p { margin: 0; color: var(--wallet-muted); font-size: 12px; line-height: 1.7; }
.wallet-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(212, 175, 55, .45);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 90% 20%, rgba(232, 197, 106, .16), transparent 45%),
    linear-gradient(135deg, #211a0c, #0d0d09 62%, #17130b);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 239, 172, .12);
}
.wallet-balance-label { display: block; color: #b7a67e; font-size: 10px; letter-spacing: .16em; }
.wallet-balance-value { display: block; margin-top: 6px; color: #ffe7a4; font: 600 32px/1.1 Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
.wallet-balance-unit { margin-left: 5px; color: #b7a67e; font-size: 11px; }
.wallet-member { color: #cdbb88; font-size: 11px; text-align: right; }
.wallet-member b { display: block; color: #f1dfaa; font-size: 13px; margin-bottom: 4px; }
.wallet-link { color: #e8c56a; font-size: 11px; text-decoration: none; white-space: nowrap; }
.wallet-link:hover { color: #fff0bd; }
.wallet-card {
  margin-top: 16px;
  padding: 20px 22px;
  border: 1px solid rgba(212, 175, 55, .22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 19, 14, .96), rgba(7, 8, 6, .96));
  box-shadow: 0 16px 42px rgba(0, 0, 0, .42);
}
.wallet-card h2 { margin: 0 0 14px; color: #f2d98e; font-size: 15px; letter-spacing: .04em; }
.wallet-form { display: grid; gap: 13px; }
.wallet-field { display: grid; gap: 6px; }
.wallet-field > span { color: #b9ac8c; font-size: 11px; }
.wallet-field input, .wallet-field select, .wallet-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #403a2a;
  border-radius: 7px;
  outline: none;
  background: #0c0d0a;
  color: #f6edd9;
  font: 13px/1.4 inherit;
}
.wallet-field textarea { min-height: 74px; resize: vertical; }
.wallet-field input:focus, .wallet-field select:focus, .wallet-field textarea:focus { border-color: #b28d3f; box-shadow: 0 0 0 2px rgba(212, 175, 55, .1); }
.wallet-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.wallet-presets button {
  min-height: 38px;
  border: 1px solid var(--wallet-secondary-border);
  border-radius: 7px;
  background: var(--wallet-secondary-bg);
  color: var(--wallet-secondary-color);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.wallet-presets button:hover, .wallet-presets button.active { border-color: #b6964f; background: #221f14; color: #ffe9a8; }
.wallet-primary {
  min-height: 44px;
  border: 1px solid var(--wallet-primary-border);
  border-radius: 7px;
  background: var(--wallet-primary-bg);
  color: #211704;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.wallet-primary:disabled { opacity: .55; cursor: not-allowed; }
.wallet-hint { margin: 0; color: #8c8067; font-size: 10px; line-height: 1.6; }
.wallet-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.wallet-section-head h2 { margin: 0; }
.wallet-section-head button {
  border: 1px solid var(--wallet-secondary-border);
  border-radius: 7px;
  background: var(--wallet-secondary-bg);
  color: var(--wallet-secondary-color);
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.wallet-section-head button:hover { background: #221f14; border-color: #b6964f; color: #ffe9a8; }
.wallet-list { display: grid; gap: 8px; }
.wallet-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 9px;
  background: rgba(255, 255, 255, .02);
}
.wallet-item-main { min-width: 0; }
.wallet-item-title { display: flex; align-items: center; gap: 8px; color: #ead79f; font-size: 12px; }
.wallet-item-meta { margin-top: 5px; color: #92866d; font-size: 10px; line-height: 1.6; }
.wallet-item-note { margin-top: 4px; color: #b8a77d; font-size: 10px; }
.wallet-item-amount { color: #f2d98e; font: 600 15px/1.2 Georgia, serif; text-align: right; white-space: nowrap; }
.wallet-item-amount.credit { color: var(--wallet-green); }
.wallet-item-amount.debit { color: var(--wallet-red); }
.wallet-status { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: 9px; font-style: normal; }
.wallet-status.pending { color: #e8c56a; background: rgba(232, 197, 106, .09); border: 1px solid rgba(232, 197, 106, .24); }
.wallet-status.approved { color: #7ee2a8; background: rgba(110, 231, 160, .08); border: 1px solid rgba(110, 231, 160, .25); }
.wallet-status.rejected { color: #ff9a9a; background: rgba(255, 80, 80, .08); border: 1px solid rgba(255, 110, 110, .25); }
.wallet-empty { padding: 24px 10px; color: #7f755f; font-size: 11px; text-align: center; }
.wallet-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  transform: translate(-50%, 12px);
  max-width: min(420px, calc(100% - 32px));
  padding: 10px 15px;
  border: 1px solid rgba(212, 175, 55, .45);
  border-radius: 8px;
  background: #0b0c08;
  color: #f3dfa2;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.wallet-toast.show { opacity: 1; transform: translate(-50%, 0); }
.wallet-login-note { margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(255, 196, 90, .25); border-radius: 9px; background: rgba(255, 196, 90, .05); color: #d8c58c; font-size: 11px; line-height: 1.7; }
.wallet-login-note a { color: #ffe08a; }
@media (max-width: 640px) {
  .wallet-header { height: 64px; }
  .wallet-main { padding-top: 18px; }
  .wallet-balance-card { padding: 18px; align-items: flex-start; flex-wrap: wrap; }
  .wallet-balance-value { font-size: 28px; }
  .wallet-member { text-align: left; }
  .wallet-card { padding: 16px; }
  .wallet-presets { grid-template-columns: repeat(2, 1fr); }
  .wallet-nav { gap: 9px; }
  .wallet-nav a { font-size: 11px; }
}
/* 钱包 / 流水页面最小字号 12px */
body.wallet-page .wallet-kicker,
body.wallet-page .wallet-balance-label,
body.wallet-page .wallet-balance-unit,
body.wallet-page .wallet-member,
body.wallet-page .wallet-link,
body.wallet-page .wallet-field > span,
body.wallet-page .wallet-presets button,
body.wallet-page .wallet-hint,
body.wallet-page .wallet-section-head button,
body.wallet-page .wallet-item-meta,
body.wallet-page .wallet-item-note,
body.wallet-page .wallet-status,
body.wallet-page .wallet-empty,
body.wallet-page .wallet-toast,
body.wallet-page .wallet-login-note,
body.wallet-page .wallet-nav a {
  font-size: 12px !important;
}
.back-to-top {
  position: fixed;
  right: max(18px, calc((100vw - 460px) / 2 + 8px));
  bottom: 24px;
  z-index: 80;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 197, 106, .6);
  border-radius: 50%;
  background: linear-gradient(180deg, #f3d77f, #b88b2e);
  color: #211704;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), 0 0 14px rgba(232, 197, 106, .25);
}
.back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { filter: brightness(1.08); }
.wallet-load-more {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px solid rgba(232, 197, 106, .4);
  border-radius: 8px;
  background: rgba(20, 22, 17, .9);
  color: #e8c56a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.wallet-load-more:hover { border-color: #e3c66f; background: #221f14; color: #ffe9a8; }
.wallet-load-more:disabled { opacity: .55; cursor: default; }
.wallet-list-end { padding: 10px 0 2px; text-align: center; color: #8c8067; font-size: 12px; }
.wallet-app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  margin: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(212, 175, 55, .28);
  background: linear-gradient(180deg, rgba(9, 8, 5, .72), rgba(12, 10, 6, .55));
  backdrop-filter: blur(10px);
}
.wallet-app-brand { display: flex; align-items: center; gap: 7px; color: #f3e7c2; text-decoration: none; min-width: 0; }
.wallet-app-logo {
  width: 27px; height: 27px; flex: 0 0 27px;
  display: grid; place-items: center;
  border: 1px solid #e3c66f;
  border-radius: 50%;
  color: #f5d98d;
  font: 700 17px/1 Georgia, serif;
  background: radial-gradient(circle at 35% 30%, #3b2c11, #120e07);
  box-shadow: 0 0 8px #d4af5540;
}
.wallet-app-title { font: 600 16px/1 Georgia, "Microsoft YaHei", serif; letter-spacing: .04em; white-space: nowrap; }
.wallet-app-title em { color: #e9c86e; font-style: normal; }
.wallet-app-spacer { margin-left: auto; }
.wallet-app-menu-btn {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  color: #e8c56a;
  font-size: 17px;
  line-height: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.wallet-app-menu {
  position: absolute;
  top: 56px;
  right: 8px;
  z-index: 30;
  width: 160px;
  padding: 5px;
  border: 1px solid #6b5624;
  border-radius: 7px;
  background: linear-gradient(180deg, #1a170e, #0c0b07);
  box-shadow: 0 12px 30px #000b;
}
.wallet-app-menu[hidden] { display: none !important; }
.wallet-app-menu a, .wallet-app-menu button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #d9c68f;
  text-align: left;
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
}
.wallet-app-menu a:hover, .wallet-app-menu button:hover { background: #251e0f; color: #ffe08a; }
@media (max-width: 400px) {
  .wallet-app-topbar { padding: 8px 10px; }
  .wallet-app-title { font-size: 14px; }
}
