:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --accent-violet: #8b5cf6;
  --accent-orange: #f97316;
  --accent-orange-light: #fb923c;
  --bg-main: #f0f4f8;
  --bg-card: #ffffff;
  --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f1f5f9 100%);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --success: #22c55e;
  --gradient-card: linear-gradient(135deg, #4c1d95 0%, #6366f1 50%, #8b5cf6 100%);
  --gradient-orange: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-elevated: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(249, 115, 22, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(34, 197, 94, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.app-container {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 100px;
  z-index: 1;
}

@media (min-width: 768px) {
  .app-container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .app-container {
    max-width: 1024px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 24px;
  }
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  position: relative;
}

.avatar {
  display: none;
}

.page-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--text-primary);
}

.notification-btn {
  display: none;
}

.notification-dot {
  display: none;
}

/* Main Content */
.main-content {
  padding: 0 24px;
}

@media (min-width: 1024px) {
  .main-content {
    display: block;
    grid-column: 2;
  }
}

/* Balance Card */
.balance-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 25%, #4c1d95 50%, #5b21b6 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: white;
  margin-bottom: 24px;
  box-shadow: 
    0 25px 50px -12px rgba(67, 56, 202, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 0 100px rgba(139, 92, 246, 0.25) inset;
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 60%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.balance-card-float {
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 50%);
  border-radius: 50%;
  animation: floatReverse 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.1); }
}

@keyframes floatReverse {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-15px, 15px) scale(1.05); }
}

.balance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%),
    linear-gradient(0deg, transparent 0%, rgba(255,255,255,0.02) 50%, transparent 100%);
  pointer-events: none;
  background-size: 100px 100px;
}

@media (min-width: 1024px) {
  .balance-card {
    grid-column: span 2;
  }
}

.balance-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 8px;
}

.balance-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-number-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-chip {
  width: 40px;
  height: 30px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.card-chip::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 4px;
}

.card-chip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 10px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 2px;
}

.card-chip-lines {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.3);
}

.card-chip-lines::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.3);
}

.card-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0;
  border-top: none;
}

.card-info {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  opacity: 0.9;
  font-family: 'Courier New', monospace;
}

.card-valid {
  font-size: 10px;
  opacity: 0.6;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
}

.mastercard-icon {
  display: flex;
  align-items: center;
}

.mc-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  opacity: 0.95;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.mc-red { 
  background: #ef4444; 
  margin-right: -10px;
  z-index: 1;
}

.mc-yellow { 
  background: #fbbf24; 
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 18px;
}

.view-all, .dropdown-btn {
  font-size: 13px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}

.view-all:hover, .dropdown-btn:hover {
  background: rgba(99, 102, 241, 0.1);
}

/* Dark Mode Styles */
body.dark-mode {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-light: #64748b;
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

body.dark-mode .chart-container,
body.dark-mode .category-card,
body.dark-mode .transaction-item,
body.dark-mode .stat-card {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 
    var(--shadow-soft),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

body.dark-mode .sidebar {
  background: #1e293b;
}

body.dark-mode .bottom-nav {
  background: #1e293b;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
}

body.dark-mode .balance-card {
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Dark Mode Toggle Switch */
#darkModeToggle:checked + #darkModeSlider {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

#darkModeToggle:checked + #darkModeSlider:before {
  transform: translateX(20px);
}

#darkModeSlider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

/* Analytics Section */
.analytics-section {
  margin-bottom: 24px;
}

.chart-container {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 
    var(--shadow-soft),
    0 0 0 1px rgba(226, 232, 240, 0.8) inset;
  height: 200px;
  position: relative;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-tab {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: var(--bg-main);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab.active {
  background: var(--accent-orange);
  color: white;
}

/* Expense Summary Cards */
.expense-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 1024px) {
  .expense-summary {
    grid-template-columns: repeat(4, 1fr);
  }
}

.summary-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 
    var(--shadow-soft),
    0 0 0 1px rgba(255,255,255,0.5) inset;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent-violet));
  opacity: 0.3;
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    var(--shadow-elevated),
    0 0 0 1px rgba(255,255,255,0.5) inset;
}

.summary-card.income {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #34d399 100%);
  color: white;
  box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.4);
}

.summary-card.income::before {
  background: linear-gradient(90deg, #34d399, #10b981);
  opacity: 0.5;
}

.summary-card.expense {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #fb923c 100%);
  color: white;
  box-shadow: 0 10px 30px -5px rgba(249, 115, 22, 0.4);
}

.summary-card.expense::before {
  background: linear-gradient(90deg, #fb923c, #f97316);
  opacity: 0.5;
}

.summary-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 16px;
}

.summary-label {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.summary-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

/* Calendar Section */
.calendar-section {
  margin-bottom: 24px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: var(--primary);
  color: white;
}

.current-month {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 15px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
}

.calendar-day-header {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 600;
  padding: 8px 0;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.calendar-day:hover {
  background: rgba(99, 102, 241, 0.1);
}

.calendar-day.selected {
  background: var(--accent-orange);
  color: white;
  font-weight: 700;
}

.calendar-day.other-month {
  color: var(--text-light);
}

/* Pie Chart Section */
.pie-section {
  margin-bottom: 24px;
}

.pie-container {
  position: relative;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pie-center {
  position: absolute;
  text-align: center;
}

.pie-total {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
}

.pie-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.category-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Category Cards */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.category-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 
    var(--shadow-soft),
    0 0 0 1px rgba(226, 232, 240, 0.6) inset;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--accent-violet));
  opacity: 0;
  transition: opacity 0.2s;
}

.category-card:hover::before {
  opacity: 1;
}

.category-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-elevated);
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.category-info {
  flex: 1;
}

