/* ==========================================================================
   Finanzas Personales Albrizzi - Master Stylesheet (Ultra-Modern Fintech UI)
   Minimalist, Aesthetic, Premium Obsidian Dark Theme, Tabular Monospace, High Contrast
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - Premium Obsidian Fintech Dark */
  --bg-main: #050814;
  --bg-card: #0D1527;
  --bg-card-hover: #131E35;
  --bg-card-subtle: #090E1D;
  --bg-sidebar: #080D1A;
  --bg-input: #0F172A;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-glow: rgba(59, 130, 246, 0.35);
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --color-primary: #3B82F6;
  --color-primary-hover: #2563EB;
  --color-primary-subtle: rgba(59, 130, 246, 0.15);

  --color-success: #10B981;
  --color-success-hover: #059669;
  --color-success-subtle: rgba(16, 185, 129, 0.15);
  
  --color-warning: #F59E0B;
  --color-warning-subtle: rgba(245, 158, 11, 0.15);
  
  --color-danger: #EF4444;
  --color-danger-subtle: rgba(239, 68, 68, 0.15);

  --color-purple: #8B5CF6;
  --color-purple-subtle: rgba(139, 92, 246, 0.15);

  --color-cyan: #06B6D4;
  --color-cyan-subtle: rgba(6, 182, 212, 0.15);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px -2px rgba(0, 0, 0, 0.5), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 36px -4px rgba(0, 0, 0, 0.7), 0 4px 12px -2px rgba(0, 0, 0, 0.4);
  --shadow-glow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
  --shadow-glow-blue: 0 0 25px rgba(59, 130, 246, 0.25);
  --shadow-glow-green: 0 0 25px rgba(16, 185, 129, 0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

body.theme-light {
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --bg-card-subtle: #F8FAFC;
  --bg-sidebar: #FFFFFF;
  --bg-input: #F1F5F9;
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;
  --border-subtle: #EDF2F7;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Strict No-Wrap Rules for Numbers, Currencies, and Dates */
.amount-nowrap,
.kpi-value,
.metric-number,
.pill-val,
.cat-progress-nums,
.weekly-card-val,
.weekly-card-limit,
.fixed-stat-pill strong,
.debt-stat strong,
.goal-amounts strong,
.doc-kpi-box strong,
.font-mono,
td.font-mono,
.data-table td,
.data-table th,
.score-number,
.insight-value {
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.text-accent { color: var(--color-cyan) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-purple { color: var(--color-purple) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-cyan { color: var(--color-cyan) !important; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }

/* Layout Structure */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar.collapsed {
  width: 76px;
}

.sidebar-header {
  padding: 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #3B82F6, #06B6D4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.05em;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
  flex-shrink: 0;
}

.brand-text h2 {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.sidebar-toggle-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

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

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.16) 0%, rgba(14, 165, 233, 0.04) 100%);
  color: #FFFFFF;
  border-color: rgba(59, 130, 246, 0.3);
  font-weight: 700;
  box-shadow: inset 3px 0 0 #38BDF8, 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  color: #94A3B8;
}

.nav-icon-box .nav-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  transition: stroke 0.2s ease, transform 0.2s ease;
}

.nav-item:hover .nav-icon-box {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  color: #F8FAFC;
  transform: scale(1.05);
}

.nav-item.active .nav-icon-box {
  background: linear-gradient(135deg, #2563EB 0%, #0284C7 100%);
  border-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
}

/* Category Accent Highlights */
.nav-icon-box.icon-emerald { color: #34D399; }
.nav-icon-box.icon-blue { color: #60A5FA; }
.nav-icon-box.icon-cyan { color: #38BDF8; }
.nav-icon-box.icon-rose { color: #FB7185; }
.nav-icon-box.icon-amber { color: #FBBF24; }
.nav-icon-box.icon-indigo { color: #818CF8; }
.nav-icon-box.icon-violet { color: #C084FC; }
.nav-icon-box.icon-purple { color: #E879F9; }
.nav-icon-box.icon-slate { color: #94A3B8; }

.nav-label {
  white-space: nowrap;
  transition: opacity 0.2s ease;
  font-size: 0.86rem;
}

.app-sidebar.collapsed .brand-text,
.app-sidebar.collapsed .nav-label,
.app-sidebar.collapsed .user-info,
.app-sidebar.collapsed .user-logout-btn {
  display: none;
}

.app-sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 1.25rem 0.5rem;
  flex-direction: column;
  gap: 0.75rem;
}

.app-sidebar.collapsed .sidebar-brand {
  justify-content: center;
}

.app-sidebar.collapsed .sidebar-toggle-btn svg {
  transform: rotate(180deg);
}

.app-sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 0.45rem;
}

.app-sidebar.collapsed .user-chip {
  justify-content: center;
  padding: 0.25rem;
  background: transparent;
}

.badge-pending {
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  margin-left: 0.4rem;
  display: inline-block;
  line-height: 1;
}

.admin-only.hidden {
  display: none !important;
}

.sidebar-footer {
  padding: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #475569, #334155);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.user-logout-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.user-logout-btn:hover {
  color: var(--color-danger);
  background-color: rgba(239, 68, 68, 0.1);
}

/* App Main Container */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  background: radial-gradient(circle at 50% -80px, rgba(37, 99, 235, 0.12) 0%, rgba(14, 165, 233, 0.04) 35%, transparent 65%), #050814;
}

.app-header {
  height: 58px;
  background-color: rgba(8, 13, 26, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  gap: 0.75rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 0.35rem;
}

.header-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.header-collapse-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card);
}

/* Live Date & Time Center Chip */
.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.live-datetime-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 0.26rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.live-time-divider {
  color: var(--text-muted);
  opacity: 0.5;
  font-weight: bold;
}

#live-date {
  font-weight: 600;
  color: var(--text-primary);
}

#live-time {
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--color-cyan);
}

@media (max-width: 1050px) {
  .header-center {
    display: none;
  }
}

.period-label {
  display: none;
}

.period-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--bg-input);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.select-period {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  padding-right: 0.25rem;
}

.period-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.period-status-badge.status-open {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.period-status-badge.status-closed {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.period-status-badge .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.period-status-badge.status-open .status-dot {
  background-color: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.period-status-badge.status-closed .status-dot {
  background-color: #EF4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}

.btn-period-action {
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

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

/* Quick Header Buttons */
.btn-quick-income {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(5, 150, 105, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34D399;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 0.38rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

.btn-quick-income:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(5, 150, 105, 0.4));
  border-color: #10B981;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-quick-saving {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(8, 145, 178, 0.25));
  border: 1px solid rgba(6, 182, 212, 0.45);
  color: #22D3EE;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 0.38rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(6, 182, 212, 0.15);
}

.btn-quick-saving:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(8, 145, 178, 0.4));
  border-color: #06B6D4;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

.btn-quick-expense {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  border: 1px solid rgba(59, 130, 246, 0.6);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 0.38rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-quick-expense:hover {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  border-color: #60A5FA;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.45);
}

.btn-subtle-success {
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #34D399 !important;
}

.btn-subtle-success:hover {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #FFFFFF !important;
}

/* Content Body */
.content-body {
  flex: 1;
  padding: 1.75rem 2rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Tabs */
.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.45);
}

.btn-accent {
  background: linear-gradient(135deg, #06B6D4, #0891B2);
  color: white;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}
.btn-accent:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-success:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.btn-danger:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn-outline:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--color-cyan);
  padding: 0;
  font-weight: 600;
}
.btn-link:hover {
  text-decoration: underline;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}
.btn-xs {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* Cards Base */
.card {
  background: rgba(13, 21, 39, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.55);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-standard {
  padding: 1.5rem;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

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

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* Executive Dashboard Hero Grid (Score + Period Tracking) */
.dash-hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .dash-hero-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Score Hero Card (FinAI Health Engine) */
.score-hero-card {
  background: rgba(13, 21, 39, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6), 0 0 30px -10px rgba(37, 99, 235, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.dash-hero-grid .score-hero-card {
  margin-bottom: 0;
  height: 100%;
}

/* Period Days Card (Integrated alongside Health Score) */
.period-days-card {
  background: rgba(13, 21, 39, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  padding: 1.6rem 1.8rem;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6), 0 0 30px -10px rgba(37, 99, 235, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

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

.period-days-title-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.period-icon {
  font-size: 1.35rem;
}

.period-days-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}

.period-days-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.period-days-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.period-stat-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.period-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.period-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
}

.period-days-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.period-days-progress-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.period-days-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #10B981);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.period-days-pct-text {
  font-size: 0.75rem;
  min-width: 40px;
  text-align: right;
  font-weight: 700;
}

.score-hero-content,
.score-hero-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.score-circle-wrap,
.score-gauge-box {
  position: relative;
  width: 110px;
  height: 110px;
  min-width: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-circle {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-full);
  border: 5px solid var(--color-success);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(13, 21, 39, 0.8) 70%);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.35);
  transition: all 0.4s ease;
}

.score-number {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
}

.score-max,
.score-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.score-details,
.score-info {
  flex: 1;
}

.score-badge-row {
  margin-bottom: 0.4rem;
}

.score-title,
.score-info h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.score-desc,
.score-info p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.score-breakdown-row,
.score-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.score-pill {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pill-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.pill-val {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-cyan);
}

/* 4 Core KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: rgba(13, 21, 39, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.55), 0 0 20px -5px rgba(59, 130, 246, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
  opacity: 0.9;
}

.kpi-card.card-cyan::before { background: linear-gradient(90deg, #0284C7, #38BDF8); }
.kpi-card.card-purple::before { background: linear-gradient(90deg, #7C3AED, #A78BFA); }
.kpi-card.card-orange::before { background: linear-gradient(90deg, #D97706, #FBBF24); }
.kpi-card.card-red::before { background: linear-gradient(90deg, #DC2626, #F87171); }
.kpi-card.card-green::before { background: linear-gradient(90deg, #059669, #34D399); }

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(59, 130, 246, 0.12);
}

.kpi-label {
  font-size: 0.73rem;
  color: #94A3B8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.45rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.4rem;
  color: #FFFFFF;
}

.kpi-subtext {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

/* Surplus Allocation & Distribution Section */
.surplus-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.surplus-pills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
}

/* Metric Tiles Row (Consolidated Summary Strips) */
.metric-tiles-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.metric-tile {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-number {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.2;
}

.metric-caption {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Smart Insights & Diagnostic Grid */
.insights-section,
.alerts-section {
  margin-bottom: 1.5rem;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
}

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

.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.insight-card.insight-positivo {
  border-left-color: var(--color-success);
}
.insight-card.insight-alerta {
  border-left-color: var(--color-warning);
}
.insight-card.insight-info {
  border-left-color: var(--color-cyan);
}

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

.insight-title {
  font-size: 0.88rem;
  font-weight: 700;
}

.insight-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.insight-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-cyan);
}

.insight-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Alerts Grid */
.alerts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.alert-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.alert-item-card.activa {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

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

.alert-item-title {
  font-size: 0.82rem;
  font-weight: 700;
}

.alert-item-action {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Mid Section 2-Column Grid */
.dashboard-mid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

/* Categories Progress Bars */
.categories-progress-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cat-progress-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cat-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.cat-progress-name {
  font-weight: 600;
  color: var(--text-primary);
}

.cat-progress-nums {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.progress-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.progress-fill.verde { background: var(--color-success); }
.progress-fill.amarillo { background: var(--color-warning); }
.progress-fill.rojo { background: var(--color-danger); }

/* Weekly Cards Grid */
.weekly-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.weekly-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.weekly-card-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.weekly-card-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.weekly-card-limit {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.data-table th {
  background-color: var(--bg-card-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.025);
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.badge-accent {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.2));
  color: var(--color-cyan);
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.badge-subtle {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* Filter Bar */
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.filter-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  flex: 1;
  min-width: 160px;
}

.filter-group.flex-2 {
  flex: 2;
  min-width: 220px;
}

.input-filter,
.select-filter {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.input-filter:focus,
.select-filter:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Form Styles */
.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

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

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

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .form-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .form-grid-2,
  .form-grid-3,
  .form-grid-4 {
    grid-template-columns: 1fr;
  }
}

body.modal-open {
  overflow: hidden !important;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: modalScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-dialog-lg {
  max-width: 780px;
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: var(--bg-card-subtle);
}

/* Toast System */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  animation: slideInToast 0.25s ease forwards;
}

.toast-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  font-family: var(--font-mono);
}

.toast-success .toast-tag { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.toast-error .toast-tag { background: rgba(239, 68, 68, 0.2); color: #F87171; }
.toast-info .toast-tag { background: rgba(6, 182, 212, 0.2); color: #38BDF8; }

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

/* Fixed Expenses & Fuel Simulator Grid */
.fixed-layout-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
  .fixed-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* Statistics & Interactive Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-card-wide {
  grid-column: 1 / -1;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 290px;
}

.chart-card-wide .chart-container {
  height: 340px;
}

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

/* Button & Table Action Helpers */
.btn-table-action {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* Report Section Screen View */
.report-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.report-controls-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.2rem;
}

.printable-document {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.report-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Debts & Savings Custom Layouts */
.debts-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.debts-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Segmented Control Component */
.segmented-control {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 3px;
  border-radius: var(--radius-full);
  gap: 3px;
}

.segmented-pill {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.18s ease;
  font-family: var(--font-main);
  outline: none;
}

.segmented-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.segmented-pill.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.35);
}

.subtab-icon {
  font-size: 0.85rem;
}

/* Debts & Savings Grid */
.debts-savings-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}

.debts-savings-grid.single-view {
  grid-template-columns: 1fr;
}

.debts-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.savings-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Inside Debts: Workspace 2-Column Split for Desktop */
.debts-workspace-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
  align-items: start;
}

.debts-savings-grid:not(.single-view) .debts-workspace-split {
  grid-template-columns: 1fr;
}

.debts-simulators-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Debts View Mode Toggle (Cards / Table) */
.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 2px;
  border-radius: var(--radius-sm);
  gap: 2px;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

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

.view-toggle-btn.active {
  background: var(--color-primary);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.debts-mobile-cards-list {
  display: none;
}

/* Debts Cards Grid - Responsive, bounded, no horizontal stretching */
.debts-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.debt-grid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--color-cyan);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.debt-grid-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  border-color: rgba(6, 182, 212, 0.4);
}

.debt-grid-card.is-paid {
  border-top-color: var(--color-success);
  opacity: 0.85;
}

.debt-card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.debt-card-identity {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.debt-card-name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.debt-card-badges {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}

.debt-card-status-pill {
  flex-shrink: 0;
}

.debt-card-progress-wrap {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
}

.debt-card-kpis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.debt-card-kpi-cell {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.debt-card-kpi-cell.highlight-danger {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.06);
}

.debt-card-kpi-cell.highlight-cyan {
  border-color: rgba(6, 182, 212, 0.25);
  background: rgba(6, 182, 212, 0.06);
}

.debt-kpi-cell-label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  font-weight: 600;
}

.debt-kpi-cell-val {
  font-size: 0.98rem;
  line-height: 1.2;
}

.debt-card-month-strip {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  font-size: 0.76rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}

.debt-card-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.debt-card-mini-actions {
  display: flex;
  gap: 0.3rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Debts Compact Table Styling - Defined Column Widths, No Stretched Void */
.debts-compact-table {
  width: 100%;
  overflow-x: auto;
}

.debts-compact-table table {
  width: 100%;
  border-collapse: collapse;
}

.debts-compact-table th:nth-child(1) { width: 30%; }
.debts-compact-table th:nth-child(2) { width: 22%; }
.debts-compact-table th:nth-child(3) { width: 20%; }
.debts-compact-table th:nth-child(4) { width: 16%; }
.debts-compact-table th:nth-child(5) { width: 12%; text-align: right; }

.debts-compact-table th,
.debts-compact-table td {
  padding: 0.65rem 0.8rem;
  vertical-align: middle;
}

/* Debt Simulation Presets & Results Panel */
.debt-sim-presets {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.sim-live-results-panel {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}


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

.savings-goal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.savings-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.savings-goal-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.savings-percentage {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--color-success);
}

.savings-progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.savings-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #10B981);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.savings-amounts-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.savings-card-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

/* Closed Period Banner */
#closed-period-banner {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #FCA5A5;
  font-size: 0.85rem;
}

/* ==========================================================================
   Authentication & Login Page Styles (Fintech Dark Theme)
   ========================================================================== */

.auth-body {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050814;
  color: var(--text-primary);
  font-family: var(--font-main);
  padding: 1.5rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Ambient glow & backdrop texture */
.auth-ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  z-index: 0;
}

.auth-ambient-glow.glow-top {
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 580px;
  height: 380px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28) 0%, rgba(14, 165, 233, 0.1) 50%, transparent 75%);
}

.auth-ambient-glow.glow-bottom {
  bottom: -80px;
  right: 15%;
  width: 480px;
  height: 320px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(37, 99, 235, 0.05) 50%, transparent 70%);
}

.auth-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

/* Glassmorphism Card */
.auth-card {
  background: rgba(13, 21, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 2.75rem 2.25rem;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.75), 0 0 45px -10px rgba(37, 99, 235, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.auth-logo-badge {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1E40AF 0%, #2563EB 50%, #0284C7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.auth-logo-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(37, 99, 235, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(180deg, #FFFFFF 20%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 0.4rem 0;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: #94A3B8;
  line-height: 1.45;
  margin: 0;
}

/* Segmented Control Tabs */
.auth-tabs {
  display: flex;
  background: rgba(8, 14, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 1.5rem;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 0.65rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.auth-tab:hover {
  color: #E2E8F0;
}

.auth-tab.active {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.8rem;
  color: #93C5FD;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.auth-alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  animation: fadeIn 0.2s ease-out;
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.auth-alert.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6EE7B7;
}

.auth-alert.hidden {
  display: none;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Modern Input Groups with Left Icons */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon-left {
  position: absolute;
  left: 1rem;
  color: #64748B;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 2;
}

.input-with-icon:focus-within .input-icon-left {
  color: #38BDF8;
}

.input-with-icon input {
  background: rgba(10, 17, 33, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 12px !important;
  color: #F8FAFC !important;
  font-size: 0.92rem;
  height: 48px;
  padding-left: 2.85rem !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  width: 100%;
}

.input-with-icon input:focus {
  border-color: #38BDF8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  background: rgba(10, 17, 33, 0.9) !important;
  outline: none;
}

/* Custom WebKit Autofill Styling: Eliminate Yellow Autofill in Dark Theme */
.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover, 
.auth-form input:-webkit-autofill:focus, 
.auth-form input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #0A1121 inset !important;
  -webkit-text-fill-color: #F8FAFC !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: #38BDF8;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 2.85rem !important;
}

.btn-toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.4rem;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
  z-index: 2;
}

.btn-toggle-password:hover {
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.08);
}

/* Caps Lock Warning Banner */
.caps-warning {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #FCD34D;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  animation: slideDownFade 0.2s ease-out;
}

.caps-warning.hidden {
  display: none;
}

.caps-warning svg {
  flex-shrink: 0;
  color: #FBBF24;
}

/* Submit Button & Micro-Interactions */
.btn-auth-submit {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  height: 48px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #FFFFFF !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-auth-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.btn-auth-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}

.btn-auth-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
  display: inline-block;
  margin-right: 0.6rem;
  vertical-align: middle;
}

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

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-security-notice {
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.75rem;
  color: #A7F3D0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  text-align: center;
  line-height: 1.35;
}

.auth-security-notice svg {
  color: #34D399;
  flex-shrink: 0;
}

/* Modern Feature Toggle Pill */
.feature-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.feature-toggle-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.feature-toggle-pill:active {
  transform: translateY(0);
}

.feature-toggle-pill:focus-visible {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Active State: Emerald Green Glow */
.feature-toggle-pill.is-active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.feature-toggle-pill.is-active:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.6);
}

/* Inactive State: Subtle Red / Muted */
.feature-toggle-pill.is-inactive {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.28);
  color: #f87171;
}

.feature-toggle-pill.is-inactive:hover {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Glowing Indicator Dot */
.toggle-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.feature-toggle-pill.is-active .toggle-indicator-dot {
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8), 0 0 2px #10b981;
}

.feature-toggle-pill.is-inactive .toggle-indicator-dot {
  background-color: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* Label */
.toggle-pill-label {
  font-weight: 600;
  line-height: 1;
}

/* Embedded Micro-Switch Slider */
.toggle-pill-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.22s ease;
  flex-shrink: 0;
}

.feature-toggle-pill.is-active .toggle-pill-switch {
  background: #10b981;
}

.feature-toggle-pill.is-inactive .toggle-pill-switch {
  background: rgba(255, 255, 255, 0.18);
}

.toggle-pill-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-toggle-pill.is-active .toggle-pill-thumb {
  transform: translateX(14px);
}

.feature-toggle-pill.is-inactive .toggle-pill-thumb {
  transform: translateX(0);
}

/* Disabled Feature Notice Box */
.feature-disabled-notice {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.25rem;
  margin-top: 1rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px dashed rgba(239, 68, 68, 0.28);
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.45;
  transition: all 0.25s ease;
}

.feature-disabled-notice .notice-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   PRO PROFILE TAB - MODERN SAAS FINTECH AESTHETICS
   ========================================================================== */
.profile-hero-card {
  position: relative;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(13, 21, 39, 0.95) 0%, rgba(20, 31, 56, 0.85) 100%);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

body.theme-light .profile-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border-color: var(--border-color);
}

.profile-hero-bg {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(139, 92, 246, 0.08) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.profile-hero-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.75rem;
  z-index: 1;
}

.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  min-width: 280px;
}

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-lg {
  width: 76px;
  height: 76px;
  font-size: 1.85rem;
  font-weight: 800;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.15);
}

.profile-avatar-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.profile-hero-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-hero-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  margin-right: 4px;
}

.badge-subtle {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.74rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-family: var(--font-mono);
}

.profile-hero-name {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.profile-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

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

.profile-meta-dot {
  color: var(--border-color);
}

.profile-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.profile-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 145px;
}

body.theme-light .profile-stat-box {
  background: #f8fafc;
}

.profile-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.profile-stat-val {
  font-size: 0.95rem;
  font-weight: 700;
}

/* Grid & Cards */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.profile-section-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-section-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.card-header-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-header-icon-box.bg-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.card-header-icon-box.bg-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.profile-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Modern Input with Icon */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-with-icon input {
  width: 100%;
  padding-left: 44px !important;
  font-size: 0.95rem;
  height: 46px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.input-with-icon input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}

.input-with-icon.password-input-wrap input {
  padding-right: 44px !important;
}

.btn-toggle-pw {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.btn-toggle-pw:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.form-hint {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.security-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 1.15rem 0 1.5rem 0;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.security-checklist .check-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.security-checklist .check-icon {
  color: #10b981;
  font-weight: 800;
}

.btn-profile-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 46px;
  font-weight: 600;
  font-size: 0.95rem;
  width: 100%;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Security Trust Footer */
.profile-security-pills-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.sec-pill {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.sec-pill-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.sec-pill-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sec-pill-text strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.sec-pill-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   DASHBOARD CALENDAR - MODERN SAAS FINTECH AESTHETICS
   ========================================================================== */
.dashboard-calendar-card {
  position: relative;
  overflow: hidden;
}

.calendar-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

body.theme-light .calendar-filter-bar {
  background: #f1f5f9;
}

.calendar-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.calendar-filter-chip:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.calendar-filter-chip input[type="checkbox"] {
  cursor: pointer;
  margin: 0;
  accent-color: var(--color-primary);
  width: 13px;
  height: 13px;
}

.filter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-var { background-color: #F59E0B; }
.dot-fijo { background-color: #3B82F6; }
.dot-deuda { background-color: #EF4444; }
.dot-ahorro { background-color: #10B981; }
.dot-inversion { background-color: #8B5CF6; }

.calendar-month-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

body.theme-light .calendar-month-nav {
  background: #f1f5f9;
}

.calendar-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

body.theme-light .calendar-summary-strip {
  background: #f8fafc;
}

.cal-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cal-summary-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cal-summary-val {
  font-size: 0.98rem;
  font-weight: 700;
}

.calendar-container {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.5);
  overflow: hidden;
}

body.theme-light .calendar-container {
  background: #ffffff;
}

.calendar-weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  padding: 0.6rem 0;
}

body.theme-light .calendar-weekdays-grid {
  background: #f1f5f9;
}

.cal-weekday {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-weekday.cal-weekend {
  color: #94a3b8;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-color);
}

.cal-day-cell {
  min-height: 94px;
  background: var(--bg-card);
  padding: 0.45rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: all 0.16s ease;
  position: relative;
  outline: none;
}

body.theme-light .cal-day-cell {
  background: #ffffff;
}

.cal-day-cell:hover:not(.is-empty) {
  background: rgba(59, 130, 246, 0.08);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.4);
  z-index: 2;
}

.cal-day-cell:focus-visible {
  box-shadow: inset 0 0 0 2px var(--color-primary);
  z-index: 2;
}

.cal-day-cell.is-empty {
  background: rgba(255, 255, 255, 0.015);
  cursor: default;
  pointer-events: none;
}

body.theme-light .cal-day-cell.is-empty {
  background: #f8fafc;
}

.cal-day-cell.is-weekend {
  background: rgba(255, 255, 255, 0.018);
}

body.theme-light .cal-day-cell.is-weekend {
  background: #fafafa;
}

.cal-day-cell.is-today {
  background: rgba(59, 130, 246, 0.07);
  box-shadow: inset 0 0 0 1.5px rgba(59, 130, 246, 0.7);
}

.cal-cell-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cal-cell-day-num {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.cal-cell-day-num.badge-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.78rem;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.cal-badge-today-text {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0.03em;
}

.cal-cell-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.cal-cell-amount {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-success);
  line-height: 1.15;
}

.cal-cell-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 2px;
}

.cal-pill {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1.2;
}

.pill-var {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.pill-fijo {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.pill-deuda {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.pill-ahorro {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.pill-inversion {
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.cal-pill.pill-ingreso {
  background: rgba(16, 185, 129, 0.16);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.pill-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: inline-block;
}

.pill-dot.dot-ingreso {
  background: #10B981;
}

.badge-accent-subtle {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}


.cal-cell-empty-dash {
  color: var(--text-muted);
  opacity: 0.35;
  font-size: 0.8rem;
  text-align: center;
}

/* Detail Modal Styles */
.cal-detail-item {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  transition: background 0.15s ease;
}

body.theme-light .cal-detail-item {
  background: #f8fafc;
}

.cal-detail-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.theme-light .cal-detail-item:hover {
  background: #f1f5f9;
}

.cal-detail-item.item-variable {
  border-left: 3.5px solid #F59E0B;
}

.cal-detail-item.item-fixed {
  border-left: 3.5px solid #3B82F6;
}

.cal-detail-item.item-debt {
  border-left: 3.5px solid #EF4444;
}

.cal-detail-item.item-saving {
  border-left: 3.5px solid #10B981;
}

.cal-detail-item.item-investment {
  border-left: 3.5px solid #8B5CF6;
}

/* ==========================================================================
   GESTOR MULTITARJETA DE CREDITO (OPCION B)
   ========================================================================== */
.credit-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.tc-plastic-card {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tc-plastic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.25);
}

.tc-plastic-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--card-accent-color, #10b981);
  opacity: 0.18;
  filter: blur(30px);
  pointer-events: none;
}

.tc-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.tc-chip-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tc-chip-icon {
  width: 30px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-block;
  position: relative;
}

.tc-chip-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.3);
}

.tc-bank-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.tc-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
  letter-spacing: 0.2px;
}

.tc-balances-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.65rem;
}

.tc-balance-box .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: block;
}

.tc-balance-box .amount {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  color: #fff;
}

.tc-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.tc-progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.tc-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tc-actions {
  display: flex;
  gap: 0.4rem;
}

.tc-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tc-action-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}

.tc-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
}

.cal-detail-item.item-credit_card {
  border-left: 3.5px solid #10B981;
}

.cal-detail-item.item-credit_card_closing {
  border-left: 3.5px solid #64748B;
  opacity: 0.85;
}

/* ==========================================================================
   Expenses Compact 5-Column Table & Grid Cards
   ========================================================================== */
#expenses-table {
  min-width: 600px;
}

.expense-date-col {
  white-space: nowrap;
  width: 110px;
}

.expense-concept-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 220px;
}

.expense-amount-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  white-space: nowrap;
}

.expenses-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.expense-mobile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.expense-mobile-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.exp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.exp-card-desc {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.exp-card-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.exp-card-amount {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

.exp-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

/* ==========================================================================
   Dedicated Savings & Investments Layout & Responsive
   ========================================================================== */
.savings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.savings-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.savings-investments-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.debts-column.full-width {
  width: 100%;
}

@media (max-width: 992px) {
  .debts-workspace-split {
    grid-template-columns: 1fr;
  }
  
  .savings-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .savings-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ==========================================================================
   Incomes Section Styles & Responsive
   ========================================================================== */
.incomes-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.incomes-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.incomes-filter-bar {
  display: flex;
  gap: 0.75rem;
  padding: 0 1.25rem 1rem 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Mobile-only helper - strictly hidden on desktop */
.mobile-only {
  display: none !important;
}

.incomes-mobile-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (max-width: 992px) {
  .incomes-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .incomes-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .incomes-filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem 0.85rem 1rem;
  }
  .incomes-filter-bar .filter-group {
    width: 100%;
    min-width: 100%;
  }
}

#dash-debts-breakdown-table th,
#dash-debts-breakdown-table td {
  padding: 0.65rem 0.85rem;
  font-size: 0.84rem;
}

