/* ═══════════════════════════════════════════════════════════════════════════
   Zillion — Ultra Premium Dark Fintech Design System 6.0
   Animated Gradients · Glassmorphism · Neon Glow · 3D Cards
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #05060d;
  --bg-card: rgba(12, 15, 30, 0.82);
  --bg-card-solid: #0c0f1e;
  --bg-elevated: #141830;
  --bg-input: rgba(10, 12, 24, 0.92);

  --accent: #3B82F6;
  --accent-light: #60A5FA;
  --accent-dark: #1D4ED8;
  --accent-violet: #A855F7;
  --accent-cyan: #22D3EE;
  --accent-blue: #38BDF8;
  --accent-rose: #FB7185;

  --accent-dim: rgba(59, 130, 246, 0.12);
  --accent-glow: rgba(59, 130, 246, 0.40);
  --accent-gradient: linear-gradient(135deg, #60A5FA 0%, #3B82F6 30%, #2563EB 60%, #1D4ED8 100%);
  --violet-dim: rgba(168, 85, 247, 0.12);
  --violet-glow: rgba(168, 85, 247, 0.30);
  --vip-gradient: linear-gradient(135deg, #1E40AF 0%, #60A5FA 20%, #2563EB 45%, #93C5FD 70%, #1D4ED8 100%);
  --metal-gradient: linear-gradient(135deg, #1a1f3a 0%, #0d1025 50%, #050714 100%);
  --card-gradient: linear-gradient(160deg, rgba(20, 24, 48, 0.92) 0%, rgba(10, 14, 28, 0.95) 100%);
  --hero-gradient: linear-gradient(160deg, rgba(20, 24, 48, 0.88) 0%, rgba(12, 16, 32, 0.95) 60%, rgba(8, 10, 20, 0.98) 100%);

  --text-1: #F1F5F9;
  --text-2: #94A3B8;
  --text-3: #64748B;
  --text-4: #475569;

  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(59, 130, 246, 0.30);
  --border-strong: rgba(255, 255, 255, 0.10);

  --success: #34D399;
  --error: #F87171;
  --warning: #60A5FA;
  --info: #60A5FA;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15), 0 0 80px rgba(59, 130, 246, 0.06);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-xl: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(59, 130, 246, 0.10);

  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

/* ─── GLOBAL RESET ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-1);
  background: var(--bg);
  min-height: 100vh; min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  user-select: none; -webkit-user-select: none;
}

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  top: -20%; left: -10%;
  width: 60%; height: 50%;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -30%; right: -20%;
  width: 70%; height: 60%;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.25); border-radius: 4px; }
::selection { background: rgba(59, 130, 246, 0.3); color: var(--text-1); }

button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; outline: none; cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); }

/* ─── APP SHELL ────────────────────────────────────────────────────────────── */
#app { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ─── HEADER — Frosted Glass ───────────────────────────────────────────────── */
.app-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  padding-top: calc(14px + var(--safe-top));
  background: rgba(5, 6, 13, 0.75);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.brand-badge { display: flex; align-items: center; gap: 10px; }

.header-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.5), 0 0 48px rgba(59, 130, 246, 0.2);
  animation: logoBreath 4s ease-in-out infinite alternate;
}

@keyframes logoBreath {
  0%   { box-shadow: 0 0 18px rgba(59, 130, 246, 0.35), 0 0 36px rgba(59, 130, 246, 0.12); filter: brightness(1); }
  100% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.55), 0 0 60px rgba(59, 130, 246, 0.22); filter: brightness(1.1); }
}

.header-title {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #93C5FD, #3B82F6, #2563EB);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.status-dot-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success), 0 0 20px rgba(52, 211, 153, 0.3);
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--success), 0 0 20px rgba(52, 211, 153, 0.3); }
  50%      { opacity: 0.5; box-shadow: 0 0 6px var(--success), 0 0 12px rgba(52, 211, 153, 0.2); }
}

.header-right { display: flex; gap: 8px; }

.app-header .back-btn,
.header-icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.app-header .back-btn:active,
.header-icon-btn:active {
  transform: scale(0.88);
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--border-accent);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
}

