/* ==========================================================================
   SnowBills - Base Styles (Theme Independent)
   Common styling that works with both light and dark themes
   ========================================================================== */

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   2. BASE STYLES & RESET
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  height: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Focus Management */
*:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Selection */
::selection {
  background-color: rgba(66, 153, 225, 0.3);
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

/* ==========================================================================
   4. MAIN APP STRUCTURE
   ========================================================================== */

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   5. AUTHENTICATION CONTAINER
   ========================================================================== */

.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(66, 153, 225, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(72, 187, 120, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(237, 137, 54, 0.05) 0%, transparent 50%);
}

.auth-box {
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-3xl);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.auth-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.auth-logo i {
  font-size: var(--text-5xl);
  color: var(--snowflake-blue);
  margin-bottom: var(--space-lg);
  display: block;
  animation: float 3s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(79, 195, 247, 0.3);
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

.auth-logo h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-sm);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: 0;
  font-style: italic;
}

/* Auth Form */
#authForm {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

#authForm input {
  width: 100%;
  padding: var(--space-lg);
  background: var(--bg-input);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-inner);
}

#authForm input:focus {
  background: var(--bg-card);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1), var(--shadow-inner);
  transform: translateY(-1px);
}

#authForm input::placeholder {
  color: var(--text-muted);
}

#authForm button {
  width: 100%;
  padding: var(--space-lg);
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

#authForm button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

#authForm button:active {
  transform: translateY(0);
}

#authForm button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

#authForm button:hover::before {
  left: 100%;
}

.auth-switch {
  text-align: center;
  margin-top: var(--space-xl);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.auth-switch a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.auth-switch a:hover {
  color: var(--color-primary-light);
}

/* ==========================================================================
   6. MAIN CONTAINER & LAYOUT
   ========================================================================== */

.main-container {
  min-height: 100vh;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   7. APP HEADER
   ========================================================================== */

.app-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-2xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo i {
  color: var(--snowflake-blue);
  font-size: var(--text-2xl);
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { text-shadow: 0 0 5px rgba(79, 195, 247, 0.5); }
  50% { text-shadow: 0 0 20px rgba(79, 195, 247, 0.8), 0 0 30px rgba(79, 195, 247, 0.3); }
}

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

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
}

.user-info i {
  color: var(--color-primary);
  font-size: var(--text-lg);
}

#userEmail {
  font-weight: 500;
  color: var(--text-primary);
}

/* ==========================================================================
   8. BUTTONS & INTERACTIVE ELEMENTS
   ========================================================================== */

.btn,
.btn-icon,
.btn-settings,
.btn-logout,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-add,
.btn-save,
.btn-cancel,
.btn-edit,
.btn-delete,
.btn-close,
.btn-action,
.btn-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-family);
}

.btn:disabled,
.btn-icon:disabled,
.btn-settings:disabled,
.btn-logout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary Button */
.btn-primary,
.btn-add,
.btn-save {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.btn-primary:hover,
.btn-add:hover,
.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Secondary Button */
.btn-secondary,
.btn-cancel {
  background: var(--bg-card);
  border-color: var(--border-secondary);
  color: var(--text-primary);
}

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

/* Success Button */
.btn-success {
  background: var(--gradient-secondary);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Danger Button */
.btn-danger,
.btn-delete {
  background: var(--gradient-danger);
  color: white;
}

.btn-danger:hover,
.btn-delete:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Icon Buttons */
.btn-icon,
.btn-settings {
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  width: 44px;
  height: 44px;
  font-size: var(--text-base);
}

.btn-icon:hover,
.btn-settings:hover {
  background: var(--bg-hover);
  color: var(--color-primary);
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

/* Logout Button */
.btn-logout {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: var(--space-sm) var(--space-lg);
  width: auto;
  gap: var(--space-sm);
}

.btn-logout:hover {
  background: rgba(245, 101, 101, 0.1);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

/* Action Buttons */
.btn-action {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  font-weight: 500;
}

.btn-action:hover {
  background: var(--bg-hover);
  color: var(--color-primary);
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.btn-action.debt {
  border-left: 4px solid var(--debt-red);
}

.btn-action.expense {
  border-left: 4px solid var(--warning-orange);
}

/* Print Button */
.btn-print {
  background: var(--gradient-primary);
  color: white;
  border: none;
  box-shadow: var(--shadow-sm);
}

.btn-print:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Close Button */
.btn-close,
.modal-close {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  font-size: var(--text-lg);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
}

.btn-close:hover,
.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-secondary);
}

/* ==========================================================================
   9. VIEW TABS NAVIGATION
   ========================================================================== */

.view-tabs {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-2xl);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: transparent;
  border: none;
  position: relative;
}

.view-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-primary);
  color: var(--text-primary);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 600;
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  justify-content: space-between;
}

.dropdown-btn:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

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

.dropdown-content {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-modal);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 220px;
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
  margin-top: var(--space-xs);
}

.view-dropdown.active .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: var(--space-md) var(--space-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  text-align: left;
  border-radius: var(--radius-md);
  margin: var(--space-xs);
}

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

.tab-btn.active {
  background: var(--color-primary);
  color: white;
  font-weight: 600;
}

.tab-btn i {
  font-size: var(--text-base);
  transition: color var(--transition-fast);
}

/* ==========================================================================
   10. VIEW CONTENT CONTAINERS
   ========================================================================== */

.view-content {
  display: none;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-2xl) var(--space-4xl);
  animation: fadeIn 0.3s ease-in-out;
}

.view-content.active {
  display: block;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* ==========================================================================
   11. STATISTICS OVERVIEW
   ========================================================================== */

.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.stat-card.primary::before {
  background: var(--gradient-primary);
}

.stat-card.secondary::before {
  background: var(--gradient-secondary);
}

.stat-card.success::before {
  background: var(--gradient-secondary);
}

.stat-card.warning::before {
  background: linear-gradient(135deg, var(--color-warning) 0%, #dd6b20 100%);
}

.stat-card.info::before {
  background: var(--gradient-primary);
}

.stat-card i {
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  display: block;
}

.stat-content {
  position: relative;
  z-index: 1;
}

.stat-content h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.stat-values {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.stat-current,
.stat-after {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

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

/* Stat Card Variants */
#totalDebt,
#snowballDebt {
  color: var(--debt-red);
}

#monthlyTotalCurrent,
#monthlyTotalAfter {
  color: var(--color-primary);
}

#debtFreeDateCurrent,
#debtFreeDateAfter {
  color: var(--success-green);
}

#totalInterestCurrent,
#totalInterestAfter {
  color: var(--warning-orange);
}

#moneyLeftOverCurrent,
#moneyLeftOverAfter {
  color: var(--color-info);
}

/* ==========================================================================
   12. INCOME SECTION
   ========================================================================== */

.income-section-container {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.income-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.income-card:hover {
  box-shadow: var(--shadow-md);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-primary);
}

.section-header h2 {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0;
  font-size: var(--text-xl);
  color: var(--text-primary);
}

.section-header i {
  color: var(--color-primary);
  font-size: var(--text-lg);
}

.income-form-modern {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--space-lg);
  align-items: end;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 500;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-input);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: all var(--transition-fast);
  font-family: var(--font-family);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: var(--bg-card);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
  transform: translateY(-1px);
}

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

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-help {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-xs);
  line-height: 1.4;
}

/* ==========================================================================
   13. INCOME TABLE
   ========================================================================== */

#additionalIncomeList {
  margin-top: var(--space-xl);
}

.income-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.income-table th,
.income-table td {
  padding: var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--border-primary);
}

.income-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.income-table td {
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.income-table tr:last-child td {
  border-bottom: none;
}

.income-table tr:hover {
  background: var(--bg-hover);
}

#additionalIncomeTableBody {
  font-size: var(--text-sm);
}

/* ==========================================================================
   14. ACTION BUTTONS SECTION
   ========================================================================== */

.action-buttons {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  justify-content: center;
}

/* ==========================================================================
   15. ITEMS SECTION (DEBTS & EXPENSES)
   ========================================================================== */

.items-section {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.view-toggle {
  display: flex;
  gap: var(--space-xs);
  background: var(--bg-secondary);
  padding: var(--space-xs);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
  font-weight: 500;
}

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

.toggle-btn.active {
  background: var(--bg-card);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.items-list {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

/* ==========================================================================
   16. TIMELINE SECTION
   ========================================================================== */

.timeline-section {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

/* Timeline Legend */
.timeline-legend {
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.timeline-legend::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.timeline-legend h4 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-legend h4::before {
  content: '📊';
  font-size: var(--text-2xl);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.timeline-legend > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  font-size: var(--text-base);
}

.timeline-legend > div > div {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-weight: 600;
  color: var(--text-primary);
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  transition: all var(--transition-fast);
}

.timeline-legend > div > div:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--bg-hover);
}

.timeline-legend .month-block {
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

/* Month Blocks */
.month-block {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--border-primary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  display: inline-block;
}

.month-block.minimum-only {
  background: var(--text-muted);
  opacity: 0.6;
}

.month-block.snowball-active {
  background: var(--success-green);
  box-shadow: 0 0 8px rgba(72, 187, 120, 0.3);
}

.month-block.strikethrough {
  background: var(--debt-red);
  opacity: 0.5;
  position: relative;
}

.month-block.strikethrough::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -2px;
  right: -2px;
  height: 2px;
  background: var(--debt-red);
  transform: rotate(-45deg);
}

/* Debt Timeline Items */
.debt-timeline-item {
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.debt-timeline-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}

.debt-timeline-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

/* Debt Header */
.debt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-primary);
  gap: var(--space-lg);
}

.debt-header h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Person Badge */
.person-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: var(--text-base);
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-base);
}

