@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ponytail: custom font Pajarakan Studs for PocketNest brand name */
@font-face {
  font-family: 'Pajarakan Studs';
  src: url('../../assets/Pajarakan Studs.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-page: #F8F5F0;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-solid: #FFFFFF;
  --bg-input: #F0ECE5;
  --border-color: #E5DDD3;
  --border-glass: rgba(255, 255, 255, 0.75);
  --text-main: #1C1917;
  --text-muted: #78716C;
  --text-inverse: #FFFFFF;
  
  --primary: #E07A5F;
  --primary-light: #FDEEE9;
  --primary-dark: #B95337;
  
  --secondary: #81B29A;
  --secondary-light: #EBF4F0;
  
  --accent-gold: #F2CC8F;
  --accent-blue: #3D405B;
  
  --danger: #E63946;
  --danger-light: #FDE8EA;
  
  --success: #52B788;
  --success-light: #EAF7F1;
  
  --shadow-sm: 0 2px 10px rgba(28, 25, 23, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-md: 0 8px 24px rgba(28, 25, 23, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --shadow-lg: 0 18px 44px rgba(28, 25, 23, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --shadow-glow: 0 10px 28px rgba(224, 122, 95, 0.26);
  
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
  
  --font-sans: 'Plus Jakarta Sans', 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-brand: 'Pajarakan Studs', 'Plus Jakarta Sans', sans-serif;
  
  --anim-cozy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --anim-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

.font-brand,
.brand-name,
.brand,
.splash-title {
  font-family: var(--font-brand) !important;
}


[data-theme="forest"] {
  --bg-page: #F2F7F4;
  --bg-card: rgba(255, 255, 255, 0.84);
  --bg-card-solid: #FFFFFF;
  --bg-input: #E7F0EB;
  --border-color: #D6E4DB;
  --text-main: #142E21;
  --text-muted: #5C7A6B;
  --primary: #3A7D55;
  --primary-light: #E4F0E8;
  --primary-dark: #27593B;
  --shadow-glow: 0 8px 24px rgba(58, 125, 85, 0.25);
}

[data-theme="sakura"] {
  --bg-page: #FDF5F7;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-solid: #FFFFFF;
  --bg-input: #F8E9ED;
  --border-color: #F0D4DC;
  --text-main: #361C23;
  --text-muted: #8A5F6C;
  --primary: #D9777F;
  --primary-light: #FBEBED;
  --primary-dark: #AD4B53;
  --shadow-glow: 0 8px 24px rgba(217, 119, 127, 0.25);
}

[data-theme="ocean"] {
  --bg-page: #F0F4F8;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-solid: #FFFFFF;
  --bg-input: #E2EAF2;
  --border-color: #CEDCEB;
  --text-main: #13273D;
  --text-muted: #59738E;
  --primary: #3A6EA5;
  --primary-light: #E5EEF7;
  --primary-dark: #23476E;
  --shadow-glow: 0 8px 24px rgba(58, 110, 165, 0.25);
}

[data-theme="amoled"] {
  --bg-page: #000000;
  --bg-card: rgba(18, 18, 20, 0.88);
  --bg-card-solid: #121214;
  --bg-input: #1C1C20;
  --border-color: #2D2D35;
  --border-glass: rgba(255, 255, 255, 0.12);
  --text-main: #F4F4F6;
  --text-muted: #9E9EA8;
  --text-inverse: #000000;
  --primary: #FFB703;
  --primary-light: rgba(255, 183, 3, 0.16);
  --primary-dark: #D49400;
  --secondary: #00F5D4;
  --secondary-light: rgba(0, 245, 212, 0.16);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  --shadow-glow: 0 8px 24px rgba(255, 183, 3, 0.3);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  transition: background-color 0.4s var(--anim-smooth), color 0.4s var(--anim-smooth);
}

/* 5. SPLASH SCREEN */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
.splash-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}
.splash-content {
  text-align: center;
  color: white;
}
.splash-icon-ring {
  width: 170px;
  height: 170px;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  animation: splashPulse 2s ease-in-out infinite;
}
.splash-feather {
  width: 48px;
  height: 48px;
  color: white;
  animation: splashSpin 2.5s ease-in-out;
}
.splash-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.splash-tagline {
  font-size: 0.9rem;
  opacity: 0.85;
  font-weight: 300;
}
.splash-loader {
  width: 120px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 9999px;
  margin: 24px auto 0 auto;
  overflow: hidden;
}
.splash-loader-bar {
  width: 30%;
  height: 100%;
  background: white;
  border-radius: 9999px;
  animation: splashLoad 2.5s ease-in-out;
}

@keyframes splashPulse { 
  0%, 100% { transform: scale(1); } 
  50% { transform: scale(1.08); } 
}
@keyframes splashSpin { 
  0% { transform: rotate(-30deg) scale(0.5); opacity: 0; } 
  50% { transform: rotate(10deg) scale(1.1); } 
  100% { transform: rotate(0deg) scale(1); opacity: 1; } 
}
@keyframes splashLoad { 
  0% { transform: translateX(-100%); } 
  100% { transform: translateX(400%); } 
}

/* 6. ONBOARDING */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.onboarding-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.onboard-step-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.onboard-step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.45;
}
.onboard-icon-big {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  animation: popIn 0.4s var(--anim-cozy);
}
.step-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  transition: all 0.3s ease;
}
.step-dot.active {
  width: 24px;
  background: var(--primary);
  border-radius: 9999px;
}
.currency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.currency-option {
  padding: 14px 10px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  background: var(--bg-card-solid);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
  text-align: center;
}
.currency-option:hover {
  border-color: var(--primary);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(224, 122, 95, 0.15);
}
.currency-option:active, .currency-option:hover:active {
  transform: translateY(1px) scale(0.95);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.currency-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.currency-option.selected:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(224, 122, 95, 0.3);
}

/* 7. APP CONTAINER */
#app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  background: var(--bg-page);
  background-image: 
    radial-gradient(circle at 10% 5%, rgba(224, 122, 95, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 90% 40%, rgba(129, 178, 154, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 20% 85%, rgba(61, 64, 91, 0.05) 0%, transparent 45%);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(0,0,0,0.1);
  overflow-x: hidden;
  padding-bottom: 90px;
}

/* 8. TYPOGRAPHY HELPERS */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
}
.text-mono {
  font-family: var(--font-mono);
}

/* 9. GLASS CARD */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--anim-cozy), box-shadow 0.2s;
}
.glass-card:active {
  transform: scale(0.98);
}

