/* ── Design tokens ── */
:root {
  --bg: #eef2f8;
  --bg-deep: #e2e8f0;
  --card: rgba(255, 255, 255, 0.88);
  --card-solid: #ffffff;
  --line: rgba(148, 163, 184, 0.28);
  --line-strong: rgba(148, 163, 184, 0.45);
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #94a3b8;
  --in: #059669;
  --in-soft: #ecfdf5;
  --in-border: rgba(5, 150, 105, 0.22);
  --out: #e11d48;
  --out-soft: #fff1f2;
  --out-border: rgba(225, 29, 72, 0.2);
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --accent-glow: rgba(37, 99, 235, 0.28);
  --gold: #d97706;
  --gold-soft: #fffbeb;
  --soft: #f8fafc;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --glass: blur(16px) saturate(1.4);
  --tabbar-h: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "PingFang SC", "SF Pro Text", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.auth-banner {
  position: sticky;
  top: 0;
  z-index: 80;
  margin: 0;
  padding: 12px 14px;
  background: #fff7ed;
  border-bottom: 1px solid #fdba74;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.45;
}

.auth-banner.hidden { display: none !important; }

.auth-banner-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-banner-text { opacity: 0.95; }

.auth-banner-btn {
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: #ea580c;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Ambient background ── */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(37, 99, 235, 0.12), transparent 55%),
    radial-gradient(ellipse 80% 60% at 100% 20%, rgba(5, 150, 105, 0.08), transparent 50%),
    linear-gradient(180deg, #f1f5f9 0%, var(--bg) 40%, #e8edf5 100%);
}
.app-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}
.app-bg-orb-a {
  width: 280px; height: 280px;
  top: -80px; left: -60px;
  background: rgba(37, 99, 235, 0.18);
}
.app-bg-orb-b {
  width: 220px; height: 220px;
  top: 35%; right: -70px;
  background: rgba(5, 150, 105, 0.14);
}
.app-bg-orb-c {
  width: 180px; height: 180px;
  bottom: 18%; left: 10%;
  background: rgba(217, 119, 6, 0.1);
}

.app {
  position: relative;
  z-index: 1;
  padding: 12px 16px calc(var(--tabbar-h) + 16px + var(--safe-bottom));
  max-width: 480px;
  margin: 0 auto;
}

.tab-page { animation: pageIn 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ── Hero header (home) ── */
.hero-header {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #1e3a8a 0%, #1d4ed8 48%, #2563eb 100%);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.28);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-header::before {
  content: '';
  position: absolute;
  top: -40px; right: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  pointer-events: none;
}
.hero-header::after {
  content: '';
  position: absolute;
  bottom: -50px; left: 20%;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}
.hero-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #fff;
}
.hero-sub {
  margin-top: 3px !important;
  color: rgba(255,255,255,0.72) !important;
}
.hero-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 14px;
  background: #fff;
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  z-index: 1;
}
.hero-add-btn:active { transform: scale(0.98); }
.hero-add-plus {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  font-size: 16px;
  line-height: 1;
}

/* ── 首页未添加地址：虚化浮层指引 ── */
.home-onboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px 16px 100px;
  pointer-events: auto;
  animation: homeOnboardIn 0.28s ease;
}

.home-onboard-overlay.hidden { display: none !important; }

@keyframes homeOnboardIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.home-onboard-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(7px) saturate(1.1);
  -webkit-backdrop-filter: blur(7px) saturate(1.1);
}

