/* =============================================
   LAMIM — FINANCE REDESIGN (ENTERPRISE GRADE)
   ============================================= */
.finance-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px 0;
  position: relative;
  z-index: 1;
}

.finance-aurora-bg {
  position: absolute;
  top: -100px;
  left: 0;
  width: 100%;
  height: 600px;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.4;
}

/* Glass Card Base */
.finance-premium-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.finance-premium-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Main Balance Card (Apple Card Style) */
/* --- Ultra-Luxury Obsidian Executive Card --- */
/* --- Ultra-Luxury Prismatic Black Card --- */
.card-main-balance {
  position: relative;
  min-height: 230px;
  border-radius: 28px;
  padding: 32px;
  overflow: hidden;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #000;
  border: none;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(0, 242, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

[data-theme="light"] .card-main-balance {
  background: transparent;
  color: #0f172a;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border: none;
}

/* Vibrant Rainbow Colorful Border */
.card-main-balance::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: conic-gradient(from var(--angle),
      #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
  border-radius: 30px;
  animation: border-rotate 4s linear infinite;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes border-rotate {
  from {
    --angle: 0deg;
  }

  to {
    --angle: 360deg;
  }
}

/* Inner Obsidian Cover */
.card-main-balance::after {
  content: '';
  position: absolute;
  inset: 2px;
  background-color: rgba(10, 10, 10, 0.92);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 26px;
  z-index: 0;
  transition: background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .card-main-balance::after {
  background-color: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 27px;
  inset: 2px;
}

[data-theme="light"] .card-glow-orb {
  background: radial-gradient(circle at center,
      rgba(0, 242, 255, 0.3) 0%,
      rgba(122, 0, 255, 0.2) 40%,
      rgba(255, 0, 200, 0.1) 70%,
      transparent 100%);
  filter: blur(60px);
  opacity: 1;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
}

.card-glow-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 26px;
  pointer-events: none;
}

.card-glow-orb {
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background: radial-gradient(circle at center,
      rgba(29, 78, 216, 0.15) 0%,
      rgba(109, 40, 217, 0.1) 30%,
      rgba(59, 130, 246, 0.05) 50%,
      transparent 70%);
  animation: core-rotate 10s linear infinite;
  filter: blur(40px);
}

@keyframes core-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.card-main-balance>* {
  position: relative;
  z-index: 4;
}

.balance-label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .balance-label {
  color: var(--color-text-secondary);
  text-shadow: none;
}

.balance-value {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -3.5px;
  color: #ffffff;
  line-height: 0.9;
  text-shadow: 0 0 30px var(--color-text-placeholder);
  margin-top: 10px;
}

[data-theme="light"] .balance-value {
  color: var(--color-text-primary);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-monogram-l {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 5;
  animation: lively-monogram-glow 4s linear infinite;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.9;
}

@keyframes lively-monogram-glow {
  0% {
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.6)) drop-shadow(0 0 15px rgba(122, 0, 255, 0.3));
  }

  33% {
    filter: drop-shadow(0 0 10px rgba(122, 0, 255, 0.6)) drop-shadow(0 0 20px rgba(255, 0, 200, 0.3));
  }

  66% {
    filter: drop-shadow(0 0 8px rgba(255, 0, 200, 0.6)) drop-shadow(0 0 15px rgba(0, 242, 255, 0.3));
  }

  100% {
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.6)) drop-shadow(0 0 15px rgba(122, 0, 255, 0.3));
  }
}

.card-main-balance:hover .card-monogram-l {
  transform: scale(1.15) rotate(-5deg);
  opacity: 1;
}

.card-identity-id {
  font-family: 'SF Mono', 'Roboto Mono', monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: var(--color-text-subtitle);
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--color-divider-strong);
}

[data-theme="light"] .card-identity-id {
  color: var(--color-text-muted);
  text-shadow: none;
}

.card-main-balance.is-negative {
  border-color: #ff3b30;
  box-shadow: 0 0 40px rgba(255, 59, 48, 0.2);
}

.card-main-balance.is-negative .balance-value {
  color: #fff;
}