/* 10. KEYFRAME ANIMATIONS */
@keyframes mascotBob { 
  0%, 100% { transform: translateY(0) rotate(0deg); } 
  50% { transform: translateY(-6px) rotate(1.5deg); } 
}
@keyframes mascotWiggle { 
  0%, 100% { transform: rotate(0deg); } 
  25% { transform: rotate(-8deg); } 
  75% { transform: rotate(8deg); } 
}
@keyframes popIn { 
  0% { opacity: 0; transform: scale(0.85) translateY(10px); } 
  100% { opacity: 1; transform: scale(1) translateY(0); } 
}
@keyframes slideUpFade { 
  0% { opacity: 0; transform: translateY(24px); } 
  100% { opacity: 1; transform: translateY(0); } 
}
@keyframes slideInRight { 
  0% { opacity: 0; transform: translateX(30px); } 
  100% { opacity: 1; transform: translateX(0); } 
}
@keyframes slideInLeft { 
  0% { opacity: 0; transform: translateX(-30px); } 
  100% { opacity: 1; transform: translateX(0); } 
}
@keyframes fadeIn { 
  0% { opacity: 0; } 
  100% { opacity: 1; } 
}
@keyframes pulseGlow { 
  0%, 100% { box-shadow: 0 0 12px rgba(224,122,95,0.2); } 
  50% { box-shadow: 0 0 28px rgba(224,122,95,0.5); } 
}
@keyframes shimmer { 
  0% { background-position: -200% 0; } 
  100% { background-position: 200% 0; } 
}
@keyframes progressFill { 
  0% { width: 0; } 
}
@keyframes countUp { 
  0% { opacity: 0; transform: translateY(8px); } 
  100% { opacity: 1; transform: translateY(0); } 
}
@keyframes cardEntrance { 
  0% { opacity: 0; transform: translateY(16px) scale(0.97); } 
  100% { opacity: 1; transform: translateY(0) scale(1); } 
}
@keyframes toastIn { 
  0% { transform: translateY(30px); opacity: 0; } 
  100% { transform: translateY(0); opacity: 1; } 
}
@keyframes toastOut { 
  0% { transform: translateY(0); opacity: 1; } 
  100% { transform: translateY(-20px); opacity: 0; } 
}