.home-onboard-float {
  position: relative;
  z-index: 2;
  width: min(100%, 360px);
  margin-top: var(--home-onboard-top, 118px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-onboard-spotlight {
  position: fixed;
  z-index: 91;
  border-radius: 16px;
  box-shadow:
    0 0 0 3px #fbbf24,
    0 0 24px rgba(251, 191, 36, 0.65);
  pointer-events: none;
  transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.home-onboard-arrow {
  width: 0;
  height: 0;
  margin: 10px auto 4px;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 12px solid #fff;
  filter: drop-shadow(0 -1px 0 rgba(251, 191, 36, 0.5));
  animation: homeOnboardBounce 1.15s ease-in-out infinite;
}

@keyframes homeOnboardBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.home-onboard-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}

.home-onboard-pet {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  margin-top: -8px;
  margin-left: -4px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: 50% 100%;
  animation: homePetBob 1.8s ease-in-out infinite;
}

.home-onboard-pet-img {
  width: 96px;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

@keyframes homePetBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.home-onboard-body { flex: 1; min-width: 0; }

.home-onboard-title {
  font-size: 16px;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 6px;
}

.home-onboard-desc {
  font-size: 13px;
  line-height: 1.55;
  color: #a16207;
  margin-bottom: 12px;
}

.home-onboard-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  user-select: none;
}

.home-onboard-check input {
  width: 15px;
  height: 15px;
  accent-color: #d97706;
}

.home-onboard-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.home-onboard-actions .primary.sm {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #fff;
}

.hero-add-btn.home-onboard-target {
  position: relative;
  z-index: 92;
}

.icon-btn {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}
.icon-btn-ico { font-size: 18px; line-height: 1; }
.icon-btn:active { transform: scale(0.94); background: rgba(255,255,255,0.22); }

/* ── Nav pills ── */
.nav-pills {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 16px;
  background: var(--card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-pills::-webkit-scrollbar { display: none; }
.nav-btn {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.nav-btn.active {
  background: var(--text);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

/* ── Home address filter ── */
.addr-filter-section {
  margin-bottom: 14px;
}
.addr-filter-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 10px;
}
.addr-filter-hd .section-label {
  margin: 0;
}
.addr-filter-hint {
  margin: 0 !important;
  font-size: 11px;
  white-space: nowrap;
}
.addr-filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.addr-filter-scroll::-webkit-scrollbar { display: none; }
.addr-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 96px;
  max-width: 148px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  backdrop-filter: var(--glass);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
}
.addr-chip:active { transform: scale(0.97); }
.addr-chip.active {
  border-color: rgba(37, 99, 235, 0.45);
  background: linear-gradient(145deg, #eff6ff 0%, #ffffff 100%);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.14);
}
.addr-chip-label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.addr-chip-sub {
  font-size: 10px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.addr-chip.active .addr-chip-sub { color: #64748b; }
.addr-filter-empty {
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.6);
}

/* ── Stats grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  inset: auto -20% -40% auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: 0.35;
  pointer-events: none;
}
.stat-in::after { background: radial-gradient(circle, rgba(5, 150, 105, 0.35), transparent 70%); }
.stat-out::after { background: radial-gradient(circle, rgba(225, 29, 72, 0.28), transparent 70%); }
.stat-profit::after { background: radial-gradient(circle, rgba(37, 99, 235, 0.28), transparent 70%); }
.stat-balance::after { background: radial-gradient(circle, rgba(5, 150, 105, 0.3), transparent 70%); }
.stat-card.wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}
.stat-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.stat-card.wide .stat-hd { flex-shrink: 0; }
.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.stat-in .stat-icon { background: var(--in-soft); color: var(--in); border: 1px solid var(--in-border); }
.stat-out .stat-icon { background: var(--out-soft); color: var(--out); border: 1px solid var(--out-border); }
.stat-profit .stat-icon { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(37,99,235,0.18); }
.stat-balance .stat-icon,
.balance-ico { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: var(--in); border: 1px solid var(--in-border); }
.stat-hd .label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-secondary);
}
.stat-amount {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.stat-amount.is-long { font-size: 16px; }
.stat-amount.in { color: var(--in); }
.stat-amount.out { color: var(--out); }
.stat-unit {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  line-height: 1;
}
.stat-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.stat-card.wide .stat-amount {
  font-size: 22px;
  text-align: right;
}
.stat-card.wide .stat-amount.is-long { font-size: 18px; }
.stat-card.wide .stat-unit {
  flex-shrink: 0;
  font-size: 12px;
}
.stat-body { flex: 1; min-width: 0; }
.stat-body .label { margin-bottom: 4px; }
.stat-body .val { font-size: 18px; line-height: 1.25; }

/* ── Panels ── */
.panel {
  background: var(--card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.panel-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.panel-title-wrap h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.panel-desc { margin: 2px 0 0 !important; font-size: 11px; }

h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 15px; font-weight: 700; }
.sub, .muted { color: var(--muted); font-size: 12px; margin: 4px 0 0; line-height: 1.45; }

.label { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.val { font-size: 20px; font-weight: 800; word-break: break-all; letter-spacing: -0.02em; }
.val.sm { font-size: 17px; }
.val.in { color: var(--in); }
.val.out { color: var(--out); }

/* ── Segments ── */
.seg {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.seg-compact .seg-btn { padding: 6px 11px; font-size: 12px; }
.seg.wrap { display: flex; flex-wrap: wrap; border-radius: var(--radius-sm); margin-bottom: 12px; }
.seg-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.seg-btn.active {
  background: var(--card-solid);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ── Buttons ── */
button {
  font-family: inherit;
  border: 1px solid var(--line);
  background: var(--card-solid);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
button:active:not(:disabled) { transform: scale(0.97); opacity: 0.92; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.ghost {
  background: var(--soft);
  border-color: var(--line);
  color: var(--text-secondary);
}
.sm { padding: 7px 12px; font-size: 12px; border-radius: 10px; }
.danger { border: none; background: transparent; color: var(--out); font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.danger:active { background: var(--out-soft); }
.danger-btn { background: var(--out); border-color: var(--out); color: #fff; }

/* ── Transaction / list items ── */
.list { display: flex; flex-direction: column; gap: 8px; }
.flow-list {
  gap: 10px;
}
.flow-list .item,
.item {
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.flow-list .item:active,
.item:active {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: scale(0.99);
}
.item-pending { opacity: 0.65; }

/* Flow cards — glass */
.flow-list .tx-card {
  position: relative;
  overflow: hidden;
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.88) 100%);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 8px 20px rgba(15, 23, 42, 0.05);
}
.flow-list .tx-card::before {
  content: '';
  position: absolute;
  top: -36px;
  right: -20px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.9;
}
.flow-list .tx-card-in {
  background:
    linear-gradient(155deg, rgba(236, 253, 245, 0.95) 0%, rgba(255, 255, 255, 0.9) 55%, rgba(240, 253, 244, 0.75) 100%);
  border-color: rgba(5, 150, 105, 0.16);
}
.flow-list .tx-card-in::before {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 70%);
}
.flow-list .tx-card-out {
  background:
    linear-gradient(155deg, rgba(255, 241, 242, 0.95) 0%, rgba(255, 255, 255, 0.92) 55%, rgba(254, 242, 242, 0.72) 100%);
  border-color: rgba(225, 29, 72, 0.14);
}
.flow-list .tx-card-out::before {
  background: radial-gradient(circle, rgba(244, 63, 94, 0.16), transparent 70%);
}
.flow-list .tx-card:active {
  transform: scale(0.985);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.tx-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.tx-dir-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.tx-dir-badge.in {
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
  color: #047857;
  border-color: rgba(5, 150, 105, 0.18);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.12);
}
.tx-dir-badge.out {
  background: linear-gradient(135deg, #ffe4e6, #fff1f2);
  color: #be123c;
  border-color: rgba(225, 29, 72, 0.16);
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.1);
}
.tx-amount-wrap {
  text-align: right;
  flex-shrink: 0;
}
.tx-amount {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.tx-amount.in { color: #047857; }
.tx-amount.out { color: #be123c; }
.tx-amount-unit {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1;
}
.tx-card-in .tx-amount-unit { color: rgba(4, 120, 87, 0.65); }
.tx-card-out .tx-amount-unit { color: rgba(190, 18, 60, 0.55); }
.tx-meta {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.32);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tx-meta-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 6px;
}
.tx-meta-line strong {
  color: var(--text);
  font-weight: 700;
}
.tx-dot { color: var(--muted); opacity: 0.7; }
.tx-k {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
}
.tx-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.02em;
}
.tx-meta-time {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.flow-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.86) 100%);
  border-color: rgba(255, 255, 255, 0.85);
}

/* Address cards — 2-col glass grid */
.addr-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.addr-list .empty-guide {
  grid-column: 1 / -1;
}
.addr-card.item,
.addr-list .addr-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding: 12px 11px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.88) 0%, rgba(236, 253, 245, 0.72) 48%, rgba(239, 246, 255, 0.78) 100%);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 10px 22px rgba(15, 23, 42, 0.06);
}
.addr-card::before {
  content: '';
  position: absolute;
  top: -28px;
  right: -22px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.16), transparent 70%);
  pointer-events: none;
}
.addr-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.addr-card-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 1px;
}
.addr-card-bal-block {
  flex-shrink: 0;
  text-align: right;
  max-width: 58%;
}
.addr-card-bal-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 2px;
}
.addr-card-bal-amount {
  font-size: 12px;
  font-weight: 800;
  color: #047857;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.addr-card-bal-amount.is-long { font-size: 11px; letter-spacing: -0.04em; }
.addr-card-bal-amount.is-xl { font-size: 10px; letter-spacing: -0.045em; }
.addr-card-bal-unit {
  margin-top: 1px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(4, 120, 87, 0.7);
  line-height: 1;
}
.addr-card-addr {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.4;
  word-break: break-all;
}
.addr-card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}
.addr-card-hint {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
}
.addr-card .danger {
  font-size: 11px;
  padding: 2px 4px;
  flex-shrink: 0;
}

.bal { color: var(--in); font-weight: 700; }
.empty {
  color: var(--muted);
  font-size: 13px;
  padding: 28px 12px;
  text-align: center;
  line-height: 1.6;
}

/* ── Pager ── */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.pager-btn { min-width: 72px; }
.pager-info {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  flex: 1;
  line-height: 1.4;
}

/* ── Me tab hero ── */
.me-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 20px 18px 18px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(236, 253, 245, 0.9) 42%, rgba(239, 246, 255, 0.94) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 40px rgba(15, 23, 42, 0.08);
  backdrop-filter: var(--glass);
}
.me-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 100% -10%, rgba(5, 150, 105, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at -5% 110%, rgba(37, 99, 235, 0.14), transparent 50%);
  pointer-events: none;
}
.me-hero::after {
  content: '₮';
  position: absolute;
  right: -6px;
  bottom: -18px;
  font-size: 120px;
  font-weight: 800;
  line-height: 1;
  color: rgba(5, 150, 105, 0.06);
  letter-spacing: -0.06em;
  pointer-events: none;
  user-select: none;
  transform: rotate(-8deg);
}
.me-hero-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 68%);
  top: -48px;
  right: -28px;
  filter: blur(2px);
  pointer-events: none;
  animation: meGlowFloat 7s ease-in-out infinite;
}
.me-hero-glow-b {
  width: 110px;
  height: 110px;
  top: auto;
  bottom: -36px;
  left: -24px;
  right: auto;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16), transparent 68%);
  animation-delay: -3.5s;
}
@keyframes meGlowFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  50% { transform: translate(-8px, 10px) scale(1.08); opacity: 1; }
}

