/* ═══════════════════════════════════════════
   My Balance — Dark Mode
   ═══════════════════════════════════════════ */

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

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

:root {
  --primary: #818cf8;
  --primary-light: #a5b4fc;
  --primary-dark: #6366f1;
  --green: #4ade80;
  --green-dark: #22c55e;
  --green-glow: rgba(74, 222, 128, 0.3);
  --red: #f87171;
  --red-dark: #ef4444;
  --red-glow: rgba(248, 113, 113, 0.3);
  --bg: #0a0a14;
  --bg-elevated: #12121e;
  --bg-card: rgba(20, 20, 35, 0.8);
  --bg-card-solid: #16162a;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.14);
  --text: #e8e8ed;
  --text-dim: #8b8b9e;
  --text-muted: #5a5a72;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.6);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══ SVG ICONS ═══ */
.svg-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.svg-icon svg { display: block; }

.logo-icon svg {
  stroke-dasharray: 120; stroke-dashoffset: 120;
  animation: svgDraw 1.2s var(--ease-out) 0.3s forwards;
}
@keyframes svgDraw { to { stroke-dashoffset: 0; } }

.sparkles-icon svg { animation: sparkleFloat 3s ease-in-out infinite; color: var(--primary-light); }
.sparkles-right { animation-delay: 1.5s; }
@keyframes sparkleFloat {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
  50% { transform: scale(1.2) rotate(15deg); opacity: 1; }
}

/* ═══ BACKGROUND ═══ */
.bg-gradient {
  position: fixed; inset: 0; z-index: -5;
  background: linear-gradient(135deg, #0a0a1a 0%, #0f0a20 25%, #150a1a 50%, #0a1520 75%, #0a0a1a 100%);
  background-size: 500% 500%;
  animation: gradientShift 30s ease infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
}

.bg-orbs { position: fixed; inset: 0; z-index: -4; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(100px);
  animation: orbFloat 22s ease-in-out infinite; will-change: transform;
}
.orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(99,102,241,0.25), transparent 70%); top: -150px; right: -150px; }
.orb-2 { width: 350px; height: 350px; background: radial-gradient(circle, rgba(236,72,153,0.2), transparent 70%); bottom: -100px; left: -100px; animation-delay: -7s; }
.orb-3 { width: 280px; height: 280px; background: radial-gradient(circle, rgba(52,211,153,0.15), transparent 70%); top: 45%; left: 50%; transform: translate(-50%,-50%); animation-delay: -14s; }
.orb-4 { width: 220px; height: 220px; background: radial-gradient(circle, rgba(251,191,36,0.12), transparent 70%); top: 20%; left: 15%; animation-delay: -18s; }
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(35px, -45px) scale(1.06); }
  66% { transform: translate(-25px, 35px) scale(0.94); }
}

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

.bg-vignette {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.5) 100%);
}

.bg-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none; opacity: 0.025;
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

.bg-spotlight {
  position: fixed; width: 600px; height: 600px; z-index: -2; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.04) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: left 0.8s ease, top 0.8s ease;
}

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 1000;
  width: 0%; border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, var(--primary), #ec4899, var(--green));
  box-shadow: 0 0 12px rgba(99,102,241,0.5);
  transition: width 0.1s linear;
}

/* ═══ CONTAINER ═══ */
.container {
  max-width: 740px; margin: 0 auto; padding: 40px 20px 80px;
  opacity: 0; animation: containerIn 0.8s var(--ease-out) 0.1s forwards;
}
@keyframes containerIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ HEADER ═══ */
.header {
  text-align: center; margin-bottom: 40px;
  animation: fadeInUp 0.7s var(--ease-out) 0.15s both;
}
.logo { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 8px; }
.logo-icon {
  animation: logoFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(99,102,241,0.4));
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(2deg); }
}

.gradient-text {
  font-size: 34px; font-weight: 900; letter-spacing: -0.5px;
  background: linear-gradient(135deg, #818cf8, #f472b6, #fbbf24, #818cf8);
  background-size: 300% 100%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: textShimmer 6s ease infinite;
}
@keyframes textShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.subtitle { font-size: 14px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.5px; animation: fadeInUp 0.7s var(--ease-out) 0.3s both; }

/* ═══ BALANCE CARD ═══ */
.balance-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 24px; padding: 36px 40px 32px; text-align: center;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.04);
  margin-bottom: 28px; overflow: hidden;
  animation: fadeInUp 0.7s var(--ease-out) 0.25s both;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.3s ease;
  perspective: 800px;
}
.balance-card:hover { border-color: var(--glass-border-hover); box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255,255,255,0.06); }