/* 11. ANIMATION UTILITY CLASSES */
.anim-bob { animation: mascotBob 3.5s ease-in-out infinite; }
.anim-pop { animation: popIn 0.35s var(--anim-cozy) forwards; }
.anim-slide-up { animation: slideUpFade 0.4s var(--anim-smooth) forwards; }
.anim-slide-right { animation: slideInRight 0.35s var(--anim-smooth) forwards; }
.anim-slide-left { animation: slideInLeft 0.35s var(--anim-smooth) forwards; }
.anim-fade { animation: fadeIn 0.3s ease forwards; }
.anim-wiggle { animation: mascotWiggle 0.6s ease-in-out; }
.anim-card-enter { animation: cardEntrance 0.35s var(--anim-smooth) forwards; opacity: 0; }

.item-card-list > *:nth-child(1) { animation-delay: 0s; }
.item-card-list > *:nth-child(2) { animation-delay: 0.06s; }
.item-card-list > *:nth-child(3) { animation-delay: 0.12s; }
.item-card-list > *:nth-child(4) { animation-delay: 0.18s; }
.item-card-list > *:nth-child(5) { animation-delay: 0.24s; }
.item-card-list > *:nth-child(6) { animation-delay: 0.3s; }
.item-card-list > *:nth-child(7) { animation-delay: 0.36s; }
.item-card-list > *:nth-child(8) { animation-delay: 0.42s; }

/* 12. MASCOT HEADER */
.mascot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 14px 20px;
}
.mascot-box {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.mascot-avatar {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
}
.mascot-greeting {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.3;
}
.mascot-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.3;
}
.header-actions {
  display: flex;
  gap: 10px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
}
.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 16px rgba(224, 122, 95, 0.2);
}
.icon-btn:active, .icon-btn:hover:active {
  transform: translateY(1px) scale(0.92);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

/* 13. NET WORTH / BALANCE CARD (HIGH-END DOUBLE BEZEL) */
.networth-card {
  margin: 0 20px 24px 20px;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-xl);
  color: white;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), var(--shadow-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--anim-smooth), box-shadow 0.35s var(--anim-smooth);
}
.networth-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
.networth-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 18px 40px rgba(224, 122, 95, 0.38);
}

.networth-label {
  font-size: 0.78rem;
  opacity: 0.88;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
}
.networth-amount {
  font-size: 2.35rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.networth-stats-row {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  gap: 12px;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.stat-item i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.networth-decor {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 120px;
  height: 120px;
  opacity: 0.1;
  color: white;
}

/* 14. QUICK ACTIONS GRID */
.quick-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 20px;
  margin-bottom: 28px;
}
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
}
.action-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
  box-shadow: var(--shadow-sm);
}
.action-btn:hover .action-icon {
  transform: translateY(-4px) scale(1.08);
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 8px 20px rgba(224, 122, 95, 0.2);
}
.action-btn:active .action-icon, .action-btn:hover:active .action-icon {
  transform: translateY(1px) scale(0.92);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.action-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  transition: color 0.2s ease;
}
.action-btn:hover .action-label {
  color: var(--primary);
}

/* 15. SECTION TITLE */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  margin: 16px 0 12px 0;
}
.section-title h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.see-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--anim-cozy), opacity 0.2s ease;
}
.see-all:hover {
  transform: translateX(3px);
  opacity: 0.85;
}