.category-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.category-transactions {
  font-size: 12px;
  color: var(--text-light);
}

.category-stats {
  text-align: right;
}

.category-amount {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
}

.category-bar {
  width: 60px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Progress Section */
.progress-section {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
}

.progress-header {
  margin-bottom: 16px;
}

.progress-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.progress-highlight {
  color: var(--accent-orange);
  font-weight: 700;
}

.progress-bar-container {
  margin-top: 12px;
}

.progress-bar {
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
}

.progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Transactions */
.transactions-section {
  margin-bottom: 24px;
}

.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: all 0.2s;
}

.transaction-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-elevated);
}

.transaction-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.transaction-info {
  flex: 1;
}

.transaction-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.transaction-category {
  font-size: 12px;
  color: var(--text-light);
}

.transaction-amount {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.transaction-amount.expense {
  color: var(--accent-orange);
}

.transaction-amount.income {
  color: var(--success);
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 24px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 99999;
}

@media (min-width: 768px) {
  .bottom-nav {
    padding: 12px 0 24px;
  }
}

@media (min-width: 1024px) {
  .bottom-nav {
    display: none;
  }
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  outline: none;
  background: transparent;
  min-height: 56px;
  -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
  position: relative;
  z-index: 1;
  text-decoration: none;
  color: inherit;
}

.nav-item:hover {
  background: rgba(99, 102, 241, 0.1);
}

.nav-item:active {
  background: rgba(99, 102, 241, 0.2);
  transform: scale(0.95);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active .nav-icon {
  color: var(--primary);
}

.nav-icon {
  font-size: 26px;
  line-height: 1;
  color: var(--text-light);
  pointer-events: none;
}

.nav-item.active .nav-icon {
  color: var(--primary);
}

.add-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-orange);
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  font-weight: 300;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
  cursor: pointer;
  margin-top: -20px;
  -webkit-tap-highlight-color: rgba(249, 115, 22, 0.3);
  position: relative;
  z-index: 1;
}

.add-btn:active {
  transform: scale(0.9);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

/* Sidebar for desktop */
.sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    height: calc(100vh - 48px);
    position: sticky;
    top: 24px;
    grid-column: 1;
  }

  .sidebar-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
  }

  .sidebar-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
  }

  .sidebar-item.active {
    background: var(--primary);
    color: white;
  }
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: slideUp 0.5s ease forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* Cards with different backgrounds */
.icon-bg-food { background: #fef3c7; }
.icon-bg-shopping { background: #fce7f3; }
.icon-bg-transport { background: #dbeafe; }
.icon-bg-health { background: #d1fae5; }
.icon-bg-entertainment { background: #ede9fe; }
.icon-bg-bills { background: #fee2e2; }

/* Amount colors */
.amount-food { color: #f59e0b; }
.amount-shopping { color: #ec4899; }
.amount-transport { color: #3b82f6; }
.amount-health { color: #10b981; }
.amount-entertainment { color: #8b5cf6; }
.amount-bills { color: #ef4444; }

/* Bar colors */
.bar-food { background: #f59e0b; }
.bar-shopping { background: #ec4899; }
.bar-transport { background: #3b82f6; }
.bar-health { background: #10b981; }
.bar-entertainment { background: #8b5cf6; }

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-main);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--accent-orange);
  color: white;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
  background: var(--bg-card);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-input.amount {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.type-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.type-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.type-btn.income {
  color: var(--success);
}

.type-btn.expense {
  color: var(--accent-orange);
}

.type-btn.active.income {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.type-btn.active.expense {
  background: var(--accent-orange);
  color: white;
  border-color: var(--accent-orange);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.category-option {
  padding: 12px 8px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-size: 12px;
}

.category-option:hover {
  border-color: var(--primary);
}

.category-option.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.category-option .cat-icon {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}

.submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--gradient-orange);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

.delete-btn {
  background: #ef4444;
  margin-top: 8px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.search-container {
  position: relative;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-light);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.transaction-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.transaction-item:hover .transaction-actions {
  opacity: 1;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.action-btn.edit {
  background: #dbeafe;
  color: #3b82f6;
}

.action-btn.delete {
  background: #fee2e2;
  color: #ef4444;
}

.action-btn:hover {
  transform: scale(1.1);
}

.budget-editor {
  display: flex;
  align-items: center;
  gap: 8px;
}

.budget-input {
  width: 80px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  text-align: right;
}

.save-budget-btn {
  padding: 6px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (min-width: 1024px) {
  .modal {
    max-width: 500px;
  }
  
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
