@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&family=Syne:wght@600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #7C5CFF;
  --primary-light: #9B82FF;
  --secondary: #00D4FF;
  --accent: #00E5A0;
  --coral: #FF6B9D;
  --orange: #FF8A4C;
  --success: #00E5A0;
  --danger: #FF4D7D;
  --warning: #FFB84D;
  --bg: #07070F;
  --bg-elevated: #0E0E18;
  --card: #12121E;
  --surface: #1A1A2C;
  --surface-elevated: #222238;
  --text: #FFFFFF;
  --text-secondary: #B4BAD4;
  --text-tertiary: #8B93B0;
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --glass: rgba(18,18,30,0.78);
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #030308;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ─── Phone shell ─── */
.phone {
  width: 375px;
  height: 812px;
  background: var(--bg);
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  color: var(--text);
  box-shadow: 0 32px 100px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.06), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Force light text on all interactive elements (buttons default to black in browsers) */
.phone button,
.phone input,
.phone select,
.phone textarea {
  color: var(--text);
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.phone input::placeholder,
.phone textarea::placeholder {
  color: var(--text-tertiary);
}

.phone .lucide,
.phone svg.lucide {
  stroke: currentColor;
  color: inherit;
}

.phone::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 126px; height: 30px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 200;
}

.phone::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 150;
  opacity: 0.6;
}

/* ─── Screens ─── */
.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--smooth, ease), transform 0.35s var(--smooth, ease);
  transform: scale(0.98);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 1;
}

.stack-screen, .tab-screen, .sub-screen { background: var(--bg); }
.stack-screen { display: flex; flex-direction: column; min-height: 100%; }