.person-badge:hover {
  transform: scale(1.1);
}

.person-badge.large {
  width: 48px;
  height: 48px;
  font-size: var(--text-lg);
}

.debt-info {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  flex-shrink: 0;
}

.debt-balance {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--debt-red);
}

.debt-rate {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-info);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(66, 153, 225, 0.1);
  border-radius: var(--radius-md);
}

.paid-off-badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--gradient-secondary);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
}

.btn-paid-off {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-paid-off:hover {
  background: rgba(72, 187, 120, 0.1);
  border-color: var(--success-green);
  color: var(--success-green);
}

.btn-paid-off.active {
  background: var(--gradient-secondary);
  border-color: var(--success-green);
  color: white;
}

/* Payment Accumulation */
.payment-accumulation {
  margin-bottom: var(--space-xl);
}

.payment-summary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-summary:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
}

.payment-summary strong {
  color: var(--text-primary);
  font-size: var(--text-lg);
}

.payment-stack {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-md);
}

.payment-component {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.payment-component.base {
  background: rgba(66, 153, 225, 0.1);
  border: 1px solid var(--color-primary);
}

.payment-component.cascaded {
  background: rgba(72, 187, 120, 0.1);
  border: 1px solid var(--success-green);
}

.payment-component.extra {
  background: rgba(237, 137, 54, 0.1);
  border: 1px solid var(--warning-orange);
}

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

.payment-amount {
  font-weight: 700;
  color: var(--text-primary);
}

/* Timeline Comparison */
.timeline-comparison-section {
  margin-bottom: var(--space-2xl);
}

.timeline-row {
  display: grid;
  grid-template-columns: 180px 1fr 120px;
  gap: var(--space-lg);
  align-items: flex-start;
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
}

.timeline-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  color: var(--text-primary);
  padding-top: var(--space-sm);
}

.timeline-label i {
  font-size: var(--text-base);
}

.timeline-label i.fa-times-circle {
  color: var(--debt-red);
}

.timeline-label i.fa-check-circle {
  color: var(--success-green);
}

.month-blocks-container {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  min-height: 60px;
  align-items: flex-start;
  align-content: flex-start;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1;
  direction: ltr;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.month-blocks-container.baseline {
  background: linear-gradient(135deg, rgba(245, 101, 101, 0.08) 0%, rgba(229, 62, 62, 0.05) 100%);
  border-color: rgba(245, 101, 101, 0.2);
}

.month-blocks-container.snowball {
  background: linear-gradient(135deg, rgba(72, 187, 120, 0.08) 0%, rgba(56, 161, 105, 0.05) 100%);
  border-color: rgba(72, 187, 120, 0.2);
}

.timeline-months {
  text-align: center;
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-primary);
  align-self: center;
  white-space: nowrap;
  min-width: 80px;
}

/* Monthly Progress Squares - Small Timeline Blocks */
.month-block {
  position: relative;
  width: 16px;
  height: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 6px;
  font-weight: 900;
  color: var(--text-secondary);
  overflow: hidden;
  margin: 1px;
}

.month-block:hover {
  transform: scale(1.5);
  box-shadow: var(--shadow-md);
  border-color: var(--border-accent);
  background: var(--bg-hover);
  z-index: 10;
}

.month-block.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  box-shadow: 0 0 6px rgba(66, 153, 225, 0.6);
  transform: scale(1.4);
  z-index: 5;
  font-weight: 900;
}

.month-block.completed {
  background: var(--success-green);
  color: white;
  border-color: var(--success-green);
}

.month-block.debt-paid {
  background: var(--warning-orange);
  color: white;
  border-color: var(--warning-orange);
  position: relative;
}

.month-block.debt-paid::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 900;
  color: white;
}

.month-number {
  font-size: 6px;
  font-weight: 900;
  line-height: 1;
}

.month-info {
  display: none;
}

.month-payment {
  display: none;
}

.month-balance {
  display: none;
}

/* Month Detail Tooltip */
.month-detail {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-modal);
  border: 2px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  min-width: 220px;
  max-width: 300px;
  z-index: var(--z-tooltip);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.month-block:hover .month-detail {
  opacity: 1;
  visibility: visible;
  bottom: 40px;
}

.month-detail::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--border-accent);
}

.month-detail::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-modal);
  margin-top: -1px;
}

.month-detail h4 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 var(--space-md);
  text-align: center;
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-primary);
}

.month-detail .detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  padding: var(--space-xs) 0;
}

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

.debt-payoff-highlight {
  color: var(--success-green);
  font-weight: 700;
  background: rgba(72, 187, 120, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(72, 187, 120, 0.2);
}

.month-detail .detail-icon {
  color: var(--color-primary);
  margin-right: var(--space-xs);
  font-size: var(--text-xs);
}

/* Time Saved Banner */
.time-saved-banner {
  background: rgba(72, 187, 120, 0.1);
  color: var(--success-green);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  border: 1px solid rgba(72, 187, 120, 0.3);
  font-size: var(--text-sm);
}

.time-saved-banner i {
  font-size: var(--text-xl);
  color: #ffd700;
}

.time-saved-banner strong {
  font-size: var(--text-lg);
}

.time-saved-banner span {
  opacity: 0.9;
  font-weight: 500;
}

/* Payment Cascade */
.payment-cascade {
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
  text-align: center;
}

.cascade-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  color: var(--text-primary);
  font-weight: 500;
}

