:root {
  --background: rgb(240, 244, 250);
  --foreground: rgb(30, 27, 75);
  --card: rgb(255, 255, 255);
  --card-foreground: rgb(30, 27, 75);
  --popover: rgb(255, 255, 255);
  --popover-foreground: rgb(30, 27, 75);
  --primary: rgb(99, 102, 241);
  --primary-foreground: rgb(255, 255, 255);
  --secondary: rgb(248, 250, 252);
  --secondary-foreground: rgb(71, 85, 105);
  --muted: rgb(248, 250, 252);
  --muted-foreground: rgb(148, 163, 184);
  --accent: rgb(219, 234, 254);
  --accent-foreground: rgb(30, 58, 138);
  --destructive: rgb(248, 113, 113);
  --destructive-foreground: rgb(255, 255, 255);
  --border: rgb(226, 232, 240);
  --input: rgb(241, 245, 249);
  --ring: rgb(99, 102, 241);
  --chart-1: rgb(99, 102, 241);
  --chart-2: rgb(52, 211, 153);
  --chart-3: rgb(251, 146, 60);
  --chart-4: rgb(248, 113, 113);
  --chart-5: rgb(167, 139, 250);
  --sidebar: rgb(255, 255, 255);
  --sidebar-foreground: rgb(30, 27, 75);
  --sidebar-primary: rgb(99, 102, 241);
  --sidebar-primary-foreground: rgb(255, 255, 255);
  --sidebar-accent: rgb(219, 234, 254);
  --sidebar-accent-foreground: rgb(30, 58, 138);
  --sidebar-border: rgb(241, 245, 249);
  --sidebar-ring: rgb(99, 102, 241);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 1rem;
  --shadow-sm: 0px 2px 8px 0px rgb(99 102 241 / 0.08);
  --shadow: 0px 4px 16px 0px rgb(99 102 241 / 0.12);
  --shadow-md: 0px 8px 24px 0px rgb(99 102 241 / 0.15);
  --shadow-lg: 0px 12px 32px 0px rgb(99 102 241 / 0.18);
  --shadow-xl: 0px 16px 48px 0px rgb(99 102 241 / 0.22);
}

.dark {
  --background: rgb(15, 23, 42);
  --foreground: rgb(248, 250, 252);
  --card: rgb(30, 41, 59);
  --card-foreground: rgb(248, 250, 252);
  --popover: rgb(30, 41, 59);
  --popover-foreground: rgb(248, 250, 252);
  --primary: rgb(99, 102, 241);
  --primary-foreground: rgb(255, 255, 255);
  --secondary: rgb(51, 65, 85);
  --secondary-foreground: rgb(226, 232, 240);
  --muted: rgb(30, 41, 59);
  --muted-foreground: rgb(148, 163, 184);
  --accent: rgb(30, 58, 138);
  --accent-foreground: rgb(191, 219, 254);
  --destructive: rgb(248, 113, 113);
  --destructive-foreground: rgb(255, 255, 255);
  --border: rgb(51, 65, 85);
  --input: rgb(51, 65, 85);
  --ring: rgb(99, 102, 241);
  --sidebar: rgb(15, 23, 42);
  --sidebar-foreground: rgb(248, 250, 252);
  --sidebar-primary: rgb(99, 102, 241);
  --sidebar-primary-foreground: rgb(255, 255, 255);
  --sidebar-accent: rgb(30, 58, 138);
  --sidebar-accent-foreground: rgb(191, 219, 254);
  --sidebar-border: rgb(51, 65, 85);
  --sidebar-ring: rgb(99, 102, 241);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: linear-gradient(180deg, rgb(240, 244, 250) 0%, rgb(229, 237, 248) 100%);
  color: rgb(var(--foreground));
  min-height: 100vh;
}

/* Toast notification text color override */
.toastify {
  color: #000000 !important;
  font-weight: 500;
  border-radius: 1rem !important;
  box-shadow: 0px 8px 24px 0px rgb(99 102 241 / 0.15) !important;
}

.toastify-text {
  color: #000000 !important;
}

.stat-card {
  background: linear-gradient(135deg, rgb(99, 102, 241) 0%, rgb(139, 92, 246) 100%);
  border: none;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0px 8px 24px 0px rgb(99 102 241 / 0.25);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  color: white;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(251, 191, 36, 0.3);
  border-radius: 50%;
  z-index: 0;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 150px;
  height: 150px;
  background: rgba(96, 165, 250, 0.3);
  border-radius: 50%;
  z-index: 0;
}

.stat-card > * {
  position: relative;
  z-index: 1;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0px 12px 32px 0px rgb(99 102 241 / 0.35);
}