/* Tab screens: pin nav to phone bottom; scroll content only */
.tab-screen {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

.tab-screen .mesh-bg,
.tab-screen .mesh-bg-subtle {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.tab-screen .status-bar {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.tab-screen .content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
}

.screen::-webkit-scrollbar { display: none; }
.content { padding: 0 20px 100px; position: relative; z-index: 1; }
.tab-screen .content { padding-bottom: 24px; }

/* Sub-screens: scrollable body, fixed header */
.sub-screen,
.stack-screen:not(.tab-screen) {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

.sub-screen .sub-header,
.stack-screen .status-bar {
  flex-shrink: 0;
}

.sub-screen > .content,
.sub-screen > .auth-content,
.stack-screen > .auth-content,
.stack-screen > .bio-center {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.stack-screen > .onboarding-illustration { flex-shrink: 0; }
.stack-screen > .onboarding-content { flex: 1; min-height: 0; overflow-y: auto; }

.referral-code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.referral-code .section-link {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-item-toggle {
  cursor: default;
}

.menu-item-toggle .toggle {
  cursor: pointer;
  flex-shrink: 0;
}

.stack-screen .sub-header { flex-shrink: 0; position: relative; z-index: 2; }

.stack-screen .auth-mesh,
.stack-screen .mesh-bg-subtle {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.content-top { padding-top: 4px; }
.section-center { text-align: center; }

/* ─── Mesh background ─── */
.mesh-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 15% -5%, rgba(124,92,255,0.42) 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 8%, rgba(255,107,157,0.28) 0%, transparent 50%),
    radial-gradient(ellipse 60% 35% at 50% 105%, rgba(0,229,160,0.14) 0%, transparent 50%),
    var(--bg);
  pointer-events: none;
  z-index: 0;
}

.mesh-bg-subtle {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124,92,255,0.25) 0%, transparent 60%),
    var(--bg);
}

/* ─── Status bar ─── */
.status-bar {
  height: 44px;
  padding: 14px 24px 0;
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

/* ─── Splash ─── */
.splash-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.splash-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(124,92,255,0.55) 0%, transparent 45%),
    radial-gradient(circle at 20% 70%, rgba(0,212,255,0.2) 0%, transparent 40%),
    radial-gradient(circle at 80% 75%, rgba(255,107,157,0.18) 0%, transparent 35%),
    var(--bg);
}

.splash-particles {
  position: absolute;
  width: 300px; height: 300px;
  top: 28%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(124,92,255,0.15);
  border-radius: 50%;
  animation: pulseRing 3s ease-in-out infinite;
}

.splash-particles::before,
.splash-particles::after {
  content: '';
  position: absolute;
  inset: -24px;
  border: 1px solid rgba(124,92,255,0.08);
  border-radius: 50%;
  animation: pulseRing 3s ease-in-out infinite 0.5s;
}

.splash-particles::after { inset: -48px; animation-delay: 1s; }

@keyframes pulseRing {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}

.logo-mark {
  width: 88px; height: 88px;
  position: relative;
  z-index: 2;
  animation: logoIn 1s var(--spring, ease) both;
}

.logo-mark svg { width: 100%; height: 100%; filter: drop-shadow(0 0 32px rgba(124,92,255,0.6)); }

@keyframes logoIn {
  from { opacity: 0; transform: scale(0.7) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.splash-title {
  font-family: 'Syne', sans-serif;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-top: 28px;
  z-index: 2;
  animation: fadeUp 0.7s ease-out 0.4s both;
}

.splash-tagline {
  color: var(--text-secondary);
  font-size: 16px;
  margin-top: 10px;
  z-index: 2;
  animation: fadeUp 0.7s ease-out 0.55s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.loader {
  width: 140px; height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 56px;
  overflow: hidden;
  z-index: 2;
}

.loader-fill {
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  border-radius: 2px;
  animation: load 1.8s ease-in-out infinite;
}

@keyframes load {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(400%); }
}

/* ─── Header ─── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 20px;
}

.header-left { display: flex; align-items: center; gap: 12px; }

.avatar, img.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--coral));
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 16px rgba(124,92,255,0.35);
  overflow: hidden;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border: 3px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 32px rgba(124,92,255,0.35);
}

.greeting-label { font-size: 12px; color: var(--text-tertiary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.greeting-name { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; color: var(--text); }

.icon-btn {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: background 0.2s, transform 0.15s;
}

.icon-btn:active { transform: scale(0.94); background: var(--surface-elevated); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .badge {
  position: absolute; top: 10px; right: 10px;
  width: 8px; height: 8px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--coral);
}

/* ─── Portfolio card ─── */
.wallet-card {
  background: var(--glass);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 40px rgba(0,0,0,0.45);
}

.wallet-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 70%;
  background: linear-gradient(145deg, rgba(124,92,255,0.25) 0%, rgba(0,212,255,0.06) 50%, transparent 100%);
  pointer-events: none;
}

.wallet-card::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(0,229,160,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.wallet-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.wallet-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }

.wallet-balance {
  font-family: 'Syne', sans-serif;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -2px;
  margin: 6px 0 12px;
  position: relative;
  z-index: 1;
  color: var(--text);
}

.wallet-balance-sm { font-size: 32px; letter-spacing: -1px; }

.sparkline-wrap {
  width: 100px; height: 40px;
  opacity: 0.9;
}

.pl-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,229,160,0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0,229,160,0.2);
  position: relative;
  z-index: 1;
}

.pl-badge.down { background: rgba(255,77,125,0.12); color: var(--danger); border-color: rgba(255,77,125,0.2); }

/* ─── Insight card ─── */
.insight-card {
  background: linear-gradient(135deg, rgba(124,92,255,0.18) 0%, rgba(255,107,157,0.08) 100%);
  border: 1px solid rgba(124,92,255,0.25);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.insight-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--coral));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.insight-icon svg { width: 20px; height: 20px; color: white; }
.insight-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.insight-body { font-size: 13px; color: var(--text-secondary); line-height: 1.45; }

/* ─── Section ─── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.section-link {
  font-size: 13px;
  color: var(--secondary);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
}

/* ─── Quick actions ─── */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.action-tile {
  aspect-ratio: 1;
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  transition: transform 0.2s var(--spring, ease), background 0.2s, box-shadow 0.2s;
}

.action-tile svg { width: 22px; height: 22px; color: var(--primary-light); stroke: var(--primary-light); }
.action-tile:active { transform: scale(0.92); }
.action-tile:hover { background: var(--surface-elevated); box-shadow: 0 4px 20px rgba(124,92,255,0.15); }