/* ─── MAIN CONTENT ─────────────────────────────────────────────────────────── */
.app-content {
  flex: 1;
  padding: 16px 20px 110px;
  padding-bottom: calc(110px + var(--safe-bottom));
}

/* ─── BOTTOM NAV — Elevated Glass ──────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 120;
  display: flex; align-items: flex-end; justify-content: space-around;
  padding: 8px 8px;
  padding-bottom: calc(8px + var(--safe-bottom));
  background: rgba(5, 6, 13, 0.88);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; color: var(--text-4); flex: 1;
  padding: 8px 4px 4px;
  transition: all 0.2s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.nav-label { font-size: 11px; font-weight: 600; }

.nav-item.active { color: var(--accent); }
.nav-item.active .nav-label { font-weight: 800; color: var(--accent); }

/* Active indicator glow bar */
.nav-item.active::before {
  content: '';
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px; border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow), 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Floating CTA */
.nav-item-cta { position: relative; }
.nav-item-cta .cta-icon-wrap {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 8px 28px rgba(59, 130, 246, 0.4),
    0 2px 8px rgba(59, 130, 246, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
  transform: translateY(-14px);
  transition: all 0.2s ease;
  position: relative;
}

/* Glow ring behind CTA */
.nav-item-cta .cta-icon-wrap::before {
  content: '';
  position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 70%);
  animation: ctaPulse 3s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.15); opacity: 0.3; }
}

.nav-item-cta:active .cta-icon-wrap { transform: translateY(-14px) scale(0.9); }
.nav-item-cta .nav-label { margin-top: -8px; color: var(--text-3); }

/* ─── USER HERO ────────────────────────────────────────────────────────────── */
.user-hero {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0 16px;
  animation: fadeInDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.user-info { display: flex; align-items: center; gap: 14px; }

.user-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(145deg, #141830, #1a1f3a);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 900; font-size: 20px;
  color: var(--accent);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.25);
  position: relative;
}

/* Animated rotating gradient ring */
.user-avatar::after {
  content: '';
  position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), transparent 30%, var(--accent-violet), transparent 60%, var(--accent-cyan), transparent 90%, var(--accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 2px;
  animation: avatarSpin 8s linear infinite;
  opacity: 0.7;
}
@keyframes avatarSpin { to { transform: rotate(360deg); } }

.user-greeting { font-size: 13px; color: var(--text-3); font-weight: 500; line-height: 1.2; }
.user-name { font-family: var(--font-heading); font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }

/* VIP Badge with shimmer */
.header-tag {
  padding: 6px 14px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 11px; font-weight: 800; color: var(--accent);
  letter-spacing: 0.5px; text-transform: uppercase;
  position: relative; overflow: hidden;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.1);
}
.header-tag::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent 25%, rgba(59, 130, 246, 0.2) 50%, transparent 75%);
  animation: tagShimmer 4s ease-in-out infinite;
}
@keyframes tagShimmer {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(50%); }
}

/* ─── BALANCE HERO CARD — Animated Border ──────────────────────────────────── */
.balance-hero-card {
  background: var(--hero-gradient);
  border-radius: var(--radius-xl);
  padding: 24px 24px 22px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* Animated gradient border */
.balance-hero-card::before {
  content: '';
  position: absolute; inset: 0; border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(168, 85, 247, 0.2), rgba(34, 211, 238, 0.15), rgba(59, 130, 246, 0.3));
  background-size: 300% 300%;
  animation: borderGlow 6s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

@keyframes borderGlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Top right glow orb */
.balance-hero-card::after {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
  animation: orbFloat 5s ease-in-out infinite alternate;
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-10px, 10px) scale(1.2); }
}

.balance-hero-label {
  font-size: 11px; color: var(--text-3);
  font-weight: 700; text-transform: uppercase; letter-spacing: 2px;
  position: relative; z-index: 1;
}