/* 16. TRANSACTION CARD LIST */
.item-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px;
}
.transaction-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), var(--shadow-sm);
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
  cursor: pointer;
}
.transaction-card:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: var(--primary);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8), 0 8px 24px rgba(0, 0, 0, 0.07);
}
.transaction-card:active, .transaction-card:hover:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 2px 6px rgba(0, 0, 0, 0.03);
}
.card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.category-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-input);
  color: var(--text-main);
}
.card-info .title {
  font-size: 0.9rem;
  font-weight: 600;
}
.card-info .subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.card-amount {
  font-weight: 600;
  font-size: 0.95rem;
  text-align: right;
}
.card-amount.expense {
  color: var(--text-main);
}
.card-amount.income {
  color: var(--success);
}

/* 17. SEARCH BAR */
.search-wrapper {
  padding: 0 20px;
  margin-bottom: 10px;
}
.search-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
}
.search-bar:hover {
  border-color: var(--primary);
  background: var(--bg-card-solid);
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
.search-bar:focus-within {
  border-color: var(--primary);
  background: var(--bg-card-solid);
  box-shadow: 0 0 0 4px var(--primary-light), 0 6px 18px rgba(0,0,0,0.06);
}
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
}
.search-bar input::placeholder {
  color: var(--text-muted);
}

/* 18. FILTER CHIPS / TABS */
.filter-tabs {
  display: flex;
  gap: 8px;
  padding: 0 20px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar {
  display: none;
}
.filter-tab {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
  flex-shrink: 0;
}
.filter-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.filter-tab:active, .filter-tab:hover:active {
  transform: translateY(1px) scale(0.93);
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.filter-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-inverse);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.filter-tab.active:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(224,122,95,0.35);
}

/* 19. DATE GROUP HEADER */
.date-group-header {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 20px 6px 20px;
}

/* 20. BUDGET CARD */
.budget-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  animation: cardEntrance 0.35s var(--anim-smooth) forwards; 
  opacity: 0;
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
}
.budget-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.budget-card:active, .budget-card:hover:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.budget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.budget-header .budget-cat {
  display: flex;
  align-items: center;
  gap: 10px;
}
.budget-header .budget-cat .budget-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
}
.budget-header .budget-amounts {
  text-align: right;
  font-size: 0.8rem;
}
.budget-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.budget-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-pill);
  transition: width 0.8s var(--anim-smooth);
  animation: progressFill 0.8s var(--anim-smooth);
}
.budget-bar-fill.over {
  background: var(--danger) !important;
}
.budget-status {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 21. GOAL / NEST CARD */
.goal-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  animation: cardEntrance 0.35s var(--anim-smooth) forwards; 
  opacity: 0;
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
}
.goal-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.goal-card:active, .goal-card:hover:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.goal-header .goal-title {
  font-weight: 600;
  font-size: 1rem;
}
.goal-header .goal-pct {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}
.goal-bar-track {
  width: 100%;
  height: 10px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 10px;
}
.goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold));
  border-radius: var(--radius-pill);
  transition: width 0.6s var(--anim-smooth);
  animation: progressFill 0.8s var(--anim-smooth);
}
.goal-bar-fill.complete {
  background: var(--success);
}
.goal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.goal-footer span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.goal-contribute-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.25s var(--anim-cozy), background-color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
}
.goal-contribute-btn:hover {
  transform: translateY(-2px) scale(1.05);
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(224,122,95,0.3);
}
.goal-contribute-btn:active, .goal-contribute-btn:hover:active {
  transform: translateY(1px) scale(0.93);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

/* 22. ACCOUNT CARD */
.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: cardEntrance 0.35s var(--anim-smooth) forwards; 
  opacity: 0;
  cursor: pointer;
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
}
.account-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.account-card:active, .account-card:hover:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.account-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.account-info {
  flex: 1;
  margin-left: 14px;
}
.account-info .acc-name {
  font-weight: 600;
  font-size: 1rem;
}
.account-info .acc-type {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.account-balance {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* 23. MORE PAGE GRID */
.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 20px;
}
.more-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 10px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
  animation: cardEntrance 0.35s var(--anim-smooth) forwards; 
  opacity: 0;
}
.more-item:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.more-item:active, .more-item:hover:active {
  transform: translateY(1px) scale(0.93);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.more-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: transform 0.25s var(--anim-cozy);
}
.more-item:hover .more-icon {
  transform: scale(1.1) rotate(4deg);
}
.more-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}