/* ─── Market scroll ─── */
.market-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 24px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.market-scroll::-webkit-scrollbar { display: none; }

.market-pill {
  flex-shrink: 0;
  min-width: 108px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  color: var(--text);
  text-align: left;
}

.market-pill:active { transform: scale(0.96); }
.market-pill-symbol { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; color: var(--text); }
.market-pill-price { font-size: 15px; font-weight: 600; margin: 4px 0 2px; color: var(--text); }
.market-pill-change { font-size: 11px; font-weight: 600; }
.market-pill-change.up { color: var(--accent); }
.market-pill-change.down { color: var(--danger); }

.mini-spark { width: 100%; height: 24px; margin-top: 6px; }

/* ─── Allocation donut ─── */
.allocation-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 24px;
}

.donut-chart { width: 80px; height: 80px; flex-shrink: 0; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
}

.legend-left { display: flex; align-items: center; color: var(--text-secondary); }
.legend-pct { font-weight: 600; color: var(--text); }

/* ─── Asset rows ─── */
.asset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.asset-row:active { transform: scale(0.98); background: var(--surface); border-color: rgba(124,92,255,0.2); }
.asset-row.static { cursor: default; }
.asset-row.static:active { transform: none; }

.asset-left { display: flex; align-items: center; gap: 12px; }