.balance-warning-badge {
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
  animation: warningJump 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes balanceErrorPulse {
  0% {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }

  50% {
    box-shadow: 0 20px 60px rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.6);
  }

  100% {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }
}

@keyframes warningJump {
  0% {
    transform: scale(0) rotate(-20deg);
    opacity: 0;
  }

  70% {
    transform: scale(1.2) rotate(5deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.card-chip {
  width: 45px;
  height: 35px;
  background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
  border-radius: 6px;
  margin-bottom: 20px;
  position: relative;
  opacity: 0.8;
}

.card-chip::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.balance-trend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  background: var(--color-divider-strong);
  padding: 6px 12px;
  border-radius: 100px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Force Trend Colors on Main Card */
.finance-main-card .fin-trend-badge.trend-danger {
  color: #ff3b30 !important;
  fill: #ff3b30 !important;
  text-shadow: 0 0 10px rgba(255, 59, 48, 0.3);
}

.finance-main-card .fin-trend-badge.trend-success {
  color: #34c759 !important;
  fill: #34c759 !important;
  text-shadow: 0 0 10px rgba(52, 199, 89, 0.3);
}

/* Quick Action Buttons */
.fin-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.fin-btn {
  height: 56px;
  border-radius: 16px;
  border: none;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fin-btn-primary {
  background: var(--color-text-primary);
  color: var(--color-bg-primary);
}

.fin-btn-secondary {
  background: var(--color-surface-nested);
  color: #fff;
  border: 1px solid var(--color-divider-strong);
}

[data-theme="light"] .fin-btn-secondary {
  background: rgba(0, 0, 0, 0.03);
  color: var(--color-text-primary);
  border-color: rgba(0, 0, 0, 0.08);
}

.fin-btn:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.fin-btn:active {
  transform: scale(0.95);
  filter: brightness(0.9);
}

.fin-btn,
.fin-currency-btn,
.fin-cat-pill,
.vault-card,
.transaction-item {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Stats Summary Row */
.fin-stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* --- Chart View Toggle --- */
.fin-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.fin-chart-tabs {
  display: flex;
  background: var(--color-surface-nested);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fin-chart-tab {
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fin-chart-tab.active {
  background: var(--color-text-primary);
  color: var(--color-bg-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Theme overrides handled by variables */

.fin-chart-tab:active {
  transform: scale(0.95);
}

.fin-stat-card {
  padding: 20px;
  background: var(--fin-surface);
  border: 1px solid var(--fin-border);
  border-radius: 20px;
}

.fin-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fin-stat-value {
  font-size: 20px;
  font-weight: 700;
}

.fin-stat-value.income {
  color: var(--fin-green);
}

.fin-stat-value.expense {
  color: var(--fin-red);
}

/* Transaction List Redesign */
.fin-section-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.fin-section-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.transaction-list {
  display: flex;
  flex-direction: column;
}

.transaction-item {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-muted);
  transition: all 0.2s ease;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.transaction-info {
  flex: 1;
  min-width: 0;
}

.transaction-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Modern Activity Ledger --- */
.transaction-group {
  margin-bottom: 28px;
  position: relative;
  padding-left: 36px; /* Leave space on the left for the timeline thread */
}

/* Beautiful vertical gradient thread connecting dates and cards */
.transaction-group::before {
  content: '';
  position: absolute;
  top: 32px; /* Start below the date label text */
  bottom: 8px;
  left: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-accent-purple) 0%, var(--color-accent-blue) 100%);
  opacity: 0.12;
  border-radius: 1px;
  z-index: 1;
}

[data-theme="light"] .transaction-group::before {
  opacity: 0.2;
}

.transaction-date-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  padding-left: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* Glowing dot representing the date header on the timeline */
.transaction-date-label::before {
  content: '';
  position: absolute;
  left: -24px; /* Perfectly aligned on the vertical timeline line */
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent-purple);
  box-shadow: 0 0 10px var(--color-accent-purple);
  z-index: 2;
}

.transaction-date-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-surface-nested);
  opacity: 0.5;
}

.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 12px; /* Marginally higher gap for card separation */
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--color-surface-nested);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-divider-subtle);
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: default;
  position: relative;
  overflow: hidden;
  animation: scaleInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) backwards;
  width: 100%;
}