.stat-card .text-sm,
.stat-card .text-3xl {
  color: white !important;
}

.stat-card i {
  color: rgba(255, 255, 255, 0.9) !important;
}

.budget-card {
  background: rgb(var(--card));
  border: none;
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0px 4px 16px 0px rgb(99 102 241 / 0.08);
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.budget-card:hover {
  box-shadow: 0px 8px 24px 0px rgb(99 102 241 / 0.15);
  transform: translateY(-2px);
}

.progress-bar {
  width: 100%;
  height: 0.5rem;
  background: rgb(var(--muted));
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
  border-radius: 9999px;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.expense-item {
  background: rgb(var(--card));
  border: none;
  border-radius: 1.25rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0px 4px 16px 0px rgb(99 102 241 / 0.08);
  transition: all 0.3s ease;
}

.expense-item:hover {
  box-shadow: 0px 8px 24px 0px rgb(99 102 241 / 0.15);
  transform: translateY(-2px);
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgb(219, 234, 254) 0%, rgb(233, 213, 255) 100%);
  padding: 1.5rem;
}

.auth-card {
  background: rgb(var(--card));
  border: none;
  border-radius: 1.5rem;
  padding: 3rem;
  box-shadow: 0px 16px 48px 0px rgb(99 102 241 / 0.2);
  width: 100%;
  max-width: 440px;
  backdrop-filter: blur(10px);
}

.income-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: linear-gradient(135deg, rgb(167, 243, 208) 0%, rgb(134, 239, 172) 100%);
  color: rgb(21, 128, 61);
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.8125rem;
  box-shadow: 0px 4px 12px 0px rgb(52 211 153 / 0.3);
}

.countdown-timer {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
}

.wishlist-card {
  background: rgb(var(--card));
  border: none;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0px 8px 24px 0px rgb(99 102 241 / 0.12);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.wishlist-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgb(99, 102, 241) 0%, rgb(167, 139, 250) 100%);
}

.wishlist-card:hover {
  box-shadow: 0px 12px 32px 0px rgb(99 102 241 / 0.2);
  transform: translateY(-4px);
}

/* Button enhancements */
.btn {
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.08);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.12);
}

/* Input enhancements */
.input,
.textarea,
select.input {
  border-radius: 0.75rem;
  border: 2px solid rgb(var(--border));
  background: rgb(var(--input));
  transition: all 0.2s ease;
  padding: 0.75rem 1rem;
}

.input:focus,
.textarea:focus,
select.input:focus {
  border-color: rgb(var(--primary));
  box-shadow: 0px 0px 0px 3px rgb(99 102 241 / 0.1);
  outline: none;
}

/* Sidebar enhancements */
aside {
  box-shadow: 0px 0px 48px 0px rgb(99 102 241 / 0.08);
}

/* Decorative circles for hero cards */
.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgb(99, 102, 241) 0%, rgb(139, 92, 246) 100%);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0px 12px 32px 0px rgb(99 102 241 / 0.3);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 250px;
  height: 250px;
  background: rgba(251, 191, 36, 0.25);
  border-radius: 50%;
  border: 3px solid rgba(251, 191, 36, 0.4);
}

.hero-card::after {
  content: '';
  position: absolute;
  bottom: -25%;
  right: 10%;
  width: 140px;
  height: 140px;
  background: rgba(96, 165, 250, 0.4);
  border-radius: 50%;
}

.hero-card .circle-accent {
  position: absolute;
  bottom: 20%;
  left: 8%;
  width: 80px;
  height: 80px;
  border: 3px solid rgba(251, 146, 60, 0.5);
  border-radius: 50%;
}

.hero-card .dot-accent {
  position: absolute;
  top: 35%;
  right: 20%;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
}

/* Income/Expense summary cards */
.summary-card {
  background: rgb(var(--card));
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0px 4px 16px 0px rgb(99 102 241 / 0.08);
  transition: all 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0px 8px 24px 0px rgb(99 102 241 / 0.12);
}

.summary-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.income-icon {
  background: linear-gradient(135deg, rgb(167, 243, 208) 0%, rgb(134, 239, 172) 100%);
  box-shadow: 0px 4px 12px 0px rgb(52 211 153 / 0.3);
}

.expense-icon {
  background: linear-gradient(135deg, rgb(254, 202, 202) 0%, rgb(252, 165, 165) 100%);
  box-shadow: 0px 4px 12px 0px rgb(248 113 113 / 0.3);
}

/* Modal enhancements */
dialog {
  border: none;
  border-radius: 1.5rem;
  box-shadow: 0px 16px 48px 0px rgb(99 102 241 / 0.25);
}