.cascade-content i {
  color: var(--color-primary);
  font-size: var(--text-lg);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.cascade-content strong {
  color: var(--color-primary);
}

/* Responsive Design for Timeline */
@media (max-width: 1024px) {
  .timeline-row {
    grid-template-columns: 140px 1fr 100px;
    gap: var(--space-md);
  }
  
  .debt-header {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }
  
  .debt-info {
    gap: var(--space-md);
  }
  
  .month-blocks-container {
    max-height: 150px;
  }
}

@media (max-width: 768px) {
  .timeline-row {
    grid-template-columns: 120px 1fr 80px;
    text-align: left;
    gap: var(--space-sm);
    padding: var(--space-md);
  }
  
  .timeline-label {
    justify-content: flex-start;
    font-size: var(--text-sm);
    padding-top: var(--space-xs);
  }
  
  .month-blocks-container {
    justify-content: flex-start;
    padding: var(--space-sm);
    max-height: 120px;
  }
  
  .timeline-months {
    font-size: var(--text-base);
    padding: var(--space-sm);
  }
  
  .debt-header {
    text-align: left;
  }
  
  .debt-info {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .payment-summary {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
  
  .cascade-content {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .timeline-legend > div {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .comparison-header {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg);
  }
  
  .comparison-label {
    font-size: var(--text-base);
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .timeline-row {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-sm);
  }
  
  .timeline-label {
    justify-content: center;
  }
  
  .month-blocks-container {
    justify-content: center;
    max-height: 100px;
  }
}

@media (max-width: 480px) {
  .debt-timeline-item {
    padding: var(--space-lg);
  }
  
  .debt-header h3 {
    font-size: var(--text-lg);
  }
  
  .timeline-months {
    font-size: var(--text-base);
  }
  
  .time-saved-banner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }
}

.timeline-toggle-container {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-secondary);
  transition: var(--transition-base);
  border-radius: var(--radius-full);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: var(--transition-base);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

input:checked + .toggle-slider {
  background-color: var(--color-primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.timeline-toggle-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Extra Payment Calculator */
.extra-payment-calculator {
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-md);
}

.calculator-input {
  margin-bottom: var(--space-xl);
}

.calculator-input label {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.calculator-input label i {
  color: var(--success-green);
  font-size: var(--text-xl);
}

.input-group {
  display: flex;
  gap: var(--space-lg);
  align-items: stretch;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

#extraPaymentInputGroup {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

#extraPaymentInput {
  flex: 1;
  max-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 600;
  text-align: center;
}

#extraPaymentInput:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.input-group button {
  background: var(--gradient-primary);
  border: none;
  color: white;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.input-group button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.savings-summary {
  background: var(--gradient-card);
  border: 2px solid var(--success-green);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-top: var(--space-xl);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.savings-summary-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--border-primary);
}

.savings-summary-header h4 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.savings-summary-header .extra-amount {
  color: var(--success-green);
  font-weight: 900;
  text-shadow: 0 0 10px rgba(72, 187, 120, 0.3);
}

.savings-summary-header h4 i {
  color: var(--success-green);
  font-size: var(--text-3xl);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.savings-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}

.savings-metric {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.savings-metric:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}

.savings-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.savings-metric.months-saved::before {
  background: var(--gradient-secondary);
}

.savings-metric.interest-saved::before {
  background: var(--gradient-danger);
}

.savings-metric.total-months::before {
  background: linear-gradient(135deg, var(--color-info) 0%, var(--color-primary) 100%);
}

.metric-value {
  font-size: var(--text-4xl);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.metric-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.metric-icon {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-size: var(--text-2xl);
  color: var(--text-muted);
  opacity: 0.3;
}

.savings-metric.months-saved .metric-value {
  color: var(--success-green);
}

.savings-metric.interest-saved .metric-value {
  color: var(--debt-red);
}

.savings-metric.total-months .metric-value {
  color: var(--color-info);
}

.savings-impact {
  background: var(--gradient-secondary);
  color: white;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin-top: var(--space-xl);
  text-align: center;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.savings-impact strong {
  font-size: var(--text-lg);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Additional Savings Summary Responsive */
@media (max-width: 768px) {
  .savings-metrics {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .metric-value {
    font-size: var(--text-3xl);
  }
  
  .savings-summary {
    padding: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .savings-metrics {
    gap: var(--space-md);
  }
  
  .savings-metric {
    padding: var(--space-lg);
  }
  
  .metric-value {
    font-size: var(--text-2xl);
  }
  
  .savings-summary-header h4 {
    font-size: var(--text-xl);
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* Timeline Comparison Headers */
.timeline-comparison {
  margin-bottom: var(--space-lg);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
}

.comparison-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.comparison-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  font-size: var(--text-lg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.comparison-label::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  transition: all var(--transition-fast);
}

.comparison-label.baseline {
  background: linear-gradient(135deg, rgba(245, 101, 101, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
  color: var(--debt-red);
  border-color: rgba(245, 101, 101, 0.2);
}

.comparison-label.baseline::before {
  background: var(--gradient-danger);
}

.comparison-label.baseline i {
  color: var(--debt-red);
  font-size: var(--text-xl);
  text-shadow: 0 0 10px rgba(245, 101, 101, 0.3);
}

.comparison-label.snowball {
  background: linear-gradient(135deg, rgba(72, 187, 120, 0.1) 0%, rgba(56, 161, 105, 0.05) 100%);
  color: var(--success-green);
  border-color: rgba(72, 187, 120, 0.2);
}

.comparison-label.snowball::before {
  background: var(--gradient-secondary);
}

.comparison-label.snowball i {
  color: var(--success-green);
  font-size: var(--text-xl);
  text-shadow: 0 0 10px rgba(72, 187, 120, 0.3);
}

.comparison-label:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.comparison-label.baseline:hover {
  border-color: var(--debt-red);
  background: linear-gradient(135deg, rgba(245, 101, 101, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
}

.comparison-label.snowball:hover {
  border-color: var(--success-green);
  background: linear-gradient(135deg, rgba(72, 187, 120, 0.15) 0%, rgba(56, 161, 105, 0.08) 100%);
}

.snowball-timeline {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  min-height: 300px;
}

/* ==========================================================================
   17. PAYMENT PLAN SECTION
   ========================================================================== */

.payment-plan-section {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.payment-plan {
  margin-bottom: var(--space-2xl);
}

/* Plan Header */
.plan-header {
  text-align: center;
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.plan-header::before {
  content: '🎯';
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-size: var(--text-3xl);
  opacity: 0.3;
}

.plan-header h3 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.plan-header p {
  font-size: var(--text-lg);
  opacity: 0.95;
  margin: 0;
}

.plan-header strong {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Payment Schedule */
.payment-schedule {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.payment-schedule h4 {
  background: var(--bg-card);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.payment-schedule h4:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.payment-schedule h4 i:first-child {
  color: var(--color-primary);
}

.payment-items {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.payment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.payment-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-accent);
}

.payment-item.focus-debt {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.payment-item.focus-debt::before {
  content: '⭐';
  position: absolute;
  left: var(--space-sm);
  top: var(--space-sm);
  font-size: var(--text-lg);
}

.payment-details {
  flex: 1;
}

.debt-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.debt-name i {
  color: var(--color-primary);
}

.payment-info {
  display: flex;
  gap: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.balance {
  font-weight: 600;
  color: var(--debt-red);
}

.due-date {
  color: var(--text-muted);
}

.payment-amount {
  text-align: right;
}

.amount-breakdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-xs);
}

.amount-breakdown > span {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.amount-breakdown .extra {
  font-size: var(--text-sm);
  color: var(--success-green);
  font-weight: 600;
}

.payment-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  margin-top: var(--space-lg);
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: var(--text-lg);
  box-shadow: var(--shadow-md);
}

.payment-total .total {
  font-size: var(--text-xl);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Action Steps */
.action-steps {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.action-steps h4 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.action-steps h4 i {
  color: var(--color-primary);
  font-size: var(--text-xl);
}

.action-steps ol {
  list-style: none;
  counter-reset: step-counter;
  margin: 0;
  padding: 0;
}

.action-steps li {
  counter-increment: step-counter;
  position: relative;
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding-left: var(--space-4xl);
  transition: all var(--transition-fast);
  line-height: 1.6;
  color: var(--text-primary);
}

.action-steps li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-accent);
}

.action-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  box-shadow: var(--shadow-sm);
}

.action-steps strong {
  color: var(--color-primary);
  font-weight: 700;
}

/* Motivation Section */
.motivation-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.progress-overview {
  margin-bottom: var(--space-xl);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-primary);
}

.progress-header h4 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0;
}

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

.toggle-container {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.toggle-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Debt Payoff Progress - Clean Card Layout */
.milestones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
  padding: 0;
  background: transparent;
  border: none;
  max-width: 100%;
  position: relative;
}

.milestone {
  background: var(--gradient-card);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-xl);
  width: auto;
  height: auto;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: block;
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
}

.milestone:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-accent);
}

.milestone.current {
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(66, 153, 225, 0.3), var(--shadow-lg);
}

.milestone.current::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.milestone.completed {
  border-color: var(--success-green);
  opacity: 0.7;
}

.milestone.completed::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.milestone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-primary);
}

.milestone-month {
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: var(--text-sm);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.milestone-debt {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.milestone-details {
  display: grid;
  gap: var(--space-sm);
}

.milestone-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) 0;
}

.milestone-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.milestone-value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.milestone-balance {
  color: var(--debt-red);
  font-weight: 700;
}

.milestone-payment {
  color: var(--color-primary);
  font-weight: 700;
}

.milestone-freedom {
  color: var(--success-green);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.milestone-freedom i {
  font-size: var(--text-xs);
}\n\n/* Progress Header */\n.progress-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: var(--space-xl);\n  padding: var(--space-lg);\n  background: var(--gradient-card);\n  border: 1px solid var(--border-primary);\n  border-radius: var(--radius-xl);\n  box-shadow: var(--shadow-sm);\n}\n\n.progress-header h4 {\n  margin: 0;\n  font-size: var(--text-xl);\n  font-weight: 700;\n  color: var(--text-primary);\n  display: flex;\n  align-items: center;\n  gap: var(--space-md);\n}\n\n.progress-header h4 i {\n  color: var(--color-primary);\n  font-size: var(--text-2xl);\n}\n\n.toggle-container {\n  display: flex;\n  align-items: center;\n  gap: var(--space-md);\n  background: var(--bg-secondary);\n  padding: var(--space-sm) var(--space-lg);\n  border-radius: var(--radius-lg);\n  border: 1px solid var(--border-primary);\n}\n\n.toggle-label {\n  font-size: var(--text-sm);\n  color: var(--text-secondary);\n  font-weight: 500;\n  white-space: nowrap;\n}\n\n.milestone-detail h5 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 var(--space-md);
  text-align: center;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border-primary);
}

.milestone-detail .detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  padding: var(--space-xs) 0;
}

.milestone-detail .detail-value {
  color: var(--text-primary);
  font-weight: 700;
  font-size: var(--text-base);
}

.milestone-detail .detail-icon {
  color: var(--color-primary);
  margin-right: var(--space-sm);
  font-size: var(--text-sm);
}




.milestone-freedom {
  background: var(--gradient-secondary);
  color: white;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  margin-top: var(--space-sm);
  grid-column: 1 / -1;
}

/* Cash Flow Section */
.cash-flow-section {
  margin-top: var(--space-2xl);
}

.cash-flow-section h3 {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  font-size: var(--text-xl);
  color: var(--text-primary);
}

.cash-flow-section h3 i {
  color: var(--color-primary);
}

.cash-flow-chart-container {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: var(--text-lg);
}

#cashFlowChart {
  width: 100%;
  height: 100%;
}

/* Responsive Design for Payment Plan */
@media (max-width: 768px) {
  .payment-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    text-align: left;
  }
  
  .payment-amount {
    text-align: left;
    width: 100%;
  }
  
  .amount-breakdown {
    align-items: flex-start;
  }
  
  .progress-header {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }
  
  .milestone-details {
    grid-template-columns: 1fr;
    text-align: left;
  }
  
  .milestone-payment {
    text-align: left;
  }
  
  .action-steps li {
    padding-left: var(--space-3xl);
  }
  
  .action-steps li::before {
    left: var(--space-md);
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .plan-header {
    padding: var(--space-lg);
  }
  
  .plan-header h3 {
    font-size: var(--text-xl);
  }
  
  .payment-schedule,
  .action-steps,
  .motivation-section {
    padding: var(--space-lg);
  }
  
  .milestone-header {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
  }
  
  .milestone-debt {
    text-align: left;
  }
}

/* ==========================================================================
   18. ASSETS VIEW
   ========================================================================== */

.assets-overview {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.assets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.assets-header h2 {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0;
}

.assets-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
}

.summary-card {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.summary-card h3 {
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
  opacity: 0.8;
  transition: opacity var(--transition-base);
}

.summary-card:hover .card-icon {
  opacity: 1;
}

.summary-card:nth-child(1) .card-icon {
  color: var(--color-success);
}

.summary-card:nth-child(2) .card-icon {
  color: var(--color-primary);
}

.summary-card:nth-child(3) .card-icon {
  color: var(--color-warning);
}

.summary-card:nth-child(4) .card-icon {
  color: var(--color-info);
}

.summary-card:nth-child(5) .card-icon {
  color: var(--color-success);
}

.asset-total-value,
.asset-count,
.debt-impact,
.time-saved,
.cash-flow {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.asset-total-value {
  color: var(--color-success);
}

.asset-count {
  color: var(--color-primary);
}

.debt-impact {
  color: var(--color-warning);
}

.time-saved {
  color: var(--color-info);
}

.cash-flow {
  color: var(--color-success);
}

.summary-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}

/* Individual card styling */
.summary-card:nth-child(1)::before {
  background: var(--color-success);
}

.summary-card:nth-child(2)::before {
  background: var(--color-primary);
}

.summary-card:nth-child(3)::before {
  background: var(--color-warning);
}

.summary-card:nth-child(4)::before {
  background: var(--color-info);
}

.summary-card:nth-child(5)::before {
  background: var(--color-success);
}

.assets-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-2xl);
  padding: var(--space-2xl) 0;
}

/* Asset Cards - Premium Design */
.asset-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-2xl);
  padding: 0;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

[data-theme="dark"] .asset-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
  border-color: var(--border-primary);
  box-shadow: var(--shadow-lg);
}

.asset-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
  border-color: #3b82f6;
}

[data-theme="dark"] .asset-card:hover {
  box-shadow: var(--shadow-xl);
  border-color: var(--border-accent);
}

.asset-card-image {
  height: 120px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.asset-card.vehicle .asset-card-image {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.asset-card.tools .asset-card-image {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.asset-card.electronics .asset-card-image {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.asset-card.furniture .asset-card-image {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.asset-card.jewelry .asset-card-image {
  background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
}

.asset-card.collectibles .asset-card-image {
  background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
}

.asset-icon {
  font-size: var(--text-5xl);
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  opacity: 0.9;
}

.asset-content {
  padding: var(--space-xl);
}

.asset-header {
  margin-bottom: var(--space-lg);
}

.asset-name {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #1a202c;
  margin: 0 0 var(--space-sm);
  line-height: 1.2;
}

[data-theme="dark"] .asset-name {
  color: var(--text-primary);
}

.asset-category {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: #f1f5f9;
  color: #475569;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .asset-category {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.asset-category i {
  font-size: var(--text-sm);
  color: #3b82f6;
}

.asset-price-section {
  margin: var(--space-lg) 0;
  text-align: center;
  padding: var(--space-lg);
  background: #f8fafc;
  border-radius: var(--radius-xl);
  border: 1px solid #e2e8f0;
}

[data-theme="dark"] .asset-price-section {
  background: var(--bg-secondary);
  border-color: var(--border-primary);
}

.asset-price-label {
  font-size: var(--text-sm);
  color: #64748b;
  margin-bottom: var(--space-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .asset-price-label {
  color: var(--text-secondary);
}

.asset-price {
  font-size: var(--text-4xl);
  font-weight: 900;
  color: #059669;
  margin: 0;
  line-height: 1;
}

[data-theme="dark"] .asset-price {
  color: var(--success-green);
}

.asset-description {
  color: #64748b;
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius-lg);
  border-left: 4px solid #3b82f6;
}

[data-theme="dark"] .asset-description {
  color: var(--text-secondary);
  background: var(--bg-tertiary);
}

.asset-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
}

.asset-status.listed {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.asset-status.not-listed {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fed7aa;
}

[data-theme="dark"] .asset-status.listed {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success-green);
  border-color: rgba(34, 197, 94, 0.2);
}

[data-theme="dark"] .asset-status.not-listed {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.2);
}

.asset-status i {
  font-size: var(--text-base);
}

.asset-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid #e2e8f0;
}

[data-theme="dark"] .asset-actions {
  border-top-color: var(--border-primary);
}

.asset-btn {
  flex: 1;
  background: white;
  border: 2px solid #e2e8f0;
  color: #475569;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .asset-btn {
  background: var(--bg-secondary);
  border-color: var(--border-primary);
  color: var(--text-secondary);
}

.asset-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.asset-btn.edit {
  border-color: #3b82f6;
  color: #3b82f6;
}

.asset-btn.edit:hover {
  background: #3b82f6;
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.asset-btn.delete {
  border-color: #ef4444;
  color: #ef4444;
}

.asset-btn.delete:hover {
  background: #ef4444;
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .asset-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
  color: var(--text-primary);
}

/* Empty State */
.assets-empty {
  text-align: center;
  padding: var(--space-4xl);
  background: #f8fafc;
  border-radius: var(--radius-2xl);
  border: 2px dashed #cbd5e0;
}

[data-theme="dark"] .assets-empty {
  background: var(--bg-tertiary);
  border-color: var(--border-primary);
}

.assets-empty i {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-lg);
  color: #94a3b8;
}

.assets-empty h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
  color: #475569;
  font-weight: 700;
}

[data-theme="dark"] .assets-empty h3 {
  color: var(--text-secondary);
}

.assets-empty p {
  font-size: var(--text-base);
  margin-bottom: var(--space-xl);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  color: #64748b;
}

[data-theme="dark"] .assets-empty p {
  color: var(--text-muted);
}

/* ==========================================================================
   19. SCENARIOS VIEW
   ========================================================================== */

.scenarios-overview {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.scenarios-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.scenarios-header h2 {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0;
}

.scenarios-intro {
  background: var(--bg-tertiary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  color: var(--text-secondary);
  line-height: 1.6;
  border: 1px solid var(--border-primary);
}

.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-xl);
  padding: var(--space-lg) 0;
}

/* Scenario Cards */
.scenario-card {
  background: var(--gradient-card);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.scenario-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-accent);
}

.scenario-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.scenario-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.scenario-info {
  flex: 1;
}

.scenario-name {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-xs);
  line-height: 1.2;
}

.scenario-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1px solid var(--border-primary);
}

.scenario-badge i {
  font-size: var(--text-xs);
  color: var(--color-primary);
}

.scenario-value {
  text-align: right;
  flex-shrink: 0;
}

.scenario-total {
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--success-green);
  margin: 0;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scenario-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
  font-style: italic;
}

.scenario-steps {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-primary);
}