/* Color flash */
.balance-card::before {
  content: ''; position: absolute; inset: 0; border-radius: 24px; opacity: 0; pointer-events: none;
  transition: opacity 0.15s ease;
}
.balance-card.flash-green::before { background: var(--green); animation: colorFlash 0.5s ease forwards; }
.balance-card.flash-red::before { background: var(--red); animation: colorFlash 0.5s ease forwards; }
@keyframes colorFlash { 0% { opacity: 0.12; } 100% { opacity: 0; } }

.balance-shine {
  position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.03) 50%, transparent 70%);
  animation: shine 5s ease-in-out infinite; pointer-events: none;
}
@keyframes shine {
  0%, 100% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
}

.balance-glow {
  position: absolute; top: 50%; left: 50%; width: 250px; height: 250px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(74,222,128,0.15) 0%, transparent 70%);
  pointer-events: none; opacity: 0.6; filter: blur(40px);
  transition: background 0.6s ease;
}

.balance-top { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
.balance-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--text-dim); position: relative; display: inline-block;
}
.balance-label::after {
  content: ''; position: absolute; bottom: -4px; left: 50%; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), #ec4899);
  border-radius: 1px; transition: width 0.4s var(--ease-out), left 0.4s var(--ease-out);
}
.balance-card:hover .balance-label::after { width: 100%; left: 0; }

.balance-amount {
  display: block; font-size: 52px; font-weight: 900; letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  transition: color 0.4s ease, text-shadow 0.4s ease;
  color: var(--text); text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.balance-amount.positive { color: var(--green); text-shadow: 0 4px 24px var(--green-glow); }
.balance-amount.negative { color: var(--red); text-shadow: 0 4px 24px var(--red-glow); }

.balance-amount.shimmer::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: amountShimmer 0.6s ease forwards;
}
@keyframes amountShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.balance-bar { height: 5px; background: rgba(255,255,255,0.06); border-radius: 5px; margin-top: 20px; overflow: hidden; }
.balance-bar-fill {
  height: 100%; width: 0%; border-radius: 5px;
  background: linear-gradient(90deg, var(--green), var(--primary-light));
  transition: width 0.8s var(--ease-out), background 0.6s ease;
  position: relative;
}
.balance-bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: barShimmer 2s ease-in-out infinite;
}
@keyframes barShimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }

.balance-stats { display: flex; justify-content: center; gap: 24px; margin-top: 18px; }
.stat {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.3px;
  padding: 6px 14px; border-radius: 20px;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}
.stat:hover { transform: scale(1.05); }
.stat-income { color: var(--green); background: rgba(74,222,128,0.1); }
.stat-income:hover { box-shadow: 0 4px 16px rgba(74,222,128,0.15); }
.stat-expense { color: var(--red); background: rgba(248,113,113,0.1); }
.stat-expense:hover { box-shadow: 0 4px 16px rgba(248,113,113,0.15); }

.progress-ring-wrap {
  position: absolute; top: 20px; right: 24px; width: 52px; height: 52px;
  opacity: 0; transition: opacity 0.4s ease;
}
.progress-ring-wrap.visible { opacity: 1; }
.progress-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 3; }
.progress-ring-fill {
  fill: none; stroke: var(--green); stroke-width: 3;
  stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round;
  transition: stroke-dashoffset 0.8s var(--ease-out), stroke 0.4s ease;
}
.progress-ring-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; color: var(--text-dim);
}

/* ═══ CARDS ═══ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.03);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.3s ease;
  position: relative; overflow: hidden;
}
.card:hover { border-color: var(--glass-border-hover); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.05); }

.card.card-focused {
  border-color: rgba(129,140,248,0.3);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(129,140,248,0.15), 0 0 30px rgba(99,102,241,0.1);
}

.row { display: flex; gap: 20px; margin-bottom: 28px; }
.income-card { flex: 1; animation: fadeInUp 0.7s var(--ease-out) 0.35s both; }
.expense-card { flex: 1; animation: fadeInUp 0.7s var(--ease-out) 0.45s both; }
.transactions-card { animation: fadeInUp 0.7s var(--ease-out) 0.55s both; }

/* Ripple */
.card-ripple-wrap { position: relative; z-index: 1; }
.card-ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,0.06); transform: scale(0);
  animation: rippleExpand 0.6s ease-out forwards;
}
@keyframes rippleExpand { to { transform: scale(4); opacity: 0; } }

/* ═══ CARD HEADER ═══ */
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.4s var(--ease-spring);
}
.card-focused .card-icon { transform: rotate(10deg) scale(1.1); }
.income-icon { background: rgba(74,222,128,0.12); color: var(--green); }
.expense-icon { background: rgba(248,113,113,0.12); color: var(--red); }
.history-icon { background: rgba(129,140,248,0.12); color: var(--primary); }
.card-header h2 { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; flex: 1; color: var(--text); }