/* 24. EMPTY STATE */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  animation: fadeIn 0.4s ease;
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 280px;
}

/* 25. BOTTOM NAV (FLOATING GLASS DOCK) */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--border-glass);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 12px 32px rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-pill);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 8px;
  z-index: 100;
  transition: transform 0.3s var(--anim-smooth), background-color 0.4s ease;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: all 0.25s var(--anim-cozy);
  cursor: pointer;
}
.nav-item:hover {
  color: var(--primary);
  transform: translateY(-2px) scale(1.05);
}
.nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5);
}
.nav-item.active:hover {
  transform: translateY(-2px) scale(1.06);
}
.nav-item:active, .nav-item:hover:active {
  transform: translateY(1px) scale(0.92);
}

/* 26. MODAL / BOTTOM SHEET */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  z-index: 600;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.bottom-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card-solid);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px;
  transform: translateY(100%);
  transition: transform 0.4s var(--anim-cozy);
  margin: 0 auto;
}
.modal-overlay.open .bottom-sheet {
  transform: translateY(0);
}
.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-color);
  border-radius: var(--radius-pill);
  margin: 0 auto 20px auto;
}

/* 27. FORMS & CONTROLS */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.25s var(--anim-smooth), background-color 0.2s ease;
}
.form-control:hover {
  border-color: var(--primary);
  background: var(--bg-card-solid);
}
.form-control:focus {
  border-color: var(--primary);
  background: var(--bg-card-solid);
  box-shadow: 0 0 0 4px var(--primary-light), 0 6px 18px rgba(0,0,0,0.06);
}
.btn-primary, .btn-danger, .btn-ghost {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.25s var(--anim-cozy), box-shadow 0.25s var(--anim-smooth), background-color 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  filter: brightness(1.06);
}
.btn-primary:active, .btn-primary:hover:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  filter: brightness(0.94);
}

.btn-sm {
  width: auto !important;
  padding: 6px 16px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius-pill) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
  height: 34px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #c52a36);
  color: white;
  box-shadow: 0 4px 14px rgba(230,57,70,0.25);
}
.btn-danger:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 24px rgba(230,57,70,0.4);
  filter: brightness(1.06);
}
.btn-danger:active, .btn-danger:hover:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 0 2px 6px rgba(230,57,70,0.2);
}

.btn-ghost {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.btn-ghost:active, .btn-ghost:hover:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.btn-sm {
  width: auto;
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
}

/* 28. THEME STORE */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.theme-card {
  width: 100%;
  background: var(--bg-card-solid);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
}
.theme-card:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.theme-card:active, .theme-card:hover:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.theme-card[data-theme="cozy"] { background: #FDFBF7; color: #2B231D; }
.theme-card[data-theme="forest"] { background: #F4F8F5; color: #2B3D30; }
.theme-card[data-theme="sakura"] { background: #FDF7F9; color: #4A2B35; }
.theme-card[data-theme="ocean"] { background: #F3F6F9; color: #1E303D; }
.theme-card[data-theme="amoled"] { background: #141414; color: #FFFFFF; border-color: #2A2A2A; }

.theme-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-glow);
}
.theme-card.active:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 28px rgba(224,122,95,0.35);
}
.theme-card[data-theme="amoled"].active {
  border-color: #FF9F1C;
  background: rgba(255, 159, 28, 0.15);
  color: #FF9F1C;
}
.theme-preview-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.theme-preview-dots .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
}

/* 29. TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 400px;
  width: calc(100% - 40px);
}
.toast {
  background: var(--accent-blue);
  color: var(--text-inverse);
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s var(--anim-cozy);
  pointer-events: auto;
}
.toast.success {
  background: var(--success);
}
.toast.error {
  background: var(--danger);
}
.toast.out {
  animation: toastOut 0.3s ease forwards;
}

/* 30. SUMMARY STAT CARDS */
.stat-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 20px;
  margin-bottom: 24px;
}
.stat-mini-card {
  padding: 14px 10px;
  border-radius: var(--radius-lg);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
  animation: cardEntrance 0.35s var(--anim-smooth) forwards; 
  opacity: 0;
  cursor: pointer;
}
.stat-mini-card:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.stat-mini-card:active, .stat-mini-card:hover:active {
  transform: translateY(1px) scale(0.95);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.stat-mini-card .stat-mini-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.stat-mini-card .stat-mini-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}

/* 31. CHAT AI STYLES - CLEAN MOBILE REVAMP */
.chat-overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 500;
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.12);
  animation: slideUpOverlay 0.3s var(--anim-smooth) forwards;
}