.scenario-steps-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.scenario-steps-count {
  background: var(--color-primary);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 700;
}

.scenario-step-preview {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.4;
}

.scenario-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-primary);
}

.scenario-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 500;
}

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

.scenario-btn.primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.scenario-btn.primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.scenario-btn.edit {
  color: var(--color-primary);
}

.scenario-btn.delete {
  color: var(--debt-red);
}

.scenario-btn.edit:hover {
  background: rgba(66, 153, 225, 0.1);
  border-color: var(--color-primary);
}

.scenario-btn.delete:hover {
  background: rgba(245, 101, 101, 0.1);
  border-color: var(--debt-red);
}

/* Empty State */
.scenarios-empty {
  text-align: center;
  padding: var(--space-4xl);
  color: var(--text-muted);
}

.scenarios-empty i {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-lg);
  opacity: 0.3;
}

.scenarios-empty h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.scenarios-empty p {
  font-size: var(--text-base);
  margin-bottom: var(--space-xl);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ==========================================================================
   20. MODAL SYSTEM
   ========================================================================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--gradient-modal);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideInUp 0.3s ease-out;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.modal-wide {
  max-width: 900px;
}

@keyframes slideInUp {
  from {
    transform: translateY(50px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: var(--space-2xl);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.modal-header h2 {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0;
  font-size: var(--text-xl);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-2xl);
}

.modal-content form {
  padding: var(--space-2xl);
}

.modal-actions {
  display: flex;
  gap: var(--space-lg);
  justify-content: flex-end;
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-primary);
}

/* Specific Modal Styles */

/* Debt Modal */
#debtModal .modal-content {
  max-width: 500px;
}

/* Expense Modal */
#expenseModal .modal-content {
  max-width: 500px;
}

/* Invitations Modal */
#invitationsModal .modal-content {
  max-width: 700px;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
  margin: 0;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.tab-button {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: var(--space-lg) var(--space-2xl);
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  border-radius: 0;
  flex: 1;
}

.tab-button:first-child {
  border-radius: var(--radius-2xl) 0 0 0;
}

.tab-button:last-child {
  border-radius: 0 var(--radius-2xl) 0 0;
}

.tab-button:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.tab-button.active {
  color: var(--color-primary);
  background: var(--bg-card);
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
}

.tab-content {
  display: none;
  padding: var(--space-xl);
}

.tab-content.active {
  display: block;
}

/* Invitation specific styles */
.invitation-section {
  margin-bottom: var(--space-2xl);
}

.invitation-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.invitation-result {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin-top: var(--space-lg);
  font-weight: 500;
  border: 1px solid;
}

.invitation-result.success {
  background: rgba(72, 187, 120, 0.1);
  color: var(--color-success);
  border-color: var(--color-success);
}