/* Combined Timeline Connecting Dot + Horizontal Bridge Line via wrapper connector */
.transaction-timeline-connector {
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px; /* Reaches perfectly from the vertical thread to the card edge */
  height: 12px;
  /* Left part is a radial circle (connecting dot), right part is a linear line (connecting bridge) */
  background: radial-gradient(circle at 4px 6px, var(--timeline-dot-color, var(--color-accent-blue)) 3.5px, transparent 4.5px),
              linear-gradient(to right, var(--timeline-dot-color, var(--color-accent-blue)), var(--timeline-dot-color, var(--color-accent-blue)));
  background-size: 8px 12px, 24px 2px;
  background-position: left center, 4px center;
  background-repeat: no-repeat;
  opacity: 0.35;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.transaction-item-wrapper:hover .transaction-timeline-connector {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  filter: drop-shadow(0 0 5px var(--timeline-dot-color, var(--color-accent-blue)));
}

[data-theme="light"] .transaction-item {
  background: #FFFFFF !important;
  border-color: rgba(15, 23, 42, 0.06) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .transaction-name {
  color: #0F172A !important;
  font-weight: 800;
}

[data-theme="light"] .transaction-meta {
  color: #64748B !important;
  font-weight: 600;
}

.transaction-item:active {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(0.99);
}

/* Glass Reflection Shine */
.transaction-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--color-surface-nested), transparent);
  transition: 0.5s;
}

.transaction-item:hover::before {
  left: 100%;
}

@keyframes scaleInUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.transaction-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .transaction-item:hover {
  background: #F8FAFC !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.transaction-icon {
  width: 48px;
  height: 48px;
  border-radius: 38.5%; /* Mathematically perfect CSS iOS Squircle! */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Pulse Glow for Icons */
.transaction-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  filter: blur(10px);
  opacity: 0.3;
  z-index: -1;
  animation: iconPulse 2s infinite alternate;
}

@keyframes iconPulse {
  from {
    transform: scale(1);
    opacity: 0.2;
  }

  to {
    transform: scale(1.2);
    opacity: 0.4;
  }
}

.transaction-info {
  flex: 1;
  min-width: 0;
}