.balance-hero-amount {
  font-family: var(--font-heading);
  font-size: 44px; font-weight: 900; letter-spacing: -2px;
  margin: 6px 0 16px;
  background: linear-gradient(135deg, #ffffff 20%, #93C5FD 40%, #60A5FA 60%, #3B82F6 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: textShine 4s linear infinite;
  position: relative; z-index: 1;
  line-height: 1.1;
}

@keyframes textShine {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.balance-hero-actions { display: flex; gap: 10px; position: relative; z-index: 1; }

/* ─── 3D CREDIT CARD — Ultra Realistic with Persistent 3D ──────────────────── */
.card-flip-container { perspective: 1200px; margin: 16px 0 24px; touch-action: pan-y; }

.card-visual {
  width: 100%;
  aspect-ratio: 1.586;
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(145deg, #0d1228 0%, #161d40 30%, #1a2348 60%, #0b0f20 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 30px 60px -12px rgba(0, 0, 0, 0.9),
    0 0 50px rgba(59, 130, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative; overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
  will-change: transform;
  /* DEFAULT 3D TILT — card always looks angled */
  transform: perspective(1000px) rotateX(3deg) rotateY(-2deg);
  animation: card3DFloat 6s ease-in-out infinite, card3DEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

/* Floating 3D animation — gentle rocking */
@keyframes card3DFloat {
  0%, 100% {
    transform: perspective(1000px) rotateX(3deg) rotateY(-2deg) translateY(0px);
    box-shadow:
      0 30px 60px -12px rgba(0, 0, 0, 0.9),
      0 0 50px rgba(59, 130, 246, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  25% {
    transform: perspective(1000px) rotateX(1deg) rotateY(2deg) translateY(-4px);
  }
  50% {
    transform: perspective(1000px) rotateX(-2deg) rotateY(1deg) translateY(-6px);
    box-shadow:
      0 40px 80px -12px rgba(0, 0, 0, 0.85),
      0 0 60px rgba(59, 130, 246, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
  75% {
    transform: perspective(1000px) rotateX(0deg) rotateY(-3deg) translateY(-3px);
  }
}

@keyframes card3DEntrance {
  from { opacity: 0; transform: perspective(1000px) rotateX(25deg) rotateY(-8deg) translateY(60px) scale(0.85); }
  to   { opacity: 1; transform: perspective(1000px) rotateX(3deg) rotateY(-2deg) translateY(0) scale(1); }
}

.card-visual.skin-pro {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 50%, #020617 100%);
  border-color: rgba(255, 255, 255, 0.18);
}

.card-visual.skin-vip {
  background: var(--vip-gradient);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow:
    0 35px 70px -12px rgba(0, 0, 0, 0.8),
    0 0 80px rgba(59, 130, 246, 0.15),
    0 0 120px rgba(59, 130, 246, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.card-visual.skin-vip .card-number-row,
.card-visual.skin-vip .card-value,
.card-visual.skin-vip .card-holder-name,
.card-visual.skin-vip .card-brand-logo { color: #ffffff !important; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important; }

/* Specular glare — ALWAYS slightly visible for 3D depth */
.card-glare {
  position: absolute; inset: 0; border-radius: var(--radius-xl);
  pointer-events: none;
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.25), transparent 50%);
  opacity: 0.5;
  transition: opacity 0.3s ease, background 0.3s ease;
  z-index: 8;
  mix-blend-mode: overlay;
  animation: glareShift 8s ease-in-out infinite alternate;
}

@keyframes glareShift {
  0%   { background: radial-gradient(ellipse at 25% 15%, rgba(255, 255, 255, 0.2), transparent 50%); }
  50%  { background: radial-gradient(ellipse at 65% 30%, rgba(255, 255, 255, 0.15), transparent 55%); }
  100% { background: radial-gradient(ellipse at 40% 60%, rgba(255, 255, 255, 0.18), transparent 50%); }
}

/* Top edge reflection — creates depth */
.card-visual > .card-top::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%);
  pointer-events: none; z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Holographic rainbow shimmer — MORE VISIBLE */
.card-visual::before {
  content: ''; position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(115deg,
    transparent 15%,
    rgba(255, 255, 255, 0.12) 30%,
    rgba(59, 130, 246, 0.2) 38%,
    rgba(168, 85, 247, 0.12) 45%,
    rgba(34, 211, 238, 0.1) 52%,
    rgba(251, 113, 133, 0.06) 58%,
    rgba(255, 255, 255, 0.08) 68%,
    transparent 85%
  );
  pointer-events: none;
  animation: holoShimmer 4s infinite linear;
}
@keyframes holoShimmer { 0% { transform: translateX(-150%); } 100% { transform: translateX(150%); } }

/* Subtle noise texture for metallic feel */
.card-visual::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  opacity: 0.04;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none; border-radius: var(--radius-xl);
}

.card-top { display: flex; justify-content: space-between; align-items: center; z-index: 4; transform: translateZ(30px); position: relative; }

/* 3D Embossed Chip */
.card-chip {
  width: 46px; height: 34px; border-radius: 8px;
  background: linear-gradient(160deg, #60A5FA 0%, #3B82F6 40%, #1D4ED8 80%, #1E3A8A 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -2px 3px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}
.card-chip::before {
  content: '';
  position: absolute; inset: 3px;
  border-radius: 5px;
  background: linear-gradient(145deg, #60A5FA, #2563EB);
  opacity: 0.3;
}
.card-chip::after {
  content: ''; position: absolute; top: 7px; left: 7px; width: 32px; height: 20px;
  border: 1.5px solid rgba(0, 0, 0, 0.15); border-radius: 3px;
}

.card-brand-logo {
  font-family: var(--font-heading); font-size: 17px; font-weight: 900;
  letter-spacing: 2.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* 3D Embossed Numbers */
.card-number-row {
  font-family: var(--font-mono); font-size: 22px; font-weight: 700;
  letter-spacing: 4px; color: #ffffff;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.6),
    0 4px 8px rgba(0, 0, 0, 0.3),
    0 0 1px rgba(255, 255, 255, 0.5),
    0 -1px 0 rgba(255, 255, 255, 0.15);
  z-index: 4; transform: translateZ(40px); margin: 14px 0 8px;
}

.card-bottom { display: flex; justify-content: space-between; align-items: flex-end; z-index: 4; transform: translateZ(30px); }
.card-label { font-size: 8px; text-transform: uppercase; color: rgba(255,255,255,0.4); letter-spacing: 2px; font-weight: 700; }
.card-value {
  font-family: var(--font-mono); font-size: 14px; color: #ffffff;
  letter-spacing: 1.5px; font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 -1px 0 rgba(255, 255, 255, 0.1);
}
.card-holder-name {
  font-family: var(--font-heading); font-size: 12px; text-transform: uppercase;
  letter-spacing: 2.5px; font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 -1px 0 rgba(255, 255, 255, 0.1);
}

/* ─── QUICK ACTIONS — Bento Glass Grid ─────────────────────────────────────── */
.actions-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin: 16px 0 24px;
}

.action-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 16px 6px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(20, 24, 48, 0.7), rgba(12, 15, 30, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  cursor: pointer; text-align: center;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

/* Subtle hover glow */
.action-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(59, 130, 246, 0.08), transparent 70%);
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}

.action-card:active { transform: scale(0.94); }
.action-card:active::before { opacity: 1; }
.action-card:active { border-color: rgba(59, 130, 246, 0.2); }

.action-icon-wrap {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.03));
  border: 1px solid rgba(59, 130, 246, 0.18);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 12px rgba(59, 130, 246, 0.06);
  transition: all 0.2s ease;
}

.action-label { font-size: 12px; font-weight: 700; color: var(--text-2); }

/* Stagger entrance */
.actions-grid .action-card:nth-child(1) { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
.actions-grid .action-card:nth-child(2) { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both; }
.actions-grid .action-card:nth-child(3) { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.29s both; }
.actions-grid .action-card:nth-child(4) { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both; }

/* ─── CARD LIST ────────────────────────────────────────────────────────────── */
.card-list { display: flex; flex-direction: column; gap: 10px; }

.card-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(20, 24, 48, 0.65), rgba(12, 15, 30, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.card-item:active { transform: scale(0.97); border-color: rgba(59, 130, 246, 0.15); }

.card-item-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(168, 85, 247, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); flex-shrink: 0;
}

.card-item-info { flex: 1; min-width: 0; }
.card-item-name { font-family: var(--font-heading); font-size: 15px; font-weight: 800; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-item-sub { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); margin-top: 3px; }
.card-item-balance { text-align: right; flex-shrink: 0; }
.card-item-amount { font-family: var(--font-mono); font-size: 16px; font-weight: 800; }

/* ─── CRYPTO WALLET ACCORDION ──────────────────────────────────────────────── */
.crypto-wallet-list { display: flex; flex-direction: column; gap: 10px; }

.crypto-wallet-row {
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(20, 24, 48, 0.6), rgba(12, 15, 30, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  overflow: hidden; cursor: pointer;
}

.crypto-wallet-row.expanded {
  border-color: rgba(59, 130, 246, 0.2);
  background: linear-gradient(160deg, rgba(25, 30, 55, 0.7), rgba(14, 18, 35, 0.9));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(59, 130, 246, 0.06);
}

.crypto-row-main { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; gap: 10px; }
.crypto-row-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.crypto-row-icon { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 4px 14px rgba(0,0,0,0.5); flex-shrink: 0; }
.crypto-row-title-wrap { min-width: 0; }
.crypto-row-title { font-family: var(--font-heading); font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crypto-row-rate { font-size: 12px; color: var(--accent-blue); font-weight: 600; font-family: var(--font-mono); margin-top: 2px; }
.crypto-row-sparkline { width: 68px; height: 26px; opacity: 0.7; flex-shrink: 0; }
.crypto-row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.crypto-row-balance { font-family: var(--font-mono); font-size: 13px; font-weight: 700; text-align: right; }
.crypto-row-chevron { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--text-4); transition: transform 0.3s ease; }
.crypto-wallet-row.expanded .crypto-row-chevron { transform: rotate(180deg); color: var(--accent); }

.crypto-row-drawer {
  padding: 0 16px 16px; border-top: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: 2px; padding-top: 14px;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); max-height: 0; }
  to   { opacity: 1; transform: translateY(0); max-height: 200px; }
}

.drawer-addr-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px;
  background: rgba(10, 12, 24, 0.8);
  border-radius: var(--radius-sm); border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-3);
  word-break: break-all;
}

.drawer-action-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); transition: all 0.2s; flex-shrink: 0;
}
.drawer-action-btn:active { transform: scale(0.88); background: rgba(59, 130, 246, 0.15); }

/* ─── TIER SELECTOR ────────────────────────────────────────────────────────── */
.tier-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.tier-card {
  padding: 18px 20px; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(20, 24, 48, 0.6), rgba(12, 15, 30, 0.8));
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  transition: all 0.25s ease; cursor: pointer;
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.tier-card.active {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.08), rgba(20, 24, 48, 0.7));
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.1), inset 0 0 20px rgba(59, 130, 246, 0.03);
}

/* Check indicator */
.tier-card.active::before {
  content: ''; position: absolute; top: 12px; right: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
.tier-card.active::after {
  content: '✓'; position: absolute; top: 14px; right: 18px;
  color: #ffffff; font-size: 13px; font-weight: 900; z-index: 1;
}

.tier-title { font-family: var(--font-heading); font-size: 17px; font-weight: 800; }
.tier-desc { font-size: 13px; color: var(--text-3); margin-top: 4px; font-weight: 600; }

/* ─── AMOUNT PRESETS ───────────────────────────────────────────────────────── */
.amount-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.amount-preset {
  padding: 16px; border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(20, 24, 48, 0.6), rgba(12, 15, 30, 0.8));
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-heading); font-size: 18px; font-weight: 800;
  transition: all 0.2s ease; cursor: pointer; text-align: center;
  color: var(--text-1);
  -webkit-tap-highlight-color: transparent;
}