.invitation-result.error {
  background: rgba(245, 101, 101, 0.1);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.active-invitations {
  margin-top: var(--space-2xl);
}

.active-invitations h4 {
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.invitations-list {
  display: grid;
  gap: var(--space-lg);
}

/* Additional Income Modal */
#additionalIncomeModal .modal-content {
  max-width: 500px;
}

/* Asset Modal */
#assetModal .modal-content {
  max-width: 500px;
}

/* Scenario Modal */
#scenarioModal .modal-content {
  max-width: 800px;
}

.scenario-steps {
  margin-top: var(--space-xl);
}

.scenario-step {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.step-number {
  background: var(--gradient-primary);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--text-sm);
}

.step-action {
  font-weight: 500;
}

.step-value {
  max-width: 150px;
}

.step-notes {
  margin-top: var(--space-md);
}

/* ==========================================================================
   21. SETTINGS MODAL
   ========================================================================== */

#settingsModal .modal-content {
  max-width: 600px;
}

.settings-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
  margin: 0;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.settings-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: var(--space-lg) var(--space-2xl);
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  border-radius: 0;
  flex: 1;
}

.settings-tab:first-child {
  border-radius: var(--radius-2xl) 0 0 0;
}

.settings-tab:last-child {
  border-radius: 0 var(--radius-2xl) 0 0;
}

.settings-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.settings-tab.active {
  color: var(--color-primary);
  background: var(--bg-card);
}

.settings-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
}

.settings-content {
  padding: var(--space-2xl);
}

.settings-section {
  margin-bottom: var(--space-2xl);
}

.settings-section h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.settings-tab-content {
  display: none;
}

.settings-tab-content.active {
  display: block;
}

/* Theme Selector */
.theme-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.theme-option {
  padding: var(--space-xl);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  background: var(--bg-tertiary);
}

.theme-option:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.theme-option.active {
  border-color: var(--color-primary);
  background: rgba(66, 153, 225, 0.1);
  box-shadow: var(--shadow-glow);
}

.theme-option i {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
  display: block;
  color: var(--color-primary);
}

.theme-option span {
  font-weight: 600;
  color: var(--text-primary);
}

.settings-actions {
  display: flex;
  gap: var(--space-lg);
  justify-content: flex-end;
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-primary);
}

/* Account Form */
#accountForm {
  margin: 0;
}

#settingsName,
#settingsEmail {
  background: var(--bg-input);
  border: 2px solid var(--border-primary);
}

#settingsEmail {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Password Form */
#passwordForm {
  margin: 0;
}

#currentPassword,
#newPassword,
#confirmPassword {
  background: var(--bg-input);
  border: 2px solid var(--border-primary);
}

.password-requirements {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
  line-height: 1.4;
}

/* ==========================================================================
   22. CHECKBOX STYLES
   ========================================================================== */

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

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

#includeInSnowball,
#allocateToDebt,
#assetListed {
  margin: 0;
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   23. RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
  .header-content {
    padding: var(--space-md) var(--space-xl);
  }
  
  .view-content {
    padding: 0 var(--space-xl) var(--space-3xl);
  }
  
  .stats-overview {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
  }
  
  .timeline-comparison {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .income-form-modern {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .assets-summary {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .theme-selector {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: var(--space-md) var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
  }
  
  .user-info {
    display: none;
  }
  
  .view-tabs {
    padding: var(--space-sm) var(--space-md);
    justify-content: center;
  }
  
  .dropdown-btn {
    min-width: 180px;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
  }
  
  .view-content {
    padding: 0 var(--space-lg) var(--space-2xl);
  }
  
  .stats-overview {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  .modal-header {
    padding: var(--space-lg);
  }
  
  .modal-body,
  .modal-content form {
    padding: var(--space-lg);
  }
  
  .settings-tabs {
    flex-direction: column;
  }
  
  .settings-tab {
    border-radius: 0 !important;
    text-align: center;
  }
  
  .assets-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  
  .tabs {
    flex-direction: column;
  }
  
  .tab-button {
    border-radius: 0 !important;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header-content {
    padding: var(--space-sm) var(--space-md);
  }
  
  .logo {
    font-size: var(--text-lg);
  }
  
  .view-tabs {
    padding: var(--space-xs) var(--space-sm);
    justify-content: center;
  }
  
  .dropdown-btn {
    min-width: 160px;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
  }
  
  .dropdown-content {
    min-width: 180px;
  }
  
  .month-block {
    width: 14px;
    height: 14px;
    font-size: 5px;
    margin: 0.5px;
  }
  
  .milestones {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .milestone {
    padding: var(--space-lg);
  }
  
  .assets-list {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    padding: var(--space-lg) 0;
  }
  
  .asset-content {
    padding: var(--space-lg);
  }
  
  .asset-price {
    font-size: var(--text-3xl);
  }
  
  .asset-name {
    font-size: var(--text-xl);
  }
  
  .asset-actions {
    flex-direction: column;
  }
  
  .asset-btn {
    padding: var(--space-sm);
  }
  
  .scenarios-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .scenario-card {
    padding: var(--space-lg);
  }
  
  .scenario-total {
    font-size: var(--text-2xl);
  }
  
  .month-detail {
    min-width: 180px;
    font-size: var(--text-xs);
    bottom: 30px;
  }
  
  .extra-payment-calculator {
    padding: var(--space-lg);
  }
  
  .input-group {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
  }
  
  .view-content {
    padding: 0 var(--space-md) var(--space-xl);
  }
  
  .income-section-container,
  .items-section,
  .timeline-section,
  .payment-plan-section,
  .assets-overview,
  .scenarios-overview {
    padding: var(--space-lg);
  }
  
  .stat-card {
    padding: var(--space-lg);
  }
  
  .auth-box {
    padding: var(--space-2xl);
  }
  
  .assets-summary {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  
  .summary-card {
    padding: var(--space-lg);
    min-height: 120px;
  }
  
  .modal-header h2 {
    font-size: var(--text-lg);
  }
}

/* ==========================================================================
   24. UTILITY CLASSES
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.hidden { display: none !important; }
.block { display: block !important; }
.flex { display: flex !important; }
.grid { display: grid !important; }

/* ==========================================================================
   25. LOADING STATES & ANIMATIONS
   ========================================================================== */

.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-primary);
  border-radius: 50%;
  border-top-color: var(--color-primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   26. PRINT STYLES
   ========================================================================== */

@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .app-header,
  .view-tabs,
  .action-buttons,
  .btn-add,
  .btn-icon,
  .btn-action,
  .btn-print,
  .modal,
  .user-menu {
    display: none !important;
  }
  
  .main-container {
    background: white !important;
  }
  
  .stat-card,
  .income-section-container,
  .items-section,
  .timeline-section,
  .payment-plan-section {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  
  .view-content {
    padding: 0 !important;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: black !important;
  }
}

/* ==========================================================================
   27. ACCESSIBILITY & REDUCED MOTION
   ========================================================================== */

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

@media (prefers-contrast: high) {
  :root {
    --border-primary: #666;
    --border-secondary: #999;
  }
  
  [data-theme="light"] {
    --border-primary: #333;
    --border-secondary: #666;
  }
}

/* ==========================================================================
   28. FINANCIAL OBLIGATIONS ITEMS (DEBT & EXPENSE CARDS)
   ========================================================================== */

/* Main item card container */
.item-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}

/* Add accent border for different item types */
.item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

/* Different colors for debt vs expense */
.item-card:has(.item-type:contains("Credit Card"))::before,
.item-card:has(.item-type:contains("Loan"))::before,
.item-card:has(.item-type:contains("Mortgage"))::before {
  background: var(--gradient-danger);
}

.item-card:has(.item-type:contains("Utilities"))::before,
.item-card:has(.item-type:contains("Entertainment"))::before,
.item-card:has(.item-type:contains("Food"))::before,
.item-card:has(.item-type:contains("Gas"))::before {
  background: linear-gradient(135deg, var(--color-warning) 0%, #dd6b20 100%);
}

/* Item info section */
.item-info {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  min-height: 60px;
}

/* Item name styling */
.item-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

/* Item type/category styling */
.item-type {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: capitalize;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Excluded from snowball badge */
.item-type span {
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--border-secondary) !important;
  color: var(--text-muted) !important;
  padding: var(--space-xs) var(--space-sm) !important;
  border-radius: var(--radius-md) !important;
  font-size: var(--text-xs) !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

/* Item amount (balance/expense amount) */
.item-amount {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--debt-red);
  text-align: center;
}

/* Make expense amounts different color */
.item-card:has(.item-type:contains("Utilities")) .item-amount,
.item-card:has(.item-type:contains("Entertainment")) .item-amount,
.item-card:has(.item-type:contains("Food")) .item-amount,
.item-card:has(.item-type:contains("Gas")) .item-amount {
  color: var(--warning-orange);
}

/* Item payment styling */
.item-payment {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

/* Extra payment styling */
.item-payment span {
  color: var(--success-green) !important;
  font-weight: 700 !important;
  display: block !important;
  margin-top: var(--space-xs) !important;
}

/* Interest rate styling */
.item-interest {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-info);
  text-align: center;
}

/* Due date and other secondary info */
.item-info > div:last-child {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

/* Item actions section */
.item-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.item-actions .btn-edit {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.item-actions .btn-edit:hover {
  background: rgba(66, 153, 225, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.item-actions .btn-delete {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.item-actions .btn-delete:hover {
  background: rgba(245, 101, 101, 0.1);
  border-color: var(--color-danger);
  color: var(--color-danger);
  transform: translateY(-1px);
}

/* Responsive design for item cards */
@media (max-width: 1024px) {
  .item-info {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-md);
  }
  
  .item-info > div:nth-child(4),
  .item-info > div:nth-child(5) {
    display: none;
  }
}

@media (max-width: 768px) {
  .item-card {
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-lg);
  }
  
  .item-info {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    text-align: center;
  }
  
  .item-info > div:nth-child(4),
  .item-info > div:nth-child(5) {
    display: block;
  }
  
  .item-actions {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-lg);
  }
  
  .item-name {
    font-size: var(--text-xl);
  }
  
  .item-amount {
    font-size: var(--text-2xl);
  }
}

@media (max-width: 480px) {
  .item-card {
    padding: var(--space-md);
  }
  
  .item-info {
    gap: var(--space-xs);
  }
  
  .item-name {
    font-size: var(--text-lg);
    margin-bottom: var(--space-xs);
  }
  
  .item-amount {
    font-size: var(--text-xl);
    margin: var(--space-sm) 0;
  }
}

/* Special styling for specific debt types */
.item-card:has(.item-name:contains("Mortgage")) {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(72, 187, 120, 0.05) 100%);
}

.item-card:has(.item-name:contains("Mortgage"))::before {
  background: var(--gradient-secondary);
}

.item-card:has(.item-name:contains("Mortgage")) .item-amount {
  color: var(--success-green);
}

/* Credit card specific styling */
.item-card:has(.item-type:contains("Credit Card")) {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 101, 101, 0.03) 100%);
}

/* Loan specific styling */
.item-card:has(.item-type:contains("Loan")) {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(66, 153, 225, 0.03) 100%);
}

.item-card:has(.item-type:contains("Loan")) .item-amount {
  color: var(--color-primary);
}

/* Expense specific styling */
.item-card:has(.item-type:contains("Utilities")),
.item-card:has(.item-type:contains("Entertainment")),
.item-card:has(.item-type:contains("Food")),
.item-card:has(.item-type:contains("Gas")) {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(237, 137, 54, 0.03) 100%);
}

/* Empty state styling */
.items-list p {
  text-align: center;
  color: var(--text-secondary);
  padding: var(--space-3xl);
  font-size: var(--text-lg);
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-secondary);
  border-radius: var(--radius-xl);
  margin: var(--space-xl) 0;
}

/* ==========================================================================
   29. SPECIAL ELEMENT STYLES (Complete Coverage)
   ========================================================================== */

/* Ensure every element from index.html has styling */

/* Tab content containers */
#snowballView,
#assetsView,
#scenariosView {
  min-height: 50vh;
}

/* All input IDs from the HTML */
#name,
#email,
#password,
#authSubmit,
#incomeAmount,
#incomeFrequency,
#debtName,
#debtType,
#debtBalance,
#debtMinPayment,
#debtInterestRate,
#debtDueDate,
#expenseName,
#expenseCategory,
#expenseAmount,
#expenseFrequency,
#inviteEmail,
#acceptCode,
#additionalIncomeName,
#additionalIncomeAmount,
#additionalIncomeFrequency,
#assetName,
#assetValue,
#assetCategory,
#assetDescription,
#scenarioName,
#scenarioDescription,
#settingsName,
#settingsEmail,
#currentPassword,
#newPassword,
#confirmPassword,
#extraPaymentInput {
  font-family: var(--font-family);
}