.transaction-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transaction-meta {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.transaction-amount {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.transaction-amount.negative {
  color: var(--fin-red);
}

.transaction-amount.positive {
  color: var(--fin-green);
}

.ledger-summary {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-surface-nested);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ledger-total-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.ledger-total-value {
  font-size: 20px;
  font-weight: 900;
  color: var(--fin-red);
}

/* Savings / Vaults Section */
.vault-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* --- Currency Switcher (Unified) --- */
.fin-currency-toggle {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  padding: 3px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 10;
  transition: all 0.3s ease;
}

[data-theme="light"] .fin-currency-toggle {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

.fin-currency-btn {
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  border-radius: 9px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.8px;
  cursor: pointer;
}

.fin-currency-btn.active {
  background: var(--color-divider-strong);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .fin-currency-btn.active {
  background: var(--fin-blue);
  color: white;
}

[data-theme="light"] .fin-currency-btn.active {
  background: white;
  color: black;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.fin-currency-toggle:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--color-surface-nested);
}

@keyframes vaultFadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes progressShimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* --- Modern Wealth Builder (Vaults) --- */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.vault-card {
  background: var(--color-surface-card);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  border: 1px solid var(--color-surface-nested);
  border-radius: 30px;
  padding: 24px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  animation: vaultFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Staggered entrance for the first 10 vaults */
.vault-card:nth-child(1) {
  animation-delay: 0.05s;
}

.vault-card:nth-child(2) {
  animation-delay: 0.1s;
}

.vault-card:nth-child(3) {
  animation-delay: 0.15s;
}

.vault-card:nth-child(4) {
  animation-delay: 0.2s;
}

.vault-card:nth-child(5) {
  animation-delay: 0.25s;
}

.vault-card:nth-child(6) {
  animation-delay: 0.3s;
}

.vault-card:nth-child(7) {
  animation-delay: 0.35s;
}

.vault-card:nth-child(8) {
  animation-delay: 0.4s;
}

[data-theme="light"] .vault-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .vault-name {
  color: #0F172A !important;
  font-weight: 850;
}

[data-theme="light"] .vault-status {
  color: #475569 !important;
  font-weight: 700;
}

[data-theme="light"] .vault-metric-label {
  color: #64748B !important;
  font-weight: 600;
}

[data-theme="light"] .vault-metric-value {
  color: #1E293B !important;
  font-weight: 800;
}

.vault-card:hover {
  transform: translateY(-8px) scale(1.02) perspective(1000px) rotateX(2deg);
  background: var(--color-surface-card);
  border-color: var(--fin-blue);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .vault-card:hover {
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}
.vault-card:focus-visible,
.fin-currency-btn:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

.vault-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.vault-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 38.5%; /* Mathematically perfect CSS iOS Squircle! */
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  color: var(--fin-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.05);
  transition: all 0.3s ease;
}

[data-theme="light"] .vault-icon-box {
  background: #f1f5f9;
  color: #334155;
  box-shadow: none;
}

.vault-info {
  flex: 1;
}

.vault-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.vault-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.vault-amount-pill {
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--color-text-primary);
}

[data-theme="light"] .vault-amount-pill {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.vault-progress-container {
  margin-top: 12px;
}

.vault-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  overflow: visible;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .vault-progress-track {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.03);
}

.vault-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f2ff, #7000ff);
  border-radius: 10px;
  position: relative;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(0, 242, 255, 0.4);
}

.vault-progress-glow {
  position: absolute;
  top: 50%;
  right: -4px;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow:
    0 0 15px #fff,
    0 0 30px #00f2ff,
    0 0 45px #7000ff;
  z-index: 10;
}

[data-theme="light"] .vault-progress-fill {
  background: linear-gradient(90deg, #007aff, #5856d6);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

@keyframes livingLiquidGloss {
  0% {
    background-position: 0% 50%;
    opacity: 0.5;
  }

  50% {
    background-position: 100% 50%;
    opacity: 0.8;
  }

  100% {
    background-position: 0% 50%;
    opacity: 0.5;
  }
}

.vault-empty-state {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--color-divider-strong);
  border-radius: 28px;
  cursor: pointer;
}

.vault-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.vault-progress-bg {
  height: 8px;
  background: var(--color-surface-nested);
  border-radius: 4px;
  overflow: hidden;
}

[data-theme="light"] .vault-progress-bg {
  background: rgba(0, 0, 0, 0.05);
}

/* Removed duplicate styles */

.vault-metrics-row {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 2px;
}

.vault-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vault-metric-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
  opacity: 0.6;
}

.vault-metric-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.vault-metric-value.needed {
  color: var(--fin-blue);
  text-shadow: 0 0 10px rgba(0, 122, 255, 0.2);
}

.vault-card.completed .vault-metric-value.needed {
  color: #FFD60A;
  text-shadow: 0 0 15px rgba(255, 214, 10, 0.4);
}

/* Modals Refined */
.finance-modal-content h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.finance-input-group {
  margin-bottom: 20px;
}

.finance-input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.finance-input {
  width: 100%;
  background: var(--fin-surface);
  border: 1px solid var(--fin-border);
  padding: 14px 16px;
  border-radius: 12px;
  color: var(--color-text-primary);
  font-size: 15px;
  font-weight: 600;
}

.finance-save-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  background: var(--fin-blue);
  color: var(--color-bg-primary);
  transition: all 0.2s ease;
}

[data-theme="light"] .btn-xoss {
  color: var(--color-bg-primary);
}

.finance-save-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Navigator Refined */
.finance-month-navigator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--fin-surface);
  border: 1px solid var(--fin-border);
  border-radius: 16px;
  margin-bottom: 16px;
}

.finance-nav-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  transition: all 0.2s;
}

.finance-nav-btn:hover:not(:disabled) {
  background: var(--color-surface-nested);
  color: #fff;
}

/* Responsive Master */
@media (max-width: 768px) {
  .balance-value {
    font-size: 36px;
  }

  .fin-stats-row {
    grid-template-columns: 1fr;
  }
}