.amount-preset.active {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.1), rgba(20, 24, 48, 0.7));
  color: var(--accent);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.1);
}
.amount-preset:active { transform: scale(0.95); }

/* ─── CRYPTO OPTIONS ───────────────────────────────────────────────────────── */
.crypto-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.crypto-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(20, 24, 48, 0.6), rgba(12, 15, 30, 0.8));
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.crypto-option.active {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.08), rgba(20, 24, 48, 0.7));
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.08);
}
.crypto-option:active { transform: scale(0.96); }
.crypto-option img { width: 34px; height: 34px; border-radius: 50%; }
.crypto-name { font-family: var(--font-heading); font-size: 14px; font-weight: 800; }
.crypto-network { font-size: 10px; color: var(--accent-cyan); font-weight: 700; background: rgba(34, 211, 238, 0.08); padding: 2px 7px; border-radius: 6px; display: inline-block; margin-top: 2px; }

/* ─── PAYMENT VIEW ─────────────────────────────────────────────────────────── */
.payment-amount {
  text-align: center; padding: 24px 0 16px;
  animation: fadeInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.amount-value {
  font-family: var(--font-heading); font-size: 30px; font-weight: 900;
  background: linear-gradient(135deg, #ffffff, #93C5FD, #3B82F6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.payment-box {
  background: linear-gradient(160deg, rgba(20, 24, 48, 0.7), rgba(12, 15, 30, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.06); border-radius: var(--radius-xl);
  padding: 24px; margin-bottom: 20px;
  backdrop-filter: blur(12px);
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
.payment-address {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; background: rgba(10, 12, 24, 0.8);
  border-radius: var(--radius-sm); border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}
.payment-address code { font-size: 12px; color: var(--text-3); word-break: break-all; flex: 1; line-height: 1.4; }
.copy-btn {
  padding: 8px 16px; border-radius: 10px;
  background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--accent); font-size: 13px; font-weight: 700;
  transition: all 0.2s; flex-shrink: 0;
}
.copy-btn:active { transform: scale(0.9); background: rgba(59, 130, 246, 0.18); }
.payment-qr { display: flex; justify-content: center; padding: 16px 0; }
.payment-qr img {
  width: 180px; height: 180px; border-radius: var(--radius-md);
  padding: 12px; background: #ffffff;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.06), 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ─── MODAL BOTTOM SHEET ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }

.modal-sheet {
  width: 100%; max-width: 480px; max-height: 85vh;
  background: linear-gradient(180deg, #141830, #0c0f1e);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid rgba(255, 255, 255, 0.06); border-bottom: none;
  overflow: hidden;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Drag handle */
.modal-sheet::before {
  content: ''; display: block;
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.15); margin: 10px auto 0;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.modal-title { font-family: var(--font-heading); font-size: 18px; font-weight: 800; display: flex; align-items: center; }
.modal-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06); display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text-3); transition: all 0.2s;
}
.modal-close-btn:active { background: rgba(255, 255, 255, 0.12); transform: scale(0.88); }
.modal-body { padding: 20px; overflow-y: auto; max-height: calc(85vh - 100px); }

/* ─── TOASTS ───────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 1000; width: calc(100vw - 32px); max-width: 420px;
  display: flex; flex-direction: column; gap: 8px;
}

.toast-pill {
  padding: 14px 18px; border-radius: 50px;
  background: rgba(12, 15, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.03);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-pill.success { border-color: rgba(52, 211, 153, 0.25); }
.toast-pill.error { border-color: rgba(248, 113, 113, 0.25); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── EMPTY STATES ─────────────────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 40px 20px;
}
.empty-icon-svg { margin-bottom: 16px; color: var(--text-4); opacity: 0.5; }
.empty-title { font-family: var(--font-heading); font-size: 17px; font-weight: 800; color: var(--text-2); margin-bottom: 8px; }
.empty-text { font-size: 13px; color: var(--text-3); line-height: 1.5; max-width: 280px; }

/* ─── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 15px 28px; border-radius: var(--radius-md);
  font-family: var(--font-heading); font-size: 15px; font-weight: 800;
  transition: all 0.2s ease; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
}

.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.35; pointer-events: none; }

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* Shimmer sweep on primary button */
.btn-primary::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: none;
}
.btn-primary:not(:disabled):active::before { left: 100%; transition: left 0.5s ease; }

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-1); border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-secondary:active { background: rgba(255, 255, 255, 0.08); }

.btn-ghost {
  background: transparent; color: var(--text-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-ghost:active { background: rgba(255, 255, 255, 0.04); }

.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 13px; border-radius: var(--radius-sm); }

/* ─── BADGES ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; padding: 4px 12px;
  border-radius: 20px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-active { background: rgba(52, 211, 153, 0.12); color: var(--success); border: 1px solid rgba(52, 211, 153, 0.2); }
.badge-frozen { background: rgba(96, 165, 250, 0.12); color: var(--info); border: 1px solid rgba(96, 165, 250, 0.2); }
.badge-closed { background: rgba(248, 113, 113, 0.12); color: var(--error); border: 1px solid rgba(248, 113, 113, 0.2); }

/* ─── STEP INDICATOR ───────────────────────────────────────────────────────── */
.step-indicator { display: flex; align-items: center; margin-bottom: 24px; padding: 0 8px; }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.04); border: 2px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 12px; font-weight: 800;
  color: var(--text-4); flex-shrink: 0;
  transition: all 0.3s ease;
}
.step-dot.active {
  background: var(--accent-gradient); border-color: var(--accent); color: #ffffff;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.3);
}
.step-dot.completed { background: var(--success); border-color: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: rgba(255, 255, 255, 0.06); transition: background 0.3s; }
.step-line.active { background: var(--accent); box-shadow: 0 0 8px rgba(59, 130, 246, 0.2); }