/* All specific divs and containers */
#authContainer,
#mainContainer,
#userEmail,
#totalDebt,
#snowballDebt,
#monthlyTotalCurrent,
#monthlyTotalAfter,
#debtFreeDateCurrent,
#debtFreeDateAfter,
#totalInterestCurrent,
#totalInterestAfter,
#moneyLeftOverCurrent,
#moneyLeftOverAfter,
#itemsList,
#snowballTimeline,
#paymentPlan,
#cashFlowChart,
#assetsList,
#totalAssetValue,
#assetCount,
#debtImpact,
#timeSaved,
#monthlyCashFlow,
#scenariosGrid,
#additionalIncomeTableBody,
#hideTimelinePaidOffToggle,
#extraPaymentToggle,
#extraPaymentInputGroup,
#savingsSummary,
#paymentPlanSection,
#invitationResult,
#activeInvitationsList,
#pendingInvitationsList,
#sharedAccountsList {
  transition: all var(--transition-base);
}

/* Form elements styling completion */
form {
  margin: 0;
}

select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Canvas element */
canvas {
  max-width: 100%;
  height: auto;
}

/* Table styling completion */
table {
  border-spacing: 0;
}

thead tr {
  background: var(--bg-tertiary);
}

tbody tr:hover {
  background: var(--bg-hover);
}

/* Small text elements */
small {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Strike through text */
strike {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Ensure all interactive elements have proper cursor */
button,
[onclick],
.toggle-btn,
.tab-btn,
.theme-option,
.checkbox-label,
.modal-close,
.btn-close {
  cursor: pointer;
}

/* Disabled state for all interactive elements */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Focus states for all focusable elements */
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Hover states for all hoverable elements */
.stat-card:hover,
.income-card:hover,
.scenario-step:hover,
button:hover:not(:disabled),
[onclick]:hover {
  transform: translateY(-2px);
}

/* Active states */
button:active,
.btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   30. PROGRESS TRACKER STYLES
   ========================================================================== */

/* Progress View Header */
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.progress-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--text-2xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.progress-header h2 i {
  color: var(--color-primary);
  font-size: var(--text-3xl);
}

/* Progress Stats */
.progress-stats {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.stat-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  min-width: 80px;
  text-align: center;
}

.stat-badge i {
  font-size: var(--text-xl);
  color: var(--color-primary);
}

.stat-badge span {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
}

.stat-badge small {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Current Month Section */
.current-month-section {
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.current-month-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--border-primary);
}

.current-month-section h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.current-month-section h3 i {
  color: var(--color-primary);
}

.month-navigation {
  display: flex;
  gap: var(--space-sm);
}

.btn-nav {
  padding: var(--space-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-nav:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

/* Progress Checklist */
.progress-checklist {
  margin-bottom: var(--space-2xl);
}

.progress-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.progress-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-accent);
}

.progress-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.progress-item.completed::before {
  background: var(--gradient-secondary);
}

.progress-item.minimum-only::before {
  background: var(--gradient-danger);
}

.progress-item-info {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.progress-debt-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.progress-debt-type {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 500;
  margin-top: var(--space-xs);
}

.progress-payment-info {
  text-align: center;
}

.progress-planned-payment {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.progress-min-payment {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

.progress-due-date {
  text-align: center;
  font-size: var(--text-base);
  color: var(--text-secondary);
}

.progress-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.progress-checkbox {
  position: relative;
  width: 24px;
  height: 24px;
}

.progress-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.progress-checkbox .checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 24px;
  width: 24px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.progress-checkbox input:checked ~ .checkmark {
  background: var(--success-green);
  border-color: var(--success-green);
}

.progress-checkbox .checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.progress-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.progress-checkbox .checkmark:after {
  left: 7px;
  top: 3px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.payment-type-selector {
  display: flex;
  gap: var(--space-xs);
}

.payment-type-btn {
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all var(--transition-base);
}

.payment-type-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.payment-type-btn:hover:not(.active) {
  background: var(--bg-hover);
  border-color: var(--border-accent);
}

/* Month Actions */
.month-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  padding-top: var(--space-xl);
  border-top: 2px solid var(--border-primary);
}

/* Progress History */
.progress-history {
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.history-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.history-month {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
}

.history-month:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.history-month-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.history-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-md) 0;
}

.history-progress-fill {
  height: 100%;
  background: var(--gradient-secondary);
  transition: width var(--transition-base);
}

.history-stats {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Rewards Section */
.rewards-section {
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-lg);
}

.reward-badge {
  background: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.reward-badge.earned {
  border-color: var(--success-green);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(56, 161, 105, 0.1) 100%);
}

.reward-badge.earned::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
}

.reward-badge:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.reward-icon {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
  opacity: 0.3;
  transition: opacity var(--transition-base);
}

.reward-badge.earned .reward-icon {
  opacity: 1;
}

.reward-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.reward-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .progress-header {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }
  
  .progress-stats {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .progress-item-info {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    text-align: center;
  }
  
  .progress-actions {
    justify-content: center;
    margin-top: var(--space-md);
  }
  
  .month-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .history-timeline {
    grid-template-columns: 1fr;
  }
  
  .rewards-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

/* End of Complete CSS Framework */

/* Asset Items - The actual class being used in the app */
.asset-item {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: 0;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
}

[data-theme="dark"] .asset-item {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
  border-color: var(--border-primary);
  box-shadow: var(--shadow-lg);
}

.asset-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-accent);
}

[data-theme="dark"] .asset-item:hover {
  box-shadow: var(--shadow-xl);
  border-color: var(--border-accent);
}

/* Asset Item Header with gradient */
.asset-item::before {
  content: "";
  display: block;
  height: 120px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  margin-bottom: 0;
}

/* Icon overlay */
.asset-item::after {
  content: "📦";
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-5xl);
  opacity: 0.9;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  pointer-events: none;
}

/* Asset Item Content */
.asset-item > div {
  padding: var(--space-xl);
}

/* Asset Name Styling */
.asset-item h4 {
  font-size: var(--text-2xl) \!important;
  font-weight: 800 \!important;
  color: var(--text-primary) \!important;
  margin: 0 0 var(--space-sm) 0 \!important;
  line-height: 1.2 \!important;
}

/* Asset Category Styling */
.asset-item p:first-of-type {
  display: inline-flex \!important;
  align-items: center \!important;
  gap: var(--space-xs) \!important;
  background: var(--bg-secondary) \!important;
  color: var(--text-secondary) \!important;
  padding: var(--space-xs) var(--space-md) \!important;
  border-radius: var(--radius-full) \!important;
  font-size: var(--text-sm) \!important;
  font-weight: 600 \!important;
  text-transform: uppercase \!important;
  letter-spacing: 0.5px \!important;
  margin-bottom: var(--space-lg) \!important;
}

/* Asset Price Styling */
.asset-item p:last-of-type {
  margin: var(--space-lg) 0 0 0 \!important;
  text-align: center \!important;
  padding: var(--space-lg) \!important;
  background: var(--bg-tertiary) \!important;
  border-radius: var(--radius-xl) \!important;
  border: 1px solid var(--border-primary) \!important;
  font-size: var(--text-4xl) \!important;
  font-weight: 900 \!important;
  color: var(--success-green) \!important;
  line-height: 1 \!important;
}

[data-theme="dark"] .asset-item p:last-of-type {
  background: var(--bg-secondary) \!important;
  border-color: var(--border-primary) \!important;
  color: var(--success-green) \!important;
}

/* ==========================================================================
   Progress Tracker Styles
   ========================================================================== */

/* Progress Overview */
.progress-overview {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border-primary);
  margin-bottom: var(--space-xl);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.progress-header h2 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  color: var(--text-primary);
  font-size: var(--text-2xl);
  font-weight: 700;
}