.token-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.token-icon.btc { background: linear-gradient(135deg, #F7931A, #FFB84D); }
.token-icon.eth { background: linear-gradient(135deg, #627EEA, #8B9FF0); }
.token-icon.sol { background: linear-gradient(135deg, #9945FF, #14F195); }
.token-icon.usdt { background: linear-gradient(135deg, #26A17B, #50AF95); }
.token-icon.mini { width: 28px; height: 28px; font-size: 9px; }

.asset-symbol { font-size: 15px; font-weight: 600; color: var(--text); }
.asset-name { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.asset-right { text-align: right; }
.asset-price { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.asset-change { font-size: 12px; font-weight: 600; margin-top: 2px; }
.asset-change.up { color: var(--accent); }
.asset-change.down { color: var(--danger); }
.asset-spark { width: 48px; height: 20px; margin-top: 4px; margin-left: auto; }

.asset-btn { width: 100%; border: none; text-align: left; font: inherit; color: inherit; }

/* ─── Tab bar ─── */
.tab-bar {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 83px;
  background: rgba(12,12,20,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 10px 12px 28px;
  z-index: 50;
  margin-top: auto;
}

/* Fallback if tab-bar ever outside flex tab-screen */
.screen:not(.tab-screen) .tab-bar {
  display: none;
}

.tab-item {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  transition: color 0.2s, transform 0.15s;
  min-width: 56px;
}

.tab-item.active { color: var(--primary-light); }
.tab-item.active svg { filter: drop-shadow(0 0 8px rgba(124,92,255,0.5)); stroke: var(--primary-light); color: var(--primary-light); }
.tab-item svg { width: 22px; height: 22px; stroke: currentColor; color: inherit; }
.tab-item:active { transform: scale(0.9); }

/* ─── Onboarding ─── */
.onboarding-illustration {
  margin: 12px 20px 0;
  height: 300px;
  border-radius: var(--radius-xl);
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.ob-illustration-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.onboarding-content {
  flex: 1;
  padding: 24px 20px 36px;
  display: flex;
  flex-direction: column;
}

.onboarding-title {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.onboarding-body { font-size: 16px; color: var(--text-secondary); line-height: 1.55; flex: 1; }

.dots { display: flex; gap: 8px; margin: 20px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-elevated); transition: all 0.3s var(--spring, ease); }
.dot.active { width: 28px; border-radius: 4px; background: linear-gradient(90deg, var(--primary), var(--secondary)); }

.onboarding-footer { margin-top: auto; }

/* ─── Buttons ─── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary) 0%, #6246E8 100%);
  color: white;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(124,92,255,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.2s var(--spring, ease), box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 80% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.btn-primary:active { transform: scale(0.97); }
.btn-primary.btn-sm { height: 48px; font-size: 15px; border-radius: 24px; }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 26px;
  background: rgba(255,255,255,0.04);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s, transform 0.15s;
}

.btn-secondary:active { background: var(--surface); transform: scale(0.98); }

.btn-walletconnect {
  background: linear-gradient(135deg, #3B99FC 0%, #0052FF 100%);
  border: none;
  box-shadow: 0 8px 24px rgba(59,153,252,0.35);
}

.btn-walletconnect::after { display: none; }

.wc-icon {
  width: 22px; height: 22px;
  background: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.wc-icon svg { width: 14px; height: 14px; }

.btn-ghost {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 14px;
  text-align: center;
  padding: 12px 0;
}

.btn-row { display: flex; gap: 10px; margin-top: 10px; }
.btn-row .btn-secondary { flex: 1; margin-top: 0; }

.social-row { display: flex; gap: 10px; margin-top: 10px; }

.social-btn {
  flex: 1;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
}

.social-btn:active { background: var(--surface); }
.sub-header-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.send-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
}

.social-btn svg { width: 18px; height: 18px; }

.wallet-brand-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ─── Auth ─── */
.auth-mesh {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -5%, rgba(124,92,255,0.35) 0%, transparent 60%), var(--bg);
  pointer-events: none;
}

.auth-content {
  padding: 0 20px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.auth-logo { width: 64px; height: 64px; margin: 20px auto 0; }
.auth-logo svg { width: 100%; height: 100%; filter: drop-shadow(0 0 20px rgba(124,92,255,0.4)); }
.auth-logo-sm { width: 56px; height: 56px; margin: 16px auto 0; }

.auth-illustration {
  width: 100px;
  height: 100px;
  display: block;
  margin: 16px auto 8px;
}

.auth-title {
  font-family: 'Syne', sans-serif;
  font-size: 30px;
  font-weight: 800;
  margin-top: 24px;
  letter-spacing: -0.5px;
}

.auth-subtitle { font-size: 15px; color: var(--text-secondary); margin: 8px 0 24px; line-height: 1.5; }

.form-input {
  width: 100%;
  height: 54px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  padding: 0 16px;
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: rgba(124,92,255,0.5);
  box-shadow: 0 0 0 3px rgba(124,92,255,0.15);
}

.form-input::placeholder { color: var(--text-tertiary); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-tertiary);
  font-size: 13px;
  margin: 20px 0;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer { text-align: center; font-size: 14px; color: var(--text-secondary); margin-top: 20px; }
.auth-footer a { color: var(--secondary); font-weight: 600; text-decoration: none; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.checkbox-row input { width: 20px; height: 20px; accent-color: var(--primary); margin-top: 2px; flex-shrink: 0; }

.auth-wallet-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.auth-wallet-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ─── OTP ─── */
.otp-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 32px 0 24px;
}

.otp-box {
  width: 48px; height: 56px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.otp-box:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,92,255,0.2);
}

.otp-timer { text-align: center; font-size: 14px; color: var(--text-secondary); }

/* ─── Biometric ─── */
.bio-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.bio-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 2px solid rgba(124,92,255,0.3);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  margin-bottom: 32px;
}

.bio-ring::before,
.bio-ring::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(124,92,255,0.15);
  animation: bioPulse 2s ease-out infinite;
}

.bio-ring::after { inset: -24px; animation-delay: 0.5s; }

@keyframes bioPulse {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.15); }
}

.bio-ring svg { width: 48px; height: 48px; color: var(--primary-light); }

/* ─── Wallet screen ─── */
.wallet-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin-bottom: 20px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.wallet-carousel::-webkit-scrollbar { display: none; }

.wallet-chip {
  flex-shrink: 0;
  min-width: 140px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wallet-chip.active {
  border-color: rgba(124,92,255,0.5);
  box-shadow: 0 0 24px rgba(124,92,255,0.2);
  background: linear-gradient(135deg, rgba(124,92,255,0.15), rgba(0,212,255,0.05));
}

.wallet-chip-name { font-size: 13px; font-weight: 600; }
.wallet-chip-bal { font-size: 18px; font-weight: 700; font-family: 'Syne', sans-serif; margin-top: 4px; }

.wallet-total { text-align: center; padding: 20px 0; }
.wallet-total-label { font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.wallet-total-value { font-family: 'Syne', sans-serif; font-size: 44px; font-weight: 800; letter-spacing: -2px; margin: 8px 0; }

.wallet-actions { display: flex; gap: 10px; margin-bottom: 24px; }

.wallet-action-btn {
  flex: 1;
  height: 50px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.wallet-action-btn svg { width: 16px; height: 16px; }

.wallet-action-btn:active { transform: scale(0.96); }
.wallet-action-btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border: none; box-shadow: 0 4px 20px rgba(124,92,255,0.35); }
.wallet-action-btn.buy { background: linear-gradient(135deg, #00C853, var(--accent)); border: none; }
.wallet-action-btn.sell { background: linear-gradient(135deg, var(--danger), #E8356A); border: none; }

.wallet-card-compact { margin-bottom: 20px; padding: 18px; }

/* ─── Trading ─── */
.trade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pair-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  color: var(--text);
}

.pair-selector svg { width: 16px; height: 16px; color: var(--text-secondary); stroke: var(--text-secondary); }

.trade-price-block { margin-bottom: 12px; }
.trade-price { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; letter-spacing: -1px; color: var(--text); }
.trade-change { font-size: 14px; font-weight: 600; color: var(--accent); margin-top: 4px; }

.chart-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--card);
  border-radius: 12px;
  padding: 4px;
}

.chart-tab {
  flex: 1;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.chart-tab.active { background: var(--surface-elevated); color: var(--text); }

.chart-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.chart-container svg { width: 100%; height: auto; display: block; }

.order-book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.order-col { background: var(--card); border-radius: 14px; padding: 12px; border: 1px solid var(--border); }
.order-col-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.order-col-title.bids { color: var(--accent); }
.order-col-title.asks { color: var(--danger); }

.order-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 0;
  position: relative;
  color: var(--text-secondary);
}

.order-row span { position: relative; z-index: 1; }

.order-row .bar {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  opacity: 0.12;
  border-radius: 2px;
}

.order-row.bid .bar { background: var(--accent); }
.order-row.ask .bar { background: var(--danger); }

.trade-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.trade-toggle {
  display: flex;
  background: var(--surface);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}

.trade-toggle-btn {
  flex: 1;
  height: 40px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.trade-toggle-btn.buy.active { background: var(--accent); color: #022818; }
.trade-toggle-btn.sell.active { background: var(--danger); color: #FFFFFF; }

.order-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.order-type-tab {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.order-type-tab.active { background: rgba(124,92,255,0.2); color: var(--primary-light); }

.trade-link-swap {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
}

/* ─── Swap ─── */
.swap-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin-bottom: 6px;
  transition: border-color 0.3s;
}

.swap-card:focus-within { border-color: rgba(124,92,255,0.35); }

.swap-label { font-size: 11px; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.swap-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.swap-amount { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; background: none; border: none; color: var(--text); width: 50%; letter-spacing: -1px; }
.swap-token {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.swap-flip {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--coral));
  border: 3px solid var(--bg);
  margin: -8px auto;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 20px rgba(124,92,255,0.4);
  transition: transform 0.4s var(--spring, ease);
}

.swap-flip:active { transform: rotate(180deg) scale(0.95); }
.swap-flip svg { width: 20px; height: 20px; color: white; }

.swap-route {
  background: var(--card);
  border: 1px dashed rgba(124,92,255,0.3);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.swap-route-path { color: var(--primary-light); font-weight: 600; }

.swap-details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.swap-details div { display: flex; justify-content: space-between; margin-bottom: 10px; }
.swap-details div:last-child { margin-bottom: 0; }
.swap-details span:last-child { color: var(--text); font-weight: 500; }
.swap-balance { margin-top: 10px; font-size: 12px; }

/* ─── Asset detail ─── */
.price-hero { text-align: center; padding: 8px 0 16px; }
.price-hero-value { font-family: 'Syne', sans-serif; font-size: 40px; font-weight: 800; letter-spacing: -1.5px; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}

.stat-cell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.stat-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.stat-value { font-size: 15px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }

.sticky-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, var(--bg) 30%);
  padding: 16px 0 8px;
  margin-top: 8px;
}

/* ─── NFT ─── */
.featured-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.featured-carousel::-webkit-scrollbar { display: none; }

.featured-card {
  flex-shrink: 0;
  width: 260px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}

.featured-art {
  height: 140px;
  position: relative;
  overflow: hidden;
  background: #0E0E18;
}

.featured-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}

.featured-body { padding: 14px; }
.featured-title { font-size: 16px; font-weight: 700; }
.featured-sub { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.featured-price { font-size: 14px; font-weight: 600; color: var(--primary-light); margin-top: 8px; }

.collection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }

.collection-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s;
}

.collection-card:active { transform: scale(0.97); }

.collection-thumb {
  height: 80px;
  overflow: hidden;
  background: #0E0E18;
}

.collection-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.collection-card span { display: block; padding: 10px 12px 2px; font-weight: 600; font-size: 14px; }
.collection-card small { display: block; padding: 0 12px 12px; color: var(--text-secondary); font-size: 12px; }

.rarity-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(124,92,255,0.2);
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Staking ─── */
.validator-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 8px;
}

.validator-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.apy-badge {
  margin-left: auto;
  background: rgba(0,229,160,0.12);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,229,160,0.2);
}

/* ─── Referral / Rewards ─── */
.referral-hero {
  text-align: center;
  padding: 16px 0 24px;
  background: linear-gradient(180deg, rgba(124,92,255,0.15), transparent);
  border-radius: var(--radius-xl);
  margin-bottom: 20px;
}

.referral-hero-img {
  width: calc(100% - 32px);
  max-width: 220px;
  height: 120px;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 auto 16px;
  display: block;
  border: 1px solid var(--border);
}

.referral-code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px dashed rgba(124,92,255,0.4);
  border-radius: 14px;
  padding: 12px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-top: 16px;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.stat-card-value { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; color: var(--accent); }
.stat-card-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.achievement {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
}

.validator-icon-img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
}

.leaderboard-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.achievement-icon-img {
  width: 36px;
  height: 36px;
  display: block;
  margin: 0 auto 8px;
}
.achievement-name { font-size: 10px; font-weight: 600; color: var(--text-secondary); }

.checkin-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}

.checkin-day {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.checkin-day.done { background: rgba(0,229,160,0.15); color: var(--accent); }
.checkin-day.today { border: 2px solid var(--primary); color: var(--primary-light); }

/* ─── Analytics ─── */
.analytics-chart {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.analytics-chart-title { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; font-weight: 600; }

.benchmark-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.benchmark-row:last-child { border-bottom: none; }
.benchmark-val.up { color: var(--accent); font-weight: 600; }
.benchmark-val.down { color: var(--danger); font-weight: 600; }

/* ─── QR Scanner ─── */
.scanner-screen {
  background: #000;
  display: flex;
  flex-direction: column;
}

.scanner-viewfinder {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scanner-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.scan-frame {
  width: 260px; height: 260px;
  position: relative;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  z-index: 2;
}

.scan-corner {
  position: absolute;
  width: 24px; height: 24px;
  border: 3px solid var(--primary-light);
}

.scan-corner.tl { top: -2px; left: -2px; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.scan-corner.tr { top: -2px; right: -2px; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.scan-corner.bl { bottom: -2px; left: -2px; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.scan-corner.br { bottom: -2px; right: -2px; border-left: none; border-top: none; border-radius: 0 0 8px 0; }

.scan-line {
  position: absolute;
  left: 8px; right: 8px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  box-shadow: 0 0 12px var(--primary);
  animation: scanMove 2s ease-in-out infinite;
}

@keyframes scanMove {
  0%, 100% { top: 12px; }
  50% { top: calc(100% - 14px); }
}

.scanner-controls {
  padding: 24px 20px 40px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.scan-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.scan-btn svg { width: 24px; height: 24px; }

/* ─── Payment ─── */
.merchant-card {
  text-align: center;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
}

.merchant-logo-img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 12px;
  display: block;
  box-shadow: 0 8px 24px rgba(255,138,76,0.35);
}

.amount-display {
  font-family: 'Syne', sans-serif;
  font-size: 48px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -2px;
  margin: 24px 0;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.keypad-btn {
  height: 56px;
  border-radius: 16px;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.keypad-btn:active { background: var(--surface-elevated); }

/* ─── Security ─── */
.security-score-ring {
  width: 120px; height: 120px;
  margin: 0 auto 20px;
  position: relative;
}

.security-score-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.security-score-num { font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 800; color: var(--accent); }
.security-score-label { font-size: 11px; color: var(--text-tertiary); }

.security-alert {
  background: rgba(255,184,77,0.1);
  border: 1px solid rgba(255,184,77,0.25);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--warning);
}

/* ─── Profile ─── */
.profile-header { text-align: center; padding: 28px 0 20px; }

.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: block;
}

.profile-name { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; }

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,229,160,0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  margin-top: 8px;
  border: 1px solid rgba(0,229,160,0.2);
}

.menu-list { display: flex; flex-direction: column; gap: 6px; }

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  border-width: 1px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.menu-item:active { background: var(--surface); border-color: rgba(124,92,255,0.2); }
.menu-item.danger { color: var(--danger); }
.menu-item span:last-child { color: var(--text-tertiary); font-size: 13px; }

.menu-item-icon {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item-icon svg { width: 20px; height: 20px; color: var(--primary-light); }

.settings-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 20px 0 10px;
  padding-left: 4px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.toggle {
  width: 48px; height: 28px;
  border-radius: 14px;
  background: var(--surface-elevated);
  border: none;
  position: relative;
  cursor: pointer;
}

.toggle.on { background: var(--primary); }

.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s var(--spring, ease);
}

.toggle.on::after { transform: translateX(20px); }

/* ─── Sub screens ─── */
.sub-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 8px 12px;
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  position: relative;
  z-index: 2;
}

.back-btn {
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.back-btn:active { transform: scale(0.94); }
.back-btn svg { width: 20px; height: 20px; }

.chip-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.chip {
  height: 34px;
  padding: 0 16px;
  border-radius: 17px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: white;
}

.search-input { margin-bottom: 14px; }

.notif-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.notif-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.notif-icon svg { width: 18px; height: 18px; color: var(--primary-light); }
.notif-row strong { display: block; font-size: 14px; margin-bottom: 4px; }
.notif-row p { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-tertiary); margin-top: 6px; }

.receive-content { text-align: center; }

.qr-box {
  width: 200px; height: 200px;
  margin: 20px auto;
  background: white;
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.qr-box svg { width: 100%; height: 100%; }

.address-label { font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

.address-value {
  font-size: 12px;
  word-break: break-all;
  margin: 10px 0 20px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  background: var(--card);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.asset-price.pending { color: var(--warning); font-size: 12px; font-weight: 600; }

/* ─── Toast ─── */
.toast {
  position: absolute;
  top: 56px;
  left: 20px;
  right: 20px;
  background: var(--surface-elevated);
  border: 1px solid rgba(124,92,255,0.3);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translateY(-12px) scale(0.96);
  transition: opacity 0.3s var(--spring, ease), transform 0.3s var(--spring, ease);
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.toast.show { opacity: 1; transform: translateY(0) scale(1); }

/* ─── Screen picker (debug) ─── */
.screen-picker {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12,12,20,0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 1000;
  max-width: 90vw;
  justify-content: center;
}

.screen-picker button {
  background: var(--surface);
  border: none;
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
}

.screen-picker button.active { background: var(--primary); color: white; }

.btn-ghost-inline { margin-top: 0; margin-bottom: 8px; text-align: right; width: auto; display: inline-block; align-self: flex-end; }
