:root {
  /* Color Palette */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --dark-gradient: linear-gradient(135deg, #232526 0%, #414345 100%);

  /* Background Colors */
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-glass: rgba(255, 255, 255, 0.1);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b4b4b4;
  --text-accent: #64ffda;

  /* Accent Colors */
  --accent-primary: #64ffda;
  --accent-secondary: #ff6b9d;
  --success: #00e676;
  --error: #ff5722;
  --warning: #ffc107;

  /* Shadows */
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 8px 16px rgba(0, 0, 0, 0.3);
}

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

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

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  background-image:
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 107, 157, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(100, 255, 218, 0.2) 0%, transparent 50%);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(20px);
  background: rgba(15, 15, 35, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar {
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-logo i {
  font-size: 2rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse 2s ease-in-out infinite;
}

.nav-logo span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin-right: 15px;
  margin-left: 15px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
  background: rgba(100, 255, 218, 0.1);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.currency-btn {
  padding: 0.5rem 1rem;
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 8px;
  color: var(--accent-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.currency-btn:hover {
  background: rgba(100, 255, 218, 0.2);
  transform: translateY(-2px);
}

.currency-btn i {
  font-size: 1rem;
}

.profile-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
}

.username {
  font-weight: 500;
  color: var(--text-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--accent-primary);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 5px;
}

/* Main Content */
.main-content {
  padding-top: 100px;
  min-height: 100vh;
}

/* Full Hero Section */
.hero-section-full {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 8rem 2rem 4rem;
  overflow: hidden;
}

.hero-background-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  top: 60%;
  right: 10%;
  animation-delay: 7s;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  bottom: 20%;
  left: 50%;
  animation-delay: 14s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(30px, -30px) scale(1.1);
  }

  50% {
    transform: translate(-20px, 20px) scale(0.9);
  }

  75% {
    transform: translate(20px, 30px) scale(1.05);
  }
}

.hero-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 50px;
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge i {
  color: #ffd700;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  animation: fadeInUp 1s ease-out 0.1s both;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.8;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.cta-primary {
  padding: 1rem 2.5rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.cta-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.cta-secondary {
  padding: 1rem 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  backdrop-filter: blur(10px);
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

.hero-features {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.feature-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.feature-pill:hover {
  background: rgba(100, 255, 218, 0.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.feature-pill i {
  color: var(--accent-primary);
  font-size: 1.1rem;
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator i {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Features Showcase Section */
.features-showcase {
  padding: 6rem 0;
  background: rgba(255, 255, 255, 0.02);
}

.section-header-center {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2.5rem;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.feature-card:hover::before {
  opacity: 0.1;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
  border-color: rgba(100, 255, 218, 0.3);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: var(--primary-gradient);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  position: relative;
  z-index: 1;
  transition: transform 0.4s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* How It Works Section */
.how-it-works {
  padding: 6rem 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
}

.step-card {
  text-align: center;
  position: relative;
  padding: 2rem;
}

.step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  z-index: 2;
}

.step-icon {
  width: 100px;
  height: 100px;
  margin: 2rem auto 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(100, 255, 218, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent-primary);
  transition: all 0.4s ease;
}

.step-card:hover .step-icon {
  transform: scale(1.1);
  background: rgba(100, 255, 218, 0.1);
  border-color: var(--accent-primary);
}

.step-card h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.step-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Quick Stats Section */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.5s both;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  background: rgba(255, 255, 255, 0.08);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

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

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

/* Balance Card */
.balance-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(100, 255, 218, 0.2);
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 8px 32px 0 rgba(102, 126, 234, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 1s ease-out 0.6s both;
  width: 100%;
  max-width: 32rem;
  margin: 0 auto 2rem;
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(100, 255, 218, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.balance-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.balance-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.balance-header i {
  color: var(--accent-primary);
  font-size: 1.5rem;
}

.balance-header h4 {
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.balance-amount {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1rem 0;
  text-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

.balance-trend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.trend-indicator {
  font-size: 1.5rem;
  font-weight: bold;
}

.trend-indicator.positive {
  color: var(--success);
}

.trend-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Dashboard Grid (Mobile First) */
.inc-exp-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin-bottom: 2rem;
}

.income-card,
.expense-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-glass);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
}

.income-card:hover,
.expense-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.income-icon {
  background: var(--success-gradient);
}

.expense-icon {
  background: var(--warning-gradient);
}

.card-content h4 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.money-plus {
  color: var(--success);
  font-size: 1.5rem;
  font-weight: 600;
}

.money-minus {
  color: var(--error);
  font-size: 1.5rem;
  font-weight: 600;
}

/* History Section */
.history-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  box-shadow: var(--shadow-glass);
  animation: fadeInUp 1s ease-out 0.8s both;
}

.section-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.section-header h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: none;
  padding-bottom: 0;
  margin: 0;
}

.section-header h3 i {
  color: var(--accent-primary);
}

.filter-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-container {
  position: relative;
  max-width: 300px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.advanced-filters {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-select,
.date-input,
.amount-input {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.category-select:focus,
.date-input:focus,
.amount-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(100, 255, 218, 0.1);
}

.category-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.date-filters,
.amount-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.date-input,
.amount-input {
  cursor: text;
}

.amount-input::placeholder,
.date-input::placeholder {
  color: var(--text-secondary);
}

.clear-filters-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 87, 34, 0.2);
  color: var(--error);
  border: 1px solid rgba(255, 87, 34, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clear-filters-btn:hover {
  background: rgba(255, 87, 34, 0.3);
  border-color: var(--error);
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

.list {
  list-style: none;
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) transparent;
}

.list::-webkit-scrollbar {
  width: 8px;
}

.list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.list::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

.list li {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  transition: all 0.3s ease;
  animation: slideInLeft 0.3s ease-out;
  max-width: 100%;
  word-break: break-word;
}

.list li:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.1);
}

.list li.plus {
  border-left: 4px solid var(--success);
}

.list li.minus {
  border-left: 4px solid var(--error);
}

.delete-btn {
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--error);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.list li:hover .delete-btn {
  opacity: 1;
}

.delete-btn:hover {
  background: #d32f2f;
  transform: translateY(-50%) scale(1.1);
}

/* Data Management Section */
.data-management-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  box-shadow: var(--shadow-glass);
  animation: fadeInUp 1s ease-out 0.9s both;
}

.data-management-section h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.data-management-section h3 i {
  color: var(--accent-primary);
}

.data-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.export-section,
.import-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.export-section h4,
.import-section h4 {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.export-buttons {
  display: flex;
  gap: 1rem;
}

.export-btn {
  padding: 0.75rem 1.5rem;
  background: var(--success-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.export-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.import-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.file-input {
  display: none;
}

.file-label {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.file-label:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-primary);
}

.import-btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.import-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.import-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.import-options {
  margin-top: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
}

/* Form Section */
.form-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  box-shadow: var(--shadow-glass);
  animation: fadeInUp 1s ease-out 1s both;
}

.form-section h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: none;
  padding-bottom: 0;
}

.form-section h3 i {
  color: var(--accent-primary);
}

.transaction-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-control label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-control input {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.form-control input::placeholder {
  color: var(--text-secondary);
}

.form-control select {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.form-control select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.form-control select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.5rem;
}

.form-control small {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-style: italic;
}

.btn-submit {
  padding: 1rem 2rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

/* Footer */
.footer {
  background: rgba(15, 15, 35, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.footer-logo i {
  font-size: 2rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-section h4 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1rem;
}

.footer-bottom .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-stats span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Transaction Display Improvements */
.transaction-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.transaction-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.transaction-text {
  font-weight: 500;
  color: var(--text-primary);
}

.transaction-amount {
  font-weight: 600;
  font-size: 1.1rem;
}

.transaction-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.transaction-category {
  font-size: 0.8rem;
  color: var(--accent-primary);
  background: rgba(100, 255, 218, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 15px;
  margin-top: 0.25rem;
  display: inline-block;
}

/* Balance Card States */
.balance-card.positive .balance-amount {
  color: var(--success);
  text-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
}

.balance-card.negative .balance-amount {
  color: var(--error);
  text-shadow: 0 0 20px rgba(255, 87, 34, 0.3);
}

.balance-card.neutral .balance-amount {
  color: var(--text-secondary);
  text-shadow: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 2rem 0;
    transition: left 0.3s ease;
  }

  .nav-menu.active {
    left: 0;
    display: flex;
  }

  .nav-link {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    width: 80%;
    text-align: center;
    margin: 0.5rem 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .user-profile {
    display: none;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section-full {
    min-height: 90vh;
    padding: 6rem 1.5rem 3rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .cta-primary,
  .cta-secondary {
    width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
  }

  .hero-features {
    flex-direction: column;
    align-items: stretch;
  }

  .feature-pill {
    justify-content: center;
  }

  .scroll-indicator {
    margin-top: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .features-showcase,
  .how-it-works {
    padding: 4rem 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .container {
    padding: 0 1rem;
  }

  .inc-exp-container {
    grid-template-columns: 1fr;
  }

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

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-bottom .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-stats {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .balance-amount {
    font-size: 2rem;
  }

  .income-card,
  .expense-card {
    flex-direction: column;
    text-align: center;
  }

  .card-icon {
    width: 50px;
    height: 50px;
  }

  .advanced-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .date-filters,
  .amount-filters {
    justify-content: stretch;
  }

  .date-input,
  .amount-input,
  .category-select {
    flex: 1;
  }

  .data-actions {
    grid-template-columns: 1fr;
  }
}

/* PWA Install Prompt */
.install-prompt {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 10000;
  animation: slideInUp 0.3s ease-out;
}

.install-prompt-content {
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.install-prompt-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.install-prompt-header i {
  color: var(--accent-primary);
  font-size: 1.5rem;
}

.install-prompt-header h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.install-prompt p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.install-prompt-actions {
  display: flex;
  gap: 1rem;
}

.install-btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.install-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.dismiss-btn {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Offline Indicator */
.offline-indicator {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 152, 0, 0.9);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 9999;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(255, 152, 0, 0.3);
  animation: slideInDown 0.3s ease-out;
}

/* Update Notification */
.update-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  animation: slideInRight 0.3s ease-out;
}

.update-content {
  background: rgba(76, 175, 80, 0.9);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
}

.update-btn {
  background: white;
  color: #4CAF50;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.update-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Touch and gesture improvements */
@media (hover: none) and (pointer: coarse) {

  /* Touch device specific styles */
  .filter-btn,
  .export-btn,
  .import-btn,
  .btn-submit {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
  }

  .delete-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .nav-link {
    padding: 1rem 1.5rem;
  }

  /* Larger tap targets for mobile */
  .category-select,
  .date-input,
  .amount-input,
  .search-input {
    min-height: 48px;
    font-size: 16px;
    /* Prevents zoom on iOS */
  }

  .form-control input,
  .form-control select {
    min-height: 48px;
    font-size: 16px;
  }
}

/* Animations */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

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

@keyframes slideInDown {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Safe area insets for devices with notches */
@supports (padding: max(0px)) {
  .header {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  .main-content {
    padding-left: max(2rem, env(safe-area-inset-left) + 2rem);
    padding-right: max(2rem, env(safe-area-inset-right) + 2rem);
    padding-bottom: max(2rem, env(safe-area-inset-bottom) + 2rem);
  }

  .install-prompt {
    bottom: max(20px, env(safe-area-inset-bottom) + 20px);
    left: max(20px, env(safe-area-inset-left) + 20px);
    right: max(20px, env(safe-area-inset-right) + 20px);
  }
}

.empty-state {
  list-style: none;
  display: flex;
  justify-content: center;
}


.empty-state-content {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px dashed rgba(100, 255, 218, 0.4);
  border-radius: 12px;
  background: rgba(100, 255, 218, 0.05);
}

/* ULTRA SMALL DEVICES (320px)*/
@media (max-width: 360px) {

  /* Global */
  html,
  body {
    overflow-x: hidden;
  }

  body {
    font-size: 14px;
  }

  .container {
    padding: 0.75rem;
    margin-left: auto;
    margin-right: auto;
  }

  /* Navbar */
  .nav-logo span {
    font-size: 0.9rem;
  }

  .nav-toggle .bar {
    width: 22px;
    height: 2.5px;
  }

  /* Hero */
  .hero-title {
    font-size: 1.4rem;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  /* Balance */
  .balance-card {
    padding: 1rem;
  }

  .balance-amount {
    font-size: 1.5rem;
  }

  /* Income / Expense cards */
  .income-card,
  .expense-card {
    padding: 0.75rem;
  }

  /* Filters */
  .search-input,
  .category-select,
  .date-input,
  .amount-input,
  .filter-btn,
  .clear-filters-btn {
    width: 100%;
    min-width: 0;
    font-size: 0.85rem;
  }

  .filter-buttons {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Transaction list */
  .list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  /* Form */
  .transaction-form {
    padding: 1rem;
  }

  .transaction-form input,
  .transaction-form select,
  .btn-submit {
    font-size: 0.9rem;
  }

  /* Footer */
  .footer-section h4 {
    font-size: 1rem;
  }

  .footer-links a {
    font-size: 0.85rem;
  }

  .nav-container {
    padding: 0 0.75rem;
  }

  .nav-logo span {
    font-size: 0.85rem;
  }
}

input,
select,
button {
  max-width: 100%;
  min-width: 0;
}

/* ========================
   ANALYTICS DASHBOARD STYLES
   ======================== */

.analytics-dashboard {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  box-shadow: var(--shadow-glass);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.7s both;
}

.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.analytics-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.analytics-header h3 i {
  color: var(--accent-primary);
}

.refresh-analytics-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.refresh-analytics-btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.analytics-widget {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.analytics-widget:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.08);
}

.widget-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-secondary);
  gap: 0.5rem;
}

.widget-loading i {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.no-data {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

/* Velocity Widget */
.velocity-widget {
  grid-column: span 2;
}

.velocity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.velocity-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.velocity-header h4 i {
  color: var(--accent-primary);
}

.velocity-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.velocity-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.velocity-stat {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.velocity-stat .stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.velocity-stat .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.velocity-stat.projected .stat-value {
  color: var(--warning);
}

.velocity-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Category Chart Widget */
.category-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.category-chart-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-chart-header h4 i {
  color: var(--accent-primary);
}

.total-amount {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.category-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.category-bar-item {
  display: grid;
  grid-template-columns: 120px 1fr 100px;
  align-items: center;
  gap: 1rem;
}

.category-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-icon {
  font-size: 1.1rem;
}

.category-name {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.category-bar-wrapper {
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.category-bar {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

.category-stats {
  text-align: right;
}

.category-amount {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.category-percent {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Trends Chart Widget */
.trends-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.trends-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trends-header h4 i {
  color: var(--accent-primary);
}

.trends-legend {
  display: flex;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-item.income .legend-dot {
  background: var(--success);
}

.legend-item.expense .legend-dot {
  background: var(--error);
}

.trends-chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 150px;
  padding: 0.5rem 0;
  gap: 0.5rem;
}

.trend-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
}

.trend-bar {
  width: 20px;
  border-radius: 5px 5px 0 0;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 4px;
}

.trend-bar.income {
  background: var(--success);
}

.trend-bar.expense {
  background: var(--error);
}

.trend-bar:hover {
  opacity: 0.8;
  transform: scaleY(1.02);
}

.trend-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-align: center;
}

.trends-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item {
  text-align: center;
}

.summary-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.summary-value {
  font-weight: 600;
  font-size: 0.9rem;
}

.summary-value.expense {
  color: var(--error);
}

.summary-value.positive {
  color: var(--success);
}

.summary-value.negative {
  color: var(--error);
}

/* Predictions Widget */
.predictions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.predictions-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.predictions-header h4 i {
  color: var(--accent-primary);
}

.confidence-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(100, 255, 218, 0.2);
  color: var(--accent-primary);
  border-radius: 20px;
}

.prediction-main {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  margin-bottom: 1rem;
}

.prediction-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.prediction-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.prediction-trend {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.prediction-trend.positive {
  color: var(--success);
}

.prediction-trend.negative {
  color: var(--error);
}

.prediction-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.detail-item {
  text-align: center;
  padding: 0.5rem;
}

.detail-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.detail-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Insights Widget */
.insights-widget {
  grid-column: span 2;
}

.insights-header {
  margin-bottom: 1rem;
}

.insights-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.insights-header h4 i {
  color: #ffc107;
}

.insights-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.insight-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border-left: 4px solid var(--accent-primary);
}

.insight-card.success {
  border-left-color: var(--success);
}

.insight-card.warning {
  border-left-color: var(--warning);
}

.insight-card.danger {
  border-left-color: var(--error);
}

.insight-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(100, 255, 218, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.insight-card.success .insight-icon {
  background: rgba(0, 230, 118, 0.2);
  color: var(--success);
}

.insight-card.warning .insight-icon {
  background: rgba(255, 193, 7, 0.2);
  color: var(--warning);
}

.insight-card.danger .insight-icon {
  background: rgba(255, 87, 34, 0.2);
  color: var(--error);
}

.insight-icon i {
  color: var(--accent-primary);
}

.insight-content h5 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.insight-content p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.insight-suggestion {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-style: italic;
}

/* Responsive Analytics */
@media (max-width: 768px) {
  .analytics-dashboard {
    padding: 1.5rem;
  }

  .analytics-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .refresh-analytics-btn {
    width: 100%;
    justify-content: center;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .velocity-widget,
  .insights-widget {
    grid-column: span 1;
  }

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

  .category-bar-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .category-stats {
    text-align: left;
    display: flex;
    gap: 1rem;
  }

  .trends-chart-container {
    height: 120px;
  }

  .trend-bar {
    width: 15px;
  }

  .trends-summary {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .prediction-details {
    grid-template-columns: 1fr;
  }

  .insights-list {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   CURRENCY SUPPORT STYLES
   =============================== */

/* Currency Button in Navbar */
.currency-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 8px;
  color: var(--accent-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 1rem;
}

.currency-btn:hover {
  background: rgba(100, 255, 218, 0.2);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.currency-btn i {
  font-size: 1rem;
}

/* Currency Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-primary);
  font-size: 1.25rem;
}

.close-modal {
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
}

.close-modal:hover {
  color: var(--error);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Currency Select Styling */
.currency-select {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.currency-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.currency-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.5rem;
}

/* Exchange Rate Info Display */
.exchange-rate-info {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
}

.rate-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.rate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: rgba(100, 255, 218, 0.05);
  border-radius: 6px;
  border-left: 3px solid var(--accent-primary);
}

.rate-currency {
  font-weight: 600;
  color: var(--text-primary);
}

.rate-value {
  font-family: 'Courier New', monospace;
  color: var(--accent-primary);
  font-weight: 600;
}

.exchange-rate-info small {
  display: block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Modal Buttons */
.btn-cancel {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
}

/* Currency Badge in Transaction List */
.transaction-currency {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(100, 255, 218, 0.1);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--accent-primary);
  font-weight: 600;
  margin-left: 0.5rem;
}

/* =========================
   AI CATEGORIZATION STYLES
   ========================= */

/* Description input wrapper */
.description-input-wrapper {
  position: relative;
  width: 100%;
}

/* Category suggestions dropdown */
.category-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-primary);
  border-radius: 8px;
  margin-top: 0.5rem;
  box-shadow: var(--shadow-glass);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.category-suggestions.visible {
  opacity: 1;
  transform: translateY(0);
}

.category-suggestions.hidden {
  display: none;
}

/* Suggestion header */
.suggestions-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(100, 255, 218, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.suggestions-header i {
  color: var(--accent-primary);
  animation: pulse 2s infinite;
}

.suggestions-header span {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 600;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Suggestion item */
.suggestion-item {
  padding: 0.875rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.suggestion-item:hover {
  background: rgba(100, 255, 218, 0.1);
  transform: translateX(5px);
}

.suggestion-item.primary {
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.15), rgba(100, 255, 218, 0.05));
}

.suggestion-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.suggestion-category {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.suggestion-category-icon {
  font-size: 1.2rem;
}

.suggestion-reason {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.suggestion-reason i {
  font-size: 0.7rem;
  color: var(--accent-primary);
}

/* Confidence badge */
.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.2), rgba(100, 255, 218, 0.1));
  color: var(--accent-primary);
  margin-left: 0.5rem;
}

.confidence-badge.hidden {
  display: none;
}

.confidence-badge i {
  font-size: 0.7rem;
}

/* Confidence bar in suggestion */
.suggestion-confidence {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  min-width: 60px;
}

.confidence-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.confidence-bar {
  width: 50px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--success));
  transition: width 0.3s ease;
}

/* Confidence levels - different colors */
.confidence-high .confidence-fill {
  background: linear-gradient(90deg, #00e676, #00c853);
}

.confidence-medium .confidence-fill {
  background: linear-gradient(90deg, #ffc107, #ff9800);
}

.confidence-low .confidence-fill {
  background: linear-gradient(90deg, #ff5722, #f44336);
}

/* Loading state */
.suggestions-loading {
  padding: 1rem;
  text-align: center;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.suggestions-loading i {
  animation: spin 1s linear infinite;
}

/* ULTRA SMALL DEVICES (320px)*/
@media (max-width: 360px) {

  /* Global */
  html,
  body {
    overflow-x: hidden;
  }

  body {
    font-size: 14px;
  }

  .container {
    padding: 0.75rem;
    margin-left: auto;
    margin-right: auto;
  }

  /* Navbar */
  .nav-logo span {
    font-size: 0.9rem;
  }

  .nav-toggle .bar {
    width: 22px;
    height: 2.5px;
  }

  /* Hero */
  .hero-title {
    font-size: 1.4rem;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  /* Balance */
  .balance-card {
    padding: 1rem;
  }

  .balance-amount {
    font-size: 1.5rem;
  }

  /* Income / Expense cards */
  .income-card,
  .expense-card {
    padding: 0.75rem;
  }

  /* Filters */
  .search-input,
  .category-select,
  .date-input,
  .amount-input,
  .filter-btn,
  .clear-filters-btn {
    width: 100%;
    min-width: 0;
    font-size: 0.85rem;
  }

  .filter-buttons {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Transaction list */
  .list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  /* Form */
  .transaction-form {
    padding: 1rem;
  }

  .transaction-form input,
  .transaction-form select,
  .btn-submit {
    font-size: 0.9rem;
  }

  /* Footer */
  .footer-section h4 {
    font-size: 1rem;
  }

  .footer-links a {
    font-size: 0.85rem;
  }

  .nav-container {
    padding: 0 0.75rem;
  }

  .nav-logo span {
    font-size: 0.85rem;
  }
}

input,
select,
button {
  max-width: 100%;
  min-width: 0;
}

/* ========================
   EXPORT MODAL STYLES
   ======================== */

.export-btn.pdf-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.export-btn.pdf-btn:hover {
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.export-btn.advanced-btn {
  background: var(--primary-gradient);
}

.export-btn.advanced-btn:hover {
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Export Modal */
.export-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.export-modal.active {
  opacity: 1;
  visibility: visible;
}

.export-modal-content {
  background: var(--bg-secondary);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.export-modal.active .export-modal-content {
  transform: translateY(0);
}

.export-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.export-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.export-modal-header h3 i {
  color: var(--accent-primary);
}

.export-modal-body {
  padding: 2rem;
}

.export-format-section,
.export-filters-section,
.export-preview-section {
  margin-bottom: 2rem;
}

.export-format-section h4,
.export-filters-section h4,
.export-preview-section h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Format Options */
.format-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.format-option {
  cursor: pointer;
}

.format-option input {
  display: none;
}

.format-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.format-option input:checked+.format-card {
  border-color: var(--accent-primary);
  background: rgba(100, 255, 218, 0.1);
}

.format-card i {
  font-size: 2.5rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.format-card .format-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.format-card .format-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.format-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* Filter Grid */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* Export Preview */
.export-preview {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.export-preview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.preview-stat {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.preview-stat .stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.preview-stat .stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.preview-stat.income .stat-value {
  color: var(--success);
}

.preview-stat.expense .stat-value {
  color: var(--error);
}

.preview-stat.positive .stat-value {
  color: var(--success);
}

.preview-stat.negative .stat-value {
  color: var(--error);
}

.export-preview-loading,
.export-preview-error,
.export-preview-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.export-preview-empty i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.export-preview-error {
  color: var(--error);
}

/* Export Modal Footer */
.export-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Export Notification */
.export-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 3000;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  font-weight: 500;
}

.export-notification.show {
  transform: translateX(0);
}

.export-notification.success {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.9) 0%, rgba(0, 200, 83, 0.9) 100%);
  color: white;
}

.export-notification.error {
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.9) 0%, rgba(244, 67, 54, 0.9) 100%);
  color: white;
}

.export-notification.info {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  color: white;
}

/* Responsive Export Modal */
@media (max-width: 768px) {
  .export-modal-content {
    width: 95%;
    max-height: 85vh;
  }

  .export-modal-body {
    padding: 1.5rem;
  }

  .format-options {
    grid-template-columns: 1fr;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .export-preview-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .export-modal-footer {
    flex-direction: column;
  }

  .export-modal-footer button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .export-preview-stats {
    grid-template-columns: 1fr;
  }

  .export-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .export-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive Design for Currency Features */
@media (max-width: 768px) {
  .currency-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    margin-right: 0.5rem;
  }

  .currency-btn span {
    display: none;
  }

  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }

  .rate-list {
    gap: 0.5rem;
  }

  /* AI Categorization responsive */
  .category-suggestions {
    max-height: 250px;
  }

  .suggestion-item {
    padding: 0.75rem;
  }

  .suggestion-confidence {
    min-width: 50px;
  }

  .confidence-bar {
    width: 40px;
  }
}

/* =========================
   WIDTH PRESERVATION FIX
   (Keeps original layout)
========================= */

/* Ensure container width stays exactly the same */
.container,
.nav-container,
.footer-container {
  max-width: 1200px;
  /* same as before */
  margin-left: auto;
  margin-right: auto;
}

/* Cards should NOT stretch wider */
.balance-card,
.history-section,
.form-section,
.data-management-section,
.income-card,
.expense-card {
  width: 100%;
  max-width: 100%;
}

/* Grid spacing only – no width change */
.container {
  row-gap: 3.5rem;
}

/* Income / Expense grid keeps original width */
.inc-exp-container {
  grid-template-columns: 1fr 1fr;
  /* unchanged */
  gap: 2.5rem;
}

/* Prevent accidental full-screen stretch */
.main-content {
  width: 100%;
  overflow-x: hidden;
}

/* Mobile stays stacked like before */
@media (max-width: 768px) {
  .inc-exp-container {
    grid-template-columns: 1fr;
  }
}

/* =========================
   REDUCED CARD SPACING
   (Width & style preserved)
========================= */

/* Main container – smaller vertical gap */
.main-content .container {
  row-gap: 1.6rem !important;
}

/* Cards – subtle spacing only */
.balance-card,
.history-section,
.form-section,
.data-management-section {
  margin-top: 0.6rem !important;
  margin-bottom: 0.6rem !important;
}

/* Income & Expense cards */
.inc-exp-container {
  gap: 1.2rem !important;
}

/* Transaction list items */
.list li {
  margin-bottom: 0.6rem !important;
}

/* Footer spacing */
.footer-container {
  row-gap: 1.5rem !important;
}

/* Mobile refinement */
@media (max-width: 768px) {
  .main-content .container {
    row-gap: 1.3rem !important;
  }
}

/* =========================
   RECURRING EXPENSES MODAL
========================= */

/* Recurring Modal Overlay */
.recurring-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 35, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.recurring-modal.active {
  display: flex;
}

/* Modal Content Container */
.recurring-modal-content {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(22, 33, 62, 0.98) 100%);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(100, 255, 218, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

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

/* Modal Header */
.recurring-modal-header {
  padding: 1.75rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(100, 255, 218, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recurring-modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.recurring-modal-header h3::before {
  content: '🔄';
  font-size: 1.5rem;
}

/* Modal Close Button */
.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.modal-close-btn:hover {
  background: rgba(255, 87, 34, 0.2);
  color: var(--error);
  border-color: rgba(255, 87, 34, 0.3);
  transform: rotate(90deg);
}

/* Recurring Form */
.recurring-form {
  padding: 2rem;
  overflow-y: auto;
  max-height: calc(90vh - 160px);
}

.recurring-form::-webkit-scrollbar {
  width: 8px;
}

.recurring-form::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.recurring-form::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 10px;
}

.recurring-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.recurring-form .form-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recurring-form .form-control label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recurring-form .form-control input,
.recurring-form .form-control select,
.recurring-form .form-control textarea {
  padding: 0.875rem 1rem;
  border: 1px solid rgba(100, 255, 218, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.recurring-form .form-control input:focus,
.recurring-form .form-control select:focus,
.recurring-form .form-control textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(100, 255, 218, 0.08);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.recurring-form .form-control input::placeholder,
.recurring-form .form-control textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.recurring-form .form-control select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.5rem;
}

.recurring-form .form-control textarea {
  resize: vertical;
  min-height: 80px;
}

/* Checkbox Control */
.recurring-form .checkbox-control {
  display: flex;
  align-items: center;
  padding-top: 1.5rem;
}

.recurring-form .checkbox-control .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}

.recurring-form .checkbox-control input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent-primary);
  border-radius: 4px;
}

.recurring-form .full-width {
  grid-column: 1 / -1;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 1rem;
}

.btn-cancel {
  flex: 1;
  padding: 0.875rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-submit {
  flex: 1;
  padding: 0.875rem 1.5rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
  transform: translateY(0);
}

/* Recurring Section Styles */
.recurring-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  box-shadow: var(--shadow-glass);
  margin-top: 2rem;
}

.recurring-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.recurring-section .section-header h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.recurring-section .section-header h3 i {
  color: var(--accent-primary);
}

.add-recurring-btn {
  padding: 0.75rem 1.5rem;
  background: var(--success-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.add-recurring-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

/* Responsive Recurring Modal */
@media (max-width: 768px) {
  .recurring-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .recurring-modal-header {
    padding: 1.25rem 1.5rem;
  }

  .recurring-modal-header h3 {
    font-size: 1.2rem;
  }

  .recurring-form {
    padding: 1.5rem;
  }

  .recurring-form .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .btn-cancel,
  .btn-submit {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .recurring-modal-content {
    border-radius: 15px;
  }

  .recurring-modal-header {
    padding: 1rem 1.25rem;
  }

  .recurring-form {
    padding: 1.25rem;
  }

  .recurring-form .form-control input,
  .recurring-form .form-control select,
  .recurring-form .form-control textarea {
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
  }
}

/* Finance Tips Layout Enhancements */
.hero-section+.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.hero-section+.container .data-management-section {
  grid-column: 1 / -1;
}

.hero-section+.container .balance-card {
  margin: 0;
}

/* Budget Goals Dashboard */
#budget-goals-dashboard {
  max-width: 1200px;
  margin: 6rem auto 3rem;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard-header h2 {
  font-size: 2rem;
  margin: 0;
  color: var(--text-primary);
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dashboard-actions button {
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-actions button.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 10px 35px rgba(102, 126, 234, 0.35);
}

.dashboard-actions button.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.summary-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.summary-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.metric .value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dashboard-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.budgets-section,
.goals-section,
.alerts-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.75rem;
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.budgets-section h3,
.goals-section h3,
.alerts-section h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.budget-item,
.goal-item {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.budget-header,
.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.budget-header h4,
.goal-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.budget-percentage,
.goal-type {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.budget-progress,
.goal-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.progress-bar {
  flex: 1;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary-gradient);
  box-shadow: 0 4px 12px rgba(118, 75, 162, 0.4);
}

.progress-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.goal-details,
.budget-details {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.goal-details .days-left {
  font-weight: 600;
  color: var(--accent-primary);
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.alert-icon {
  font-size: 1.5rem;
}

.alert-content h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.alert-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.alert-content span {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

#budget-modal .modal-content,
#goal-modal .modal-content {
  width: min(90vw, 520px);
  padding: 1.5rem;
}

.modal-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0 1rem;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    gap: 0.75rem;
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
  }

  .hero-section {
    padding: 4rem 1.5rem 2rem;
    text-align: left;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .cta-primary,
  .hero-cta .cta-secondary {
    width: 100%;
  }

  .hero-section+.container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  #budget-goals-dashboard {
    margin: 4.5rem 1rem;
    padding: 1.75rem;
  }

  .dashboard-actions button {
    flex: 1;
    justify-content: center;
  }

  .dashboard-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-content {
    grid-template-columns: 1fr;
  }

  .alerts-section {
    order: 3;
  }

  .items-list {
    max-height: 360px;
  }
}

/* ========================
   FINANCIAL GOALS STYLES
   ======================== */

.goals-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  box-shadow: var(--shadow-glass);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.8s both;
}

.add-goal-btn {
  padding: 0.6rem 1.2rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-goal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.goals-dashboard-container {
  margin-top: 1.5rem;
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.goal-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
}

.goal-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-primary);
}

.goal-card.completed {
  border-left: 4px solid var(--success);
}

.goal-card.overdue {
  border-left: 4px solid var(--error);
}

.goal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.goal-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.goal-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.goal-priority {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  font-weight: 700;
}

.goal-priority.low {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.goal-priority.medium {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.goal-priority.high {
  background: rgba(255, 87, 34, 0.2);
  color: #ff5722;
}

.goal-priority.critical {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

.auto-badge {
  color: var(--accent-primary);
  font-size: 0.8rem;
  animation: pulse 2s infinite;
}

.goal-info h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.goal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0.25rem 0 0 0;
}

.goal-progress-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.progress-percent {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.progress-amount {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.goal-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.goal-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.goal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.goal-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  gap: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.goal-actions {
  display: flex;
  gap: 0.75rem;
}

.goal-btn {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

.goal-btn.contribute:hover {
  background: #4caf50;
  border-color: #4caf50;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.6;
  }
}

@media (max-width: 768px) {
  .goals-grid {
    grid-template-columns: 1fr;
  }

  .goals-section {
    padding: 1.5rem;
  }
}

/* =========================
   WORKSPACE MANAGEMENT STYLES
   ========================= */
.workspace-selector {
  position: relative;
  display: inline-block;
  margin-right: 1.5rem;
}

.workspace-current {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
}

.workspace-current:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
}

.workspace-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 0.9rem;
}

.workspace-info {
  display: flex;
  flex-direction: column;
}

.workspace-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.workspace-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-arrow {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.workspace-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: #1a1a36;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 0.5rem;
  z-index: 1000;
  display: none;
  animation: slideInUp 0.2s ease-out;
}

.workspace-dropdown.active {
  display: block;
}

.workspace-divider {
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.workspace-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.workspace-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.workspace-item.active {
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.2);
}

.workspace-avatar-sm {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.owner-badge {
  margin-left: auto;
  font-size: 0.65rem;
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  padding: 2px 6px;
  border-radius: 4px;
}

.workspace-footer {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.add-workspace-btn {
  width: 100%;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  padding: 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.add-workspace-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

@media (max-width: 768px) {
  .workspace-selector {
    margin-right: 0;
    margin-bottom: 1rem;
    width: 100%;
  }

  .workspace-current {
    width: 100%;
  }

  .workspace-dropdown {
    width: 100%;
    left: 0;
  }
}

/* =========================
   ANALYTICS & FORECASTING
   ========================= */
.analytics-section {
  margin-top: 4rem;
  padding: 2rem 0;
}

.analytics-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.analytics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 992px) {
  .analytics-row {
    grid-template-columns: 1fr;
  }
}

.analytics-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.analytics-card h4 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.analytics-card h4 i {
  color: var(--accent-primary);
}

/* Velocity & Forecast Widgets */
.sts-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sts-daily,
.sts-total {
  display: flex;
  flex-direction: column;
}

.sts-label,
.comm-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.sts-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sts-daily .sts-value {
  color: var(--accent-primary);
}

.sts-commitments {
  display: flex;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 12px;
}

.commitment-item {
  display: flex;
  flex-direction: column;
}

.comm-value {
  font-weight: 600;
  font-size: 1rem;
}

.forecast-days {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(100, 255, 218, 0.1);
  padding: 2px 8px;
  border-radius: 50px;
  border: 1px solid rgba(100, 255, 218, 0.2);
}

/* Prediction Widget */
.prediction-main {
  text-align: center;
  margin-bottom: 2rem;
}

.prediction-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.prediction-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 50px;
}

.prediction-trend.positive {
  background: rgba(0, 230, 118, 0.1);
  color: var(--success);
}

.prediction-trend.negative {
  background: rgba(255, 87, 34, 0.1);
  color: var(--error);
}

/* Insight Cards */
.insights-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.insight-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 4px solid var(--accent-primary);
}

.insight-card.warning {
  border-left-color: var(--warning);
}

.insight-card.danger {
  border-left-color: var(--error);
}

.insight-card.success {
  border-left-color: var(--success);
}

.insight-icon {
  font-size: 1.2rem;
  padding-top: 0.2rem;
}

.insight-content h5 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.insight-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.insight-suggestion {
  display: block;
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-style: italic;
}

/* Charts */
.category-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-bar-item {
  display: grid;
  grid-template-columns: 100px 1fr 80px;
  align-items: center;
  gap: 1rem;
}

.category-bar-wrapper {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.category-bar {
  height: 100%;
  border-radius: 4px;
}

.category-stats {
  text-align: right;
  font-size: 0.8rem;
}

.category-percent {
  color: var(--text-secondary);
  display: block;
}

/* Loading State for Widgets */
.widget-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.widget-loading i {
  font-size: 2rem;
  color: var(--accent-primary);
}