.progress-stats {
  display: flex;
  gap: var(--space-md);
}

.stat-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  background: var(--bg-secondary);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  min-width: 100px;
}

.stat-badge i {
  color: var(--color-primary);
  font-size: var(--text-lg);
}

.stat-badge span {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.stat-badge small {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

/* Current Month Section */
.current-month-section {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border-primary);
  margin-bottom: var(--space-xl);
}

.month-navigation {
  display: flex;
  gap: var(--space-sm);
}

.btn-nav {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-nav:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Progress Checklist */
.progress-checklist {
  margin: var(--space-xl) 0;
}

.progress-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  margin-bottom: var(--space-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.progress-item.completed {
  background: var(--success-bg);
  border-color: var(--success-green);
}

.progress-item.completed::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--success-green);
}

.progress-checkbox {
  position: relative;
}

.progress-checkbox input[type="checkbox"] {
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin: 0;
  opacity: 0;
  position: absolute;
}

.progress-checkbox label {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.progress-checkbox input[type="checkbox"]:checked + label {
  background: var(--success-green);
  border-color: var(--success-green);
}

.progress-checkbox input[type="checkbox"]:checked + label::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.progress-details {
  flex: 1;
}

.progress-details h4 {
  margin: 0 0 var(--space-xs) 0;
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 600;
}

.progress-details p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.progress-details .due-date {
  color: var(--warning-orange);
  font-weight: 500;
}

.progress-amount {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

/* Month Actions */
.month-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-primary);
}

/* Progress History */
.progress-history {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border-primary);
  margin-bottom: var(--space-xl);
}

.history-timeline {
  margin-top: var(--space-xl);
}

.history-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  margin-bottom: var(--space-md);
}

.history-item.complete {
  background: var(--success-bg);
  border-color: var(--success-green);
}

.history-date {
  min-width: 150px;
  font-weight: 600;
  color: var(--text-primary);
}

.history-progress {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-primary);
}

.progress-fill {
  height: 100%;
  background: var(--success-green);
  transition: width var(--transition-base);
}

.progress-text {
  min-width: 40px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.history-status {
  color: var(--success-green);
  font-size: var(--text-lg);
}

.history-item:not(.complete) .history-status {
  color: var(--text-secondary);
}

/* Rewards Section */
.rewards-section {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border-primary);
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.reward-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  text-align: center;
}

.reward-badge.earned {
  background: var(--success-bg);
  border-color: var(--success-green);
}

.reward-badge i {
  font-size: var(--text-2xl);
  color: var(--text-secondary);
}

.reward-badge.earned i {
  color: var(--success-green);
}

.reward-badge span {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

/* No Data Messages */
.no-debts,
.no-history,
.error {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: var(--space-xl);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
}

.error {
  color: var(--error-red);
  background: var(--error-bg);
  border-color: var(--error-red);
}

/* Responsive Design */
@media (max-width: 768px) {
  .progress-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-lg);
  }
  
  .progress-stats {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .stat-badge {
    min-width: 80px;
  }
  
  .progress-item {
    padding: var(--space-md);
  }
  
  .month-actions {
    flex-direction: column;
  }
  
  .history-item {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }
  
  .history-date {
    min-width: auto;
    text-align: center;
  }
  
  .rewards-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

/* ==========================================================================
   Budget Tracker Styles
   ========================================================================== */

/* Budget Overview */
.budget-overview {
  margin-bottom: var(--space-xl);
}

.budget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.budget-header h2 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  color: var(--text-primary);
  font-size: var(--text-2xl);
  font-weight: 700;
}

.budget-actions {
  display: flex;
  gap: var(--space-md);
}

/* Budget Summary */
.budget-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.summary-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border-primary);
  text-align: center;
  transition: transform var(--transition-base);
}

.summary-card:hover {
  transform: translateY(-2px);
}

.summary-card.primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  border-color: var(--color-primary);
}

.summary-card.success {
  background: linear-gradient(135deg, var(--success-green), var(--success-green-dark));
  color: white;
  border-color: var(--success-green);
}

.summary-card.warning {
  background: linear-gradient(135deg, var(--warning-orange), var(--warning-orange-dark));
  color: white;
  border-color: var(--warning-orange);
}

.summary-card.info {
  background: linear-gradient(135deg, var(--info-blue), var(--info-blue-dark));
  color: white;
  border-color: var(--info-blue);
}

.summary-card h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin: 0 0 var(--space-md) 0;
  font-size: var(--text-lg);
  font-weight: 600;
}

.summary-card p {
  margin: 0 0 var(--space-sm) 0;
  font-size: var(--text-3xl);
  font-weight: 900;
}

.summary-card small {
  opacity: 0.9;
  font-size: var(--text-sm);
}

/* Budget Period */
.budget-period {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  border: 1px solid var(--border-primary);
  margin-bottom: var(--space-xl);
}

.period-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.period-selector h3 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  min-width: 200px;
  text-align: center;
}

/* Budget Buckets */
.budget-buckets {
  margin-bottom: var(--space-xl);
}

.no-budgets {
  text-align: center;
  padding: var(--space-4xl);
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-primary);
}

.no-budgets i {
  font-size: var(--text-5xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.no-budgets h3 {
  margin: 0 0 var(--space-md) 0;
  color: var(--text-primary);
  font-size: var(--text-xl);
}

.no-budgets p {
  margin: 0 0 var(--space-xl) 0;
  color: var(--text-secondary);
}

.budget-bucket {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border-primary);
  margin-bottom: var(--space-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.budget-bucket:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.bucket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-lg);
}

.bucket-info h4 {
  margin: 0 0 var(--space-sm) 0;
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: 700;
}

.bucket-amounts {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-lg);
}

.bucket-amounts .spent {
  color: var(--text-primary);
  font-weight: 700;
}

.bucket-amounts .separator {
  color: var(--text-secondary);
}

.bucket-amounts .budgeted {
  color: var(--text-secondary);
  font-weight: 500;
}

.bucket-actions {
  display: flex;
  gap: var(--space-sm);
}

.bucket-progress {
  margin-top: var(--space-md);
}

.bucket-progress .progress-bar {
  height: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-primary);
  margin-bottom: var(--space-sm);
}

.bucket-progress .progress-fill {
  height: 100%;
  transition: width var(--transition-base);
  border-radius: var(--radius-full);
}

.bucket-progress .progress-fill.over-budget {
  background: var(--error-red) !important;
}

.remaining-amount {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.remaining-amount.over-budget {
  color: var(--error-red);
}

.remaining-amount.over-budget i {
  color: var(--error-red);
}

/* Recent Transactions */
.recent-transactions {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border-primary);
}

.transactions-list {
  margin-top: var(--space-xl);
}

.no-transactions {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: var(--space-xl);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  margin-bottom: var(--space-md);
  transition: all var(--transition-base);
}

.transaction-item:hover {
  background: var(--bg-tertiary);
}

.transaction-info {
  flex: 1;
}

.transaction-bucket {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-xs);
}

.transaction-bucket i {
  font-size: var(--text-xs);
}