.transaction-count {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white; font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 20px; min-width: 28px; text-align: center;
}
.transaction-count.bump { animation: badgeBump 0.3s var(--ease-spring); }
@keyframes badgeBump { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* ═══ INPUTS ═══ */
.input-group { position: relative; margin-bottom: 12px; }

.input-group input {
  width: 100%; padding: 18px 18px 10px;
  border: 2px solid rgba(255,255,255,0.06); border-bottom: 2px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  outline: none; background: rgba(255,255,255,0.03); color: var(--text);
  transition: all 0.35s var(--ease-out);
}

.input-underline {
  position: absolute; bottom: 0; left: 50%; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), #ec4899);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: width 0.4s var(--ease-out), left 0.4s var(--ease-out); pointer-events: none;
}
.input-group input:focus ~ .input-underline { width: 100%; left: 0; }

.input-group label {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  pointer-events: none; transition: all 0.3s var(--ease-out);
}
.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
  top: 10px; transform: translateY(0);
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--primary-light);
}

.input-glow {
  position: absolute; inset: -2px; border-radius: var(--radius-sm);
  opacity: 0; transition: opacity 0.3s ease; z-index: -1; pointer-events: none;
}
.income-card .input-glow { box-shadow: 0 0 0 3px var(--green-glow); }
.expense-card .input-glow { box-shadow: 0 0 0 3px var(--red-glow); }
.input-group input:focus ~ .input-glow { opacity: 1; }

.input-group input:focus {
  border-color: var(--primary-dark); background: rgba(255,255,255,0.05);
  box-shadow: 0 4px 20px rgba(99,102,241,0.12);
}

.input-group input::placeholder { color: var(--text-muted); }

.input-group.valid::after {
  content: ''; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
  animation: validPop 0.3s var(--ease-spring);
}
@keyframes validPop { from { transform: translateY(-50%) scale(0); } to { transform: translateY(-50%) scale(1); } }

/* ═══ BUTTONS ═══ */
.btn {
  position: relative; width: 100%; padding: 16px;
  border: none; border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; color: #fff; overflow: hidden;
  transition: all 0.35s var(--ease-out);
}
.btn:hover { transform: translateY(-3px) scale(1.01); }
.btn:active { transform: translateY(0) scale(0.97); transition-duration: 0.1s; }