@keyframes slideUpOverlay {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  height: 56px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card-solid);
  z-index: 10;
}

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

.chat-back-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.chat-back-btn:hover {
  background: var(--bg-input);
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.2;
}

.chat-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot-online {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-hdr-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.chat-hdr-btn:hover {
  background: var(--bg-input);
}
.chat-hdr-btn svg, .chat-hdr-btn i {
  pointer-events: none;
}

.chat-messages {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-page);
}

.chat-watermark-bg {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-watermark-bg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.25));
}

.chat-bubble, .chat-welcome-card, .chat-typing {
  position: relative;
  z-index: 1;
}

.chat-bubble {
  max-width: 82%;
  padding: 11px 15px;
  font-size: 0.9rem;
  line-height: 1.48;
  animation: popIn 0.25s var(--anim-cozy);
  word-wrap: break-word;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 500;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--bg-card-solid);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.chat-chips-container {
  padding: 8px 12px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-page);
  overflow: hidden;
  position: relative;
}

.chat-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none !important;
  user-select: none;
  cursor: grab;
  padding-bottom: 4px;
}
.chat-chips:active {
  cursor: grabbing;
}
.chat-chips::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }

.chat-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
}
.chat-chip i {
  width: 14px;
  height: 14px;
  color: var(--primary);
  pointer-events: none;
}
.chat-chip:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card-solid);
}

.chat-attach-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-input);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.chat-attach-btn:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.chat-input-bar input {
  flex: 1;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  border-radius: 20px;
  padding: 9px 14px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease;
}
.chat-input-bar input:focus {
  border-color: var(--primary);
  background: var(--bg-card-solid);
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.chat-send-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.chat-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 18px 18px 18px 4px;
}
.chat-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingDot 1.4s infinite ease-in-out;
}
.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 32. DYNAMIC SAVINGS NEST */
.goal-nest-visual {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 12px 0;
  animation: popIn 0.4s var(--anim-cozy);
}
.nest-svg {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.06));
  transition: all 0.5s var(--anim-smooth);
}
.nest-branch {
  stroke: #8B5A2B;
  stroke-width: 4px;
  stroke-linecap: round;
}
.nest-leaves {
  fill: var(--secondary);
}
.nest-straws {
  stroke: #D2B48C;
  stroke-width: 3px;
  stroke-linecap: round;
}
.nest-egg {
  fill: var(--accent-gold);
  stroke: #DDA0DD;
  stroke-width: 1px;
  animation: eggWobble 4s infinite ease-in-out;
}
.nest-bird {
  animation: birdBob 2.5s infinite ease-in-out;
}

@keyframes eggWobble {
  0%, 100% { transform: rotate(0deg); }
  45% { transform: rotate(0deg); }
  50% { transform: rotate(-5deg); }
  55% { transform: rotate(5deg); }
  60% { transform: rotate(0deg); }
}
@keyframes birdBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.subpage-container {
  padding: 0 20px 24px 20px;
}

/* 33. FEATURE HUB CARDS */
.feature-hub-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.25s var(--anim-cozy), border-color 0.2s ease, box-shadow 0.25s var(--anim-smooth);
}
.feature-hub-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}
.feature-hub-card:active {
  transform: translateY(1px) scale(0.97);
}
.feature-hub-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-hub-info {
  flex: 1;
  overflow: hidden;
}
.feature-hub-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.2;
}
.feature-hub-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feature-hub-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.feature-hub-card:hover .feature-hub-arrow {
  transform: translateX(3px);
  color: var(--primary);
}
.subpage-container .section-title {
  padding: 0;
}