.transaction-description {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.transaction-date {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.transaction-amount {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.transaction-amount span {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--error-red);
}

/* Modal Content for Budget Forms */
.modal-content .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Color Preview */
#budgetColor,
#editBudgetColor {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

#budgetColor option,
#editBudgetColor option {
  padding: var(--space-sm);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .budget-summary {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .budget-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-lg);
  }
  
  .budget-actions {
    justify-content: center;
  }
  
  .budget-summary {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .summary-card {
    padding: var(--space-lg);
  }
  
  .bucket-header {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .bucket-actions {
    justify-content: flex-end;
  }
  
  .transaction-item {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
    padding: var(--space-md);
  }
  
  .transaction-amount {
    justify-content: space-between;
  }
  
  .period-selector h3 {
    min-width: auto;
    font-size: var(--text-lg);
  }
  
  .modal-content .form-row {
    grid-template-columns: 1fr;
  }
}


/* Assets Summary Grid */
.assets-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.asset-stat-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.asset-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.asset-stat-box i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.asset-stat-box h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.asset-stat-box .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.asset-stat-box .stat-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Color variants for asset stat boxes */
.asset-stat-box.primary {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(79, 70, 229, 0.1) 100%);
    border-color: rgba(79, 70, 229, 0.3);
}

.asset-stat-box.primary i {
    color: #4f46e5;
}

.asset-stat-box.success {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

.asset-stat-box.success i {
    color: #22c55e;
}

.asset-stat-box.warning {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(251, 146, 60, 0.1) 100%);
    border-color: rgba(251, 146, 60, 0.3);
}

.asset-stat-box.warning i {
    color: #fb923c;
}

.asset-stat-box.info {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(14, 165, 233, 0.1) 100%);
    border-color: rgba(14, 165, 233, 0.3);
}

.asset-stat-box.info i {
    color: #0ea5e9;
}

.asset-stat-box.danger {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(239, 68, 68, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.asset-stat-box.danger i {
    color: #ef4444;
}


/* ========================================
   Consolidation Calculator Styles
   ======================================== */

.consolidation-overview {
    padding: 1.5rem;
}

.consolidation-header {
    text-align: center;
    margin-bottom: 2rem;
}

.consolidation-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.consolidation-current-summary {
    margin-bottom: 2rem;
}

.consolidation-current-summary h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.consolidation-calculator {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.consolidation-calculator h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

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

.consolidation-form .form-group {
    display: flex;
    flex-direction: column;
}

.consolidation-form label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.consolidation-form input,
.consolidation-form select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
}

.consolidation-form small {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.consolidation-results {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.comparison-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 2px solid var(--border-color);
}

.comparison-card.current {
    border-color: var(--text-muted);
}

.comparison-card.consolidated {
    border-color: var(--accent-primary);
}

.comparison-card h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.comparison-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comparison-stat:last-child {
    border-bottom: none;
}

.comparison-stat .label {
    color: var(--text-secondary);
}

.comparison-stat .value {
    font-weight: 600;
    color: var(--text-primary);
}

.consolidation-recommendation {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-top: 1.5rem;
}

.consolidation-recommendation.positive {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.consolidation-recommendation.negative {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.consolidation-recommendation i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.consolidation-recommendation h4 {
    margin-bottom: 0.5rem;
    color: inherit;
}

.consolidation-recommendation p,
.consolidation-recommendation li {
    color: var(--text-primary);
}

.consolidation-debt-selection {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.consolidation-debt-selection h3 {
    margin-bottom: 0.5rem;
}

.help-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.debt-selection-list {
    max-height: 400px;
    overflow-y: auto;
}

.debt-selection-item {
    margin-bottom: 0.75rem;
}

.debt-checkbox-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
}

.debt-checkbox-label:hover {
    background: var(--bg-tertiary);
}

.debt-checkbox-label input[type="checkbox"] {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.debt-info {
    flex: 1;
}

.debt-name {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.debt-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .consolidation-form .form-row,
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}


/* Consolidation Stats Grid */
.consolidation-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.consolidation-stat-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.consolidation-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.consolidation-stat-box i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.consolidation-stat-box h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.consolidation-stat-box .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.consolidation-stat-box .stat-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Color variants for consolidation stat boxes */
.consolidation-stat-box.primary {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(79, 70, 229, 0.1) 100%);
    border-color: rgba(79, 70, 229, 0.3);
}

.consolidation-stat-box.primary i {
    color: #4f46e5;
}

.consolidation-stat-box.success {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

.consolidation-stat-box.success i {
    color: #22c55e;
}

.consolidation-stat-box.warning {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(251, 146, 60, 0.1) 100%);
    border-color: rgba(251, 146, 60, 0.3);
}

.consolidation-stat-box.warning i {
    color: #fb923c;
}

.consolidation-stat-box.info {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(14, 165, 233, 0.1) 100%);
    border-color: rgba(14, 165, 233, 0.3);
}

.consolidation-stat-box.info i {
    color: #0ea5e9;
}


/* Consolidation Remaining Display */
.consolidation-remaining-display {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.consolidation-remaining-display strong {
    color: var(--accent-primary);
}

/* Disabled debt selection items */
.debt-checkbox-label[style*="opacity: 0.5"] {
    cursor: not-allowed;
}

.debt-checkbox-label[style*="opacity: 0.5"] input[type="checkbox"] {
    cursor: not-allowed;
}

/* ==========================================================================
   BUDGET CHART SECTION
   ========================================================================== */

.budget-chart-section {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-sm);
}

.budget-chart-section h3 {
    margin-bottom: var(--space-lg);
    font-size: var(--text-xl);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.chart-container {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.budget-performance {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   SAVINGS GOALS SECTION
   ========================================================================== */

.goals-overview {
    padding: var(--space-2xl) 0;
}

.debt-free-timeline {
    margin-bottom: var(--space-2xl);
}

.debt-free-banner {
    background: var(--gradient-secondary);
    color: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.debt-free-banner i {
    font-size: 3rem;
    color: #ffd700;
}

.debt-free-banner h3 {
    margin: 0 0 var(--space-sm) 0;
    font-size: var(--text-2xl);
}

.debt-free-banner p {
    margin: 0;
    opacity: 0.9;
}

.debt-free-banner .highlight {
    font-size: var(--text-lg);
    margin-top: var(--space-sm);
}

.goals-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.goals-list {
    margin-bottom: var(--space-2xl);
}

.goal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.goal-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-accent);
}

.goal-card.high {
    border-left: 4px solid var(--debt-red);
}

.goal-card.medium {
    border-left: 4px solid var(--warning-orange);
}

.goal-card.low {
    border-left: 4px solid var(--color-primary);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
}

.goal-info h3 {
    margin: 0 0 var(--space-sm) 0;
    font-size: var(--text-xl);
}

.goal-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    margin-right: var(--space-sm);
}

.goal-priority {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
}

.goal-priority.high {
    background: rgba(245, 101, 101, 0.1);
    color: var(--debt-red);
}

.goal-priority.medium {
    background: rgba(237, 137, 54, 0.1);
    color: var(--warning-orange);
}

.goal-priority.low {
    background: rgba(66, 153, 225, 0.1);
    color: var(--color-primary);
}

.goal-amount {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.goal-amount .amount {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
}

.goal-timeline {
    margin-bottom: var(--space-lg);
}

.timeline-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.financing-comparison-display {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.comparison-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.save-option, .finance-option {
    text-align: center;
}

.save-option h5, .finance-option h5 {
    margin: 0 0 var(--space-sm) 0;
    color: var(--text-primary);
}

.save-option .timeline, .finance-option .timeline {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.save-option .benefit {
    color: var(--success-green);
    font-weight: 600;
}

.finance-option .warning {
    color: var(--debt-red);
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--text-secondary);
}

.empty-state p {
    margin: 0;
    font-size: var(--text-lg);
}

/* Financing comparison in modal */
.financing-comparison {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-top: var(--space-lg);
}

.financing-comparison h4 {
    margin: 0 0 var(--space-md) 0;
    color: var(--text-primary);
}

.financing-preview {
    margin-top: var(--space-md);
}

.preview-stats {
    display: grid;
    gap: var(--space-sm);
}

.preview-stats .stat {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-primary);
}

.preview-stats .stat:last-child {
    border-bottom: none;
}

.preview-stats .warning {
    color: var(--debt-red);
    font-weight: 600;
}

.savings-comparison {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-top: var(--space-2xl);
}

.savings-comparison h3 {
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

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

.comparison-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    max-width: 600px;
    margin: 0 auto;
}

.comparison-card h4 {
    margin: var(--space-md) 0;
    color: var(--text-primary);
}

.comparison-card p {
    margin: 0;
    color: var(--text-secondary);
}

.comparison-card strong {
    color: var(--success-green);
    font-size: var(--text-lg);
}

.comparison-card .small {
    font-size: var(--text-sm);
    margin-top: var(--space-md);
}

@media (max-width: 768px) {
    .goals-summary {
        grid-template-columns: 1fr;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .goal-header {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .goal-amount {
        width: 100%;
        justify-content: space-between;
    }
}

/* ==========================================================================
   DEBT BY USER SECTION
   ========================================================================== */

.debt-by-user-section {
    margin: var(--space-2xl) 0;
}

.user-debt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.user-debt-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.user-debt-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

.user-debt-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.user-debt-name h3 {
    margin: 0;
    font-size: var(--text-xl);
    color: var(--text-primary);
}

.debt-count {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.user-debt-stats {
    display: grid;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.user-debt-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-primary);
}

.user-debt-stat:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
}

.stat-value.debt-amount {
    color: var(--debt-red);
    font-size: var(--text-lg);
}

.user-debt-progress {
    margin-top: var(--space-md);
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

@media (max-width: 768px) {
    .user-debt-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}