.me-profile {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}
.me-profile-info { flex: 1; min-width: 0; }
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.profile-name {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--text);
}
.profile-meta { font-size: 12px !important; margin-top: 2px !important; }

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(5, 150, 105, 0.12);
}
.avatar.no-photo {
  background: linear-gradient(145deg, #059669 0%, #047857 45%, #1d4ed8 100%);
  color: #fff;
  box-shadow:
    0 10px 28px rgba(5, 150, 105, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.plan-badge.free {
  background: rgba(241, 245, 249, 0.95);
  color: #64748b;
  border-color: var(--line);
}
.plan-badge.vip {
  background: linear-gradient(135deg, #fef9c3, #fde68a);
  color: #92400e;
  border-color: #fbbf24;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
}

.me-metrics {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 10px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}
.me-metric {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 8px 20px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(8px);
}
.me-metric-bal {
  background:
    linear-gradient(160deg, rgba(236, 253, 245, 0.95) 0%, rgba(255, 255, 255, 0.88) 55%, rgba(209, 250, 229, 0.55) 100%);
  border-color: rgba(5, 150, 105, 0.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 24px rgba(5, 150, 105, 0.1);
}
.me-metric-bal::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -16px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.2), transparent 70%);
  pointer-events: none;
}
.me-metric-hd {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}
.me-metric-ico {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}
.me-metric-ico-u {
  background: linear-gradient(145deg, #10b981, #059669);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.35);
}
.me-metric-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.me-metric-val {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}
.me-metric-amount {
  display: block;
  max-width: 100%;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #047857;
  white-space: nowrap;
  overflow: visible;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.me-metric-amount.is-long { font-size: 18px; letter-spacing: -0.045em; }
.me-metric-amount.is-xl { font-size: 15px; letter-spacing: -0.05em; }
.me-metric-amount.in { color: #047857; }
.me-metric-unit {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(4, 120, 87, 0.72);
  line-height: 1;
}
.me-metric-hint {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}
.manage-addr-link {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.addr-quota { display: flex; align-items: baseline; }
.addr-quota .q-used { color: var(--text); }
.addr-quota .q-sep { color: var(--muted); font-weight: 500; font-size: 0.75em; margin: 0 2px; }
.addr-quota .q-limit { color: var(--muted); font-weight: 600; }
.quota-hint { margin-top: 3px; font-size: 10px; color: var(--muted); }
.vip-expire-line { margin-top: 6px; color: var(--gold); font-weight: 700; font-size: 12px !important; }

/* ── Menu grid (2 cols) ── */
.menu-section { margin-bottom: 16px; }
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 4px 10px;
}
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.menu-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 108px;
  text-align: left;
  background:
    linear-gradient(165deg, rgba(255,255,255,0.96) 0%, rgba(248,250,252,0.9) 100%);
  backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 20px;
  padding: 14px 14px 12px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
  position: relative;
  overflow: hidden;
}
.menu-tile::after {
  content: '';
  position: absolute;
  right: -18px;
  top: -18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(148,163,184,0.14), transparent 70%);
  pointer-events: none;
}
.menu-tile:active {
  transform: scale(0.97);
  box-shadow: none;
}
.menu-tile .menu-ico-wrap {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
}
.menu-ico-add { background: linear-gradient(145deg, #dbeafe, #eff6ff); color: #1d4ed8; }
.menu-ico-ref { background: linear-gradient(145deg, #fee2e2, #fef2f2); color: #b91c1c; }
.menu-ico-vip { background: linear-gradient(145deg, #fde68a, #fffbeb); color: #b45309; }
.menu-ico-support { background: linear-gradient(145deg, #bbf7d0, #f0fdf4); color: #15803d; }
.menu-ico-refresh { background: linear-gradient(145deg, #e2e8f0, #f8fafc); color: #475569; }
.menu-tile .menu-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.menu-tile .menu-sub {
  margin-top: -4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.menu-tile-referral {
  border-color: rgba(248, 113, 113, 0.28);
  background: linear-gradient(160deg, rgba(254,242,242,0.95), rgba(255,255,255,0.92));
}
.menu-tile-referral .menu-text { color: #b91c1c; }
.menu-tile-vip {
  border-color: rgba(251, 191, 36, 0.45);
  background: linear-gradient(160deg, rgba(254,249,195,0.9), rgba(255,255,255,0.95));
  grid-column: 1 / -1;
  min-height: 84px;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.menu-tile-vip .menu-text { color: #92400e; }
.menu-tile-vip .menu-sub { margin-top: 0; color: #b45309; }
.menu-tile-vip .menu-ico-wrap { flex-shrink: 0; }

/* keep old menu-item selectors harmless if any leftover */

/* ── Tabbar ── */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 8px 16px calc(10px + var(--safe-bottom));
  pointer-events: none;
}
.tabbar-inner {
  pointer-events: auto;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 -4px 32px rgba(15, 23, 42, 0.08), var(--shadow-lg);
}
.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tabbar-item.active {
  background: var(--text);
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
}
.tabbar-ico-wrap { line-height: 1; }
.tabbar-ico { font-size: 20px; line-height: 1; }
.tabbar-label { letter-spacing: 0.02em; }

/* ── Sheets ── */
.sheet {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-mask {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  animation: fadeMask 0.25s ease;
}
@keyframes fadeMask { from { opacity: 0; } to { opacity: 1; } }
.sheet-card {
  position: relative;
  width: 100%; max-width: 480px; max-height: 88vh;
  overflow: auto;
  background: var(--card-solid);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 8px 18px calc(20px + var(--safe-bottom));
  box-shadow: 0 -12px 48px rgba(15, 23, 42, 0.15);
  animation: sheetUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}
.sheet-handle {
  width: 36px; height: 4px;
  background: var(--line-strong);
  border-radius: 999px;
  margin: 6px auto 14px;
}
.sheet-handle-light { background: rgba(255,255,255,0.35); }
.sheet-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.sheet-hd-main { flex: 1; min-width: 0; }
.sheet-hd b { font-size: 17px; font-weight: 800; }
.sheet-meta { margin-top: 4px !important; word-break: break-all; }
.sheet-hd-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.sheet-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sheet-bal { color: var(--text); font-size: 13px; font-weight: 700; }
.edit-label {
  display: inline-flex; align-items: center; gap: 3px;
  border: none; background: var(--accent-soft); color: var(--accent);
  padding: 4px 8px; font-size: 11px; font-weight: 700;
  border-radius: 8px; cursor: pointer;
}
.edit-label-ico { font-size: 12px; }

.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.mini {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}
.mini .label { margin-bottom: 4px; font-size: 10px; }
.mini .val {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  word-break: break-word;
}

.field-label, label.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; }
input, select {
  width: 100%;
  margin-top: 6px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #fff;
}
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.quota-line { margin: 4px 0 10px; }

/* ── Dialog ── */
.dialog {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.dialog-mask {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
}
.dialog-card {
  position: relative;
  width: 100%; max-width: 320px;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 26px 22px 20px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: dialogIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes dialogIn {
  from { opacity: 0; transform: scale(0.9) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.dialog-icon {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800;
}
.dialog-icon.warn { background: var(--out-soft); color: var(--out); }
.dialog-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.dialog-msg { font-size: 14px; line-height: 1.55; color: var(--text-secondary); margin: 0 0 20px; white-space: pre-line; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-btn { width: 100%; padding: 13px 10px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; }
.dialog-btn.ghost { background: var(--soft); color: var(--text); border-color: var(--line); }
.dialog-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.dialog-btn.danger-btn { background: var(--out); border-color: var(--out); color: #fff; }

/* ── VIP sheet ── */
.vip-sheet { padding: 0 0 calc(20px + var(--safe-bottom)); overflow: hidden; }
.vip-sheet-banner {
  background: linear-gradient(145deg, #fef9c3 0%, #fde68a 50%, #fbbf24 100%);
  text-align: center;
  padding: 24px 18px 20px;
  color: #78350f;
}
.vip-crown { font-size: 36px; margin-bottom: 6px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.vip-sheet-banner b { font-size: 18px; display: block; }
.vip-sheet-banner .sub { color: rgba(120, 53, 15, 0.75); margin-top: 4px; }
.vip-sheet-body { padding: 16px 18px 0; }

.vip-order-box {
  background: var(--soft);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.65;
}
.vip-order-box .pay-amount {
  font-size: 32px;
  font-weight: 900;
  color: var(--gold);
  margin: 10px 0;
  letter-spacing: -0.03em;
}
.vip-order-box .pay-amount.copy-tap,
.vip-order-box .mono.copy-tap { cursor: pointer; user-select: none; }
.vip-order-box .pay-amount.copy-tap:active,
.vip-order-box .mono.copy-tap:active { opacity: 0.7; }
.vip-order-box .copy-tap-hint { font-size: 11px; color: var(--muted); margin: -2px 0 10px; }
.vip-order-box .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; }
.vip-order-box .warn-line { color: var(--out); font-size: 12px; margin-top: 10px; }

/* ── Referral ── */
.referral-card { padding: 0; overflow: hidden; }
.referral-hero {
  background: linear-gradient(145deg, #ef4444 0%, #dc2626 45%, #991b1b 100%);
  color: #fff;
  text-align: center;
  padding: 26px 18px 22px;
}
.referral-hero .sub { color: rgba(255,255,255,0.88); margin-top: 6px; }
.referral-coin { font-size: 44px; line-height: 1; margin-bottom: 8px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25)); }
.referral-body { padding: 18px; }
.referral-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.referral-stat-box {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.referral-stat-box .label { font-size: 11px; text-transform: none; letter-spacing: 0; }
.referral-link-box {
  background: #fff7ed;
  border: 1px dashed #fdba74;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 12px;
  word-break: break-all;
  margin: 12px 0;
  line-height: 1.5;
}
.referral-copy-btn {
  width: 100%;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
  cursor: pointer;
}
.referral-actions { padding: 0 18px 18px; }

/* ── Notify ── */
.notify-section {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.notify-section:last-of-type { border-bottom: none; }
.notify-section-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.notify-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.notify-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--soft);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.notify-toggle.on { border-color: var(--in-border); background: var(--in-soft); color: #065f46; }
.notify-toggle .state { font-size: 11px; color: var(--muted); font-weight: 500; }
.notify-toggle.on .state { color: var(--in); }
.notify-thresholds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.notify-thresholds label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }

/* ── Empty guide ── */
.empty-guide {
  text-align: center;
  padding: 32px 20px;
  background: linear-gradient(180deg, var(--soft), rgba(255,255,255,0.6));
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}
.empty-guide-ico { font-size: 40px; margin-bottom: 10px; }
.empty-guide-title { font-weight: 800; font-size: 16px; margin-bottom: 8px; }
.empty-guide-steps {
  text-align: left;
  margin: 14px auto 18px;
  max-width: 280px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
}
.empty-guide .primary { width: 100%; max-width: 280px; margin: 0 auto; display: block; padding: 14px; }

.add-limit-box {
  margin: 10px 0 6px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  border: 1px solid rgba(251, 191, 36, 0.45);
}
.add-limit-box .warn-line { color: var(--out); font-size: 13px; margin: 0 0 12px; line-height: 1.5; }
.add-limit-box .primary.sm { width: 100%; }
#addHint { color: var(--out); min-height: 1.2em; margin-top: 8px; }

/* ── Tx detail ── */
.tx-detail-body { padding-bottom: 8px; }
.tx-detail-amount {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  word-break: break-all;
}
.tx-detail-amount.in { color: var(--in); }
.tx-detail-amount.out { color: var(--out); }
.tx-detail-dir {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}
.tx-detail-dir.in { background: var(--in-soft); color: var(--in); }
.tx-detail-dir.out { background: var(--out-soft); color: var(--out); }

.kv {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px 12px;
  font-size: 13px;
  margin-top: 4px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.kv span:first-child { color: var(--muted); font-weight: 600; font-size: 12px; }
.kv span, .kv a { word-break: break-all; overflow-wrap: anywhere; line-height: 1.45; }
.kv a { color: var(--accent); font-weight: 600; }
.hash-copy {
  color: var(--accent) !important;
  cursor: pointer;
  font-weight: 600;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.hint { color: var(--out); font-size: 12px; min-height: 16px; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 12px + var(--safe-bottom));
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 99;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  animation: toastIn 0.25s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%); }
}

/* Legacy compat */
.top, .cards, .card, .profile-card, .add-addr-top { /* kept for any dynamic refs */ }
.item .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.item .addr { color: var(--muted); word-break: break-all; margin-top: 4px; font-size: 12px; }
.sheet-card { overflow-x: hidden; }
.confirm-msg { margin: 4px 0 12px; font-size: 14px; line-height: 1.5; color: var(--text); }

@media (max-width: 360px) {
  .stats-grid { gap: 8px; }
  .stat-amount { font-size: 17px; }
  .stat-amount.is-long { font-size: 14px; }
  .stat-card.wide .stat-amount { font-size: 18px; }
  .nav-btn { font-size: 12px; padding: 8px 6px; }
  .menu-item { grid-template-columns: 38px 1fr 16px; gap: 10px; padding: 12px; }
  .menu-tile { min-height: 100px; padding: 12px; }
}