.btn-income {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 4px 16px rgba(22,163,74,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-income:hover { box-shadow: 0 8px 28px rgba(22,163,74,0.4), inset 0 1px 0 rgba(255,255,255,0.15); }
.btn-expense {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 4px 16px rgba(220,38,38,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-expense:hover { box-shadow: 0 8px 28px rgba(220,38,38,0.4), inset 0 1px 0 rgba(255,255,255,0.15); }
.btn-clear {
  background: rgba(255,255,255,0.04); color: var(--text-dim); font-weight: 600;
  border: 1px solid var(--glass-border);
}
.btn-clear:hover { background: rgba(255,255,255,0.08); color: var(--text); box-shadow: var(--shadow-sm); }

.btn::after {
  content: ''; position: absolute; bottom: -6px; left: 10%; right: 10%; height: 12px;
  border-radius: 50%; background: inherit; filter: blur(12px); opacity: 0;
  transition: opacity 0.3s ease; z-index: -1;
}
.btn:hover::after { opacity: 0.3; }

.btn-shine {
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
}
.btn:hover .btn-shine { left: 100%; }

.btn-text, .btn-success, .btn-loading { display: inline-flex; align-items: center; gap: 6px; transition: all 0.3s var(--ease-out); }
.btn-success, .btn-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.5); }
.btn.success .btn-text { opacity: 0; transform: translateY(-10px); }
.btn.success .btn-success { opacity: 1; transform: scale(1); }
.btn.loading .btn-text { opacity: 0; transform: translateY(-10px); }
.btn.loading .btn-loading { opacity: 1; transform: scale(1); }
.btn.success { background: var(--green-dark) !important; box-shadow: 0 4px 20px var(--green-glow) !important; }
.btn.loading { opacity: 0.7; pointer-events: none; }
.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ TRANSACTIONS ═══ */
#transactionList { max-height: 440px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.06) transparent; }
#transactionList::-webkit-scrollbar { width: 5px; }
#transactionList::-webkit-scrollbar-track { background: transparent; }
#transactionList::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }

/* Skeleton */
.skeleton { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 8px; background: rgba(255,255,255,0.03); display: flex; align-items: center; gap: 12px; }
.skeleton-icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.04); animation: skeletonPulse 1.5s ease-in-out infinite; }
.skeleton-line { height: 12px; border-radius: 6px; background: rgba(255,255,255,0.04); animation: skeletonPulse 1.5s ease-in-out infinite; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w30 { width: 30%; }
@keyframes skeletonPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Transaction items */
.transaction {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.35s var(--ease-out);
  animation: slideIn 0.45s var(--ease-out) both; will-change: transform, opacity;
}
.transaction:nth-child(even) { background: rgba(255,255,255,0.04); }
.transaction:hover {
  background: rgba(255,255,255,0.06);
  transform: translateX(6px);
  border-color: rgba(129,140,248,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(129,140,248,0.1);
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-24px) scale(0.96); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes slideOut { to { opacity: 0; transform: translateX(40px) scale(0.9); } }

.transaction-info { display: flex; align-items: center; gap: 12px; min-width: 0; }

.transaction-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}
.transaction:hover .transaction-icon { transform: scale(1.15) rotate(-5deg); }
.transaction-icon.income {
  background: rgba(74,222,128,0.1); color: var(--green);
  box-shadow: 0 2px 8px rgba(74,222,128,0.15);
}
.transaction-icon.expense {
  background: rgba(248,113,113,0.1); color: var(--red);
  box-shadow: 0 2px 8px rgba(248,113,113,0.15);
}

.transaction-source { font-size: 14px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.transaction-date { font-size: 11px; font-weight: 500; color: var(--text-muted); margin-top: 2px; }

.transaction-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.transaction-amount { font-size: 15px; font-weight: 800; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.transaction-amount.income { color: var(--green); }
.transaction-amount.expense { color: var(--red); }

.transaction-type {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px;
  padding: 2px 7px; border-radius: 4px;
}
.transaction-type.income { background: rgba(74,222,128,0.1); color: var(--green); }
.transaction-type.expense { background: rgba(248,113,113,0.1); color: var(--red); }

.delete-btn {
  width: 30px; height: 30px; background: rgba(255,255,255,0.03);
  border: 1px solid transparent; border-radius: var(--radius-xs); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--ease-spring); flex-shrink: 0; color: var(--text-muted);
}
.delete-btn svg { transition: transform 0.3s var(--ease-spring); }
.delete-btn:hover {
  background: rgba(248,113,113,0.1); color: var(--red); border-color: rgba(248,113,113,0.2);
  transform: scale(1.15); box-shadow: 0 2px 12px rgba(248,113,113,0.15);
}
.delete-btn:hover svg { transform: rotate(90deg); }

/* ═══ EMPTY STATE ═══ */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-illustration { margin-bottom: 16px; }
.empty-svg { width: 100px; height: 80px; margin: 0 auto; animation: emptyFloat 3s ease-in-out infinite; }
@keyframes emptyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.empty-state p { color: var(--text-dim); font-weight: 700; font-size: 15px; }
.empty-sub { font-size: 13px !important; font-weight: 500 !important; color: var(--text-muted) !important; margin-top: 4px; }

/* ═══ TOAST ═══ */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: var(--bg-card-solid); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  padding: 14px 18px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; color: var(--text);
  pointer-events: auto; animation: toastIn 0.4s var(--ease-spring) forwards;
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
.toast-icon { flex-shrink: 0; }
.toast-icon.success { color: var(--green); }
.toast-icon.error { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(0.95); } }

/* ═══ SCROLL TO TOP ═══ */
.scroll-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 998;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-card-solid); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--primary-light);
  opacity: 0; transform: translateY(20px) scale(0.8);
  transition: all 0.35s var(--ease-spring); pointer-events: none;
}
.scroll-top.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.scroll-top:hover { transform: translateY(-2px) scale(1.1); box-shadow: var(--shadow-lg); background: rgba(99,102,241,0.15); }

/* ═══ MISC ═══ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
.balance-amount.bump { animation: bump 0.35s var(--ease-spring); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 600px) {
  .container { padding: 24px 16px 60px; }
  .row { flex-direction: column; }
  .balance-amount { font-size: 38px; letter-spacing: -1px; }
  .balance-card { padding: 28px 20px 24px; }
  .card { padding: 22px 18px; }
  .gradient-text { font-size: 26px; }
  .balance-stats { gap: 12px; }
  .stat { padding: 5px 10px; font-size: 11px; }
  .progress-ring-wrap { top: 16px; right: 16px; width: 44px; height: 44px; }
  .transaction-source { max-width: 100px; }
  .toast-wrap { left: 16px; right: 16px; bottom: 16px; }
}