/* ─── SKELETON ─────────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, rgba(20, 24, 48, 0.6) 25%, rgba(30, 35, 60, 0.8) 50%, rgba(20, 24, 48, 0.6) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-lg);
}
.skeleton-card { height: 76px; margin-bottom: 10px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── SPINNER ──────────────────────────────────────────────────────────────── */
.spinner-glow {
  width: 36px; height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.06);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.15);
}
.spinner-center { display: flex; justify-content: center; align-items: center; padding: 40px 0; }

/* ─── SECTIONS & UTILS ────────────────────────────────────────────────────── */
.section { margin-bottom: 24px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-family: var(--font-heading); font-size: 17px; font-weight: 800; color: var(--text-1); letter-spacing: -0.2px; }

.text-center { text-align: center; }
.text-muted  { color: var(--text-2); }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 11px; }

.mt-sm  { margin-top: 8px; }
.mt-md  { margin-top: 16px; }
.mt-lg  { margin-top: 24px; }
.mb-sm  { margin-bottom: 8px; }
.mb-md  { margin-bottom: 16px; }
.mb-lg  { margin-bottom: 24px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── VIEW TRANSITION ──────────────────────────────────────────────────────── */
.view-enter { animation: viewIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ─── KEYFRAMES ────────────────────────────────────────────────────────────── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 374px) {
  .app-content { padding: 12px 14px 100px; }
  .balance-hero-amount { font-size: 36px; }
  .card-number-row { font-size: 18px; letter-spacing: 2px; }
  .actions-grid { gap: 6px; }
  .action-card { padding: 12px 4px; }
  .action-icon-wrap { width: 40px; height: 40px; }
  .action-label { font-size: 11px; }
  .crypto-grid { grid-template-columns: 1fr; }
  .amount-presets { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 431px) {
  .app-content { padding: 16px 24px 110px; }
  .card-visual { max-width: 420px; margin-left: auto; margin-right: auto; }
  .balance-hero-card { max-width: 500px; }
}

@media (orientation: landscape) and (max-height: 500px) {
  .balance-hero-card { padding: 16px; margin-bottom: 12px; }
  .balance-hero-amount { font-size: 28px; margin: 4px 0 10px; }
  .card-visual { max-height: 200px; }
  .app-content { padding-bottom: 80px; }
}