/* 34. VISUAL ICON & EMOJI PICKER */
.picker-tab {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.picker-tab.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.picker-item {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-main);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.picker-item:hover {
  border-color: var(--primary);
  transform: scale(1.08);
}
.picker-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

/* 35. GAME TUTORIAL & SPOTLIGHT MASCOT OVERLAY */
.gtour-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: auto;
  background: rgba(10, 15, 25, 0.55);
  animation: fadeIn 0.3s ease-out forwards;
}

/* Element Spotlight effect */
.gtour-highlight {
  position: relative !important;
  z-index: 10001 !important;
  outline: 3px solid #E07A5F !important;
  outline-offset: 4px !important;
  transform: scale(1.04) !important;
  transition: transform 0.35s var(--anim-cozy), outline 0.35s ease !important;
  border-radius: var(--radius-lg);
  pointer-events: none !important;
}

.gtour-dialog-card {
  position: fixed;
  left: 16px;
  right: 16px;
  z-index: 10002;
  background: #FFFFFF !important;
  color: #1E293B !important;
  border: 2px solid var(--primary);
  border-radius: 24px;
  padding: 18px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.8);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  max-width: 440px;
  margin: 0 auto;
  animation: slideUp 0.35s var(--anim-cozy) forwards;
}

.gtour-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: #FFF5F2;
  border: 2px solid #F8D7C4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.gtour-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
  animation: bob 2.4s infinite ease-in-out;
}

.gtour-dialog-content {
  flex: 1;
}

.gtour-mascot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.gtour-mascot-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: #E07A5F !important;
}

.gtour-step-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: #FDF2E9 !important;
  color: #E07A5F !important;
  border: 1px solid #F8D7C4;
}

.gtour-speech-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #334155 !important;
  margin-bottom: 14px;
  min-height: 42px;
  font-weight: 500;
}

.gtour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gtour-btn-skip {
  font-size: 0.8rem;
  color: #64748B !important;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  font-weight: 600;
  transition: color 0.15s ease;
}
.gtour-btn-skip:hover {
  color: #0F172A !important;
}

.gtour-btn-next {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 14px;
  background: var(--primary) !important;
  color: #FFFFFF !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(224, 122, 95, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gtour-btn-next:active {
  transform: scale(0.95);
}

/* 36. RESPONSIVE DEVICES OPTIMIZATION */
@media (max-width: 380px) {
  :root {
    --radius-xl: 20px;
    --radius-lg: 14px;
    --radius-md: 10px;
  }
  #app-container {
    padding-bottom: 82px;
  }
  .networth-card {
    margin: 0 12px 16px 12px;
    padding: 18px;
  }
  .networth-amount {
    font-size: 1.95rem;
  }
  .stat-cards-row {
    gap: 8px;
    padding: 0 12px;
    margin-bottom: 16px;
  }
  .stat-mini-card {
    padding: 10px 6px;
  }
  .filter-tabs {
    padding: 0 12px;
  }
  .more-grid {
    gap: 8px;
    padding: 0 12px;
  }
  .more-item {
    padding: 14px 6px;
  }
  .bottom-nav {
    height: 64px;
  }
  .gtour-dialog-card {
    padding: 14px 16px;
    gap: 12px;
    border-radius: 18px;
  }
  .gtour-speech-text {
    font-size: 0.85rem;
    line-height: 1.45;
  }
}

/* ponytail: desktop = phone-in-browser mockup. Scroll inside the container. */
@media (min-width: 768px) {
  body {
    background: #0F172A;
    align-items: center;
    min-height: 100vh;
  }
  #app-container {
    min-height: unset;
    height: 92dvh;
    max-height: 900px;
    border-radius: 32px;
    border: 8px solid #1E293B;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
  }
  .gtour-overlay {
    border-radius: 24px;
  }
}



