/* ============================================
   VARIABLES Y RESET - FINANZAS PERSONALES PREMIUM
   ============================================ */
:root {
  /* Design System: Emerald Night & Obsidian Gold */
  --p-emerald: #0d9488;
  --p-obsidian: #020617;
  --p-gold: #fbbf24;

  /* Premium Purple Palette (New) */
  --p-purple-deep: #2e1065;
  --p-purple-main: #6030D6;
  --p-purple-light: #9964FF;
  --p-purple-glow: rgba(153, 100, 255, 0.4);
  
  --primary-color: var(--p-purple-main);
  --secondary-color: #4f46e5;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #06b6d4;
  --income-color: #10b981;
  --expense-color: #ef4444;

  /* Backgrounds */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --bg-header: var(--p-purple-main);
  --bg-modal: rgba(0, 0, 0, 0.6);

  /* Texts */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-light: #ffffff;
  --text-muted: #94a3b8;

  /* Borders & Shadows */
  --border-color: #e2e8f0;
  --border-radius: 16px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

  /* Layout */
  --sidebar-width: 280px;
  --header-height: 70px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Login System (Premium) */
  --login-bg: #030712;
  --login-card-bg: rgba(255, 255, 255, 0.05);
  --login-card-border: rgba(255, 255, 255, 0.1);
  --login-input-bg: rgba(255, 255, 255, 0.04);
  --login-input-border: rgba(255, 255, 255, 0.1);
}

body.dark-theme {
  --bg-primary: #030712;
  --bg-secondary: #0f172a;
  --bg-card: #111827;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --login-gradient: linear-gradient(135deg, #030712 0%, #111827 100%);
  
  /* Glass effects for Dark Mode */
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
}

body.dark-theme .login-container {
  background: rgba(15, 23, 42, 0.8) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset !important;
}

body.dark-theme .login-form-wrapper {
  background: #1e293b !important;
}

body.dark-theme .login-header h2 {
  color: #f1f5f9 !important;
}

body.dark-theme .input-group-modern {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-theme .input-group-modern:focus-within {
  background: #1e293b !important;
  border-color: var(--primary-color) !important;
}

body.dark-theme .checkbox-modern {
  color: #94a3b8 !important;
}

body.dark-theme .checkmark {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

/* Accounts Page Dark Mode */
body.dark-theme .page-header h1 {
  color: #f1f5f9 !important;
}

body.dark-theme .page-header p {
  color: #94a3b8 !important;
}

body.dark-theme .dashboard-section {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .dashboard-section span[style*="background: rgba(0,0,0,0.05)"] {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #60a5fa !important;
}

body.dark-theme .dashboard-section h3 {
  color: #f1f5f9 !important;
}

body.dark-theme .dashboard-section small {
  color: #94a3b8 !important;
}

body.dark-theme .dashboard-section div[style*="font-size: 2rem"] {
  color: #f1f5f9 !important;
}

body.dark-theme .dashboard-section div[style*="border-top: 1px dashed #e2e8f0"] {
  border-top-color: #334155 !important;
}

body.dark-theme .dashboard-section div[style*="color: #64748b"] {
  color: #94a3b8 !important;
}

body.dark-theme .dashboard-section span[style*="color: #1e293b"] {
  color: #f1f5f9 !important;
}

/* Global Form Controls & Modals Dark Mode */
body.dark-theme .form-control {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}

body.dark-theme .form-control::placeholder {
  color: #64748b !important;
}

body.dark-theme label {
  color: #94a3b8 !important;
}

body.dark-theme .modal-header {
  background: #1e293b !important;
  border-bottom-color: #334155 !important;
}

body.dark-theme .modal-header h2 {
  color: #f1f5f9 !important;
}

body.dark-theme .modal-content form {
  background: #1e293b !important;
}

body.dark-theme .modal-content .btn-secondary {
  background: #334155 !important;
  color: #f1f5f9 !important;
  border-color: #475569 !important;
}

body.dark-theme .quick-action-card:hover {
  background: #1e293b !important;
}

body.dark-theme .quick-action-card:hover {
  background: #1e293b !important;
}

body.dark-theme .bento-item-standard,
body.dark-theme .bento-item-control,
body.dark-theme .formula-item,
body.dark-theme .filters-panel-dashboard {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
  color: #f1f5f9 !important;
}

body.dark-theme .quick-action-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .quick-action-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--p-purple-light) !important;
  transform: translateY(-5px);
}

/* Base Dashboard Hero Styles (Original Light Mode Restoration) */
.welcome-hero {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.welcome-hero h1 {
  color: #0f172a !important;
}

.welcome-hero p {
  color: #64748b !important;
}

.hero-date-box {
  background: #f8fafc !important;
  color: #94a3b8 !important;
}

.balance-bubble {
  background: #f0f7ff !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.05) !important;
}

.balance-bubble small {
  color: #64748b !important;
}

.balance-amount {
  color: #1e40af !important;
}

.btn-detail-accounts {
  background: #ffffff !important;
  color: #2563eb !important;
  border: 1px solid #e0e7ff !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.btn-detail-accounts:hover {
  background: #f8fafc !important;
  transform: translateY(-1px);
}

.filters-panel-dashboard {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

.bento-item-standard,
.bento-item-control {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03) !important;
}

.quick-action-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

.quick-action-card:hover {
  background: #f1f5f9 !important;
  transform: translateY(-3px);
}

.formula-item:hover {
  transform: translateY(-3px);
}

.dashboard-alert[data-status="upcoming"] {
  background: #f0f7ff !important;
}

.dashboard-alert[data-status="today"] {
  background: #fffbeb !important;
}

.dashboard-alert[data-status="overdue"] {
  background: #fef2f2 !important;
}

.alert-icon-box {
  background: #ffffff !important;
}

.empty-alerts {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

/* Dark Mode Overrides (Only apply when .dark-theme is present) */
body.dark-theme .welcome-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #030712 100%) !important;
  border-color: var(--glass-border) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .welcome-hero .hero-bg-shell {
  background: rgba(15, 23, 42, 0.4) !important;
  backdrop-filter: blur(10px);
}

body.dark-theme .welcome-hero h1 {
  color: #ffffff !important;
}

body.dark-theme .welcome-hero p {
  color: #94a3b8 !important;
}

body.dark-theme .hero-date-box {
  background: #030712 !important;
  color: #64748b !important;
}

body.dark-theme .balance-bubble {
  background: rgba(37, 99, 235, 0.1) !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  box-shadow: none !important;
}

body.dark-theme .balance-bubble small {
  color: #94a3b8 !important;
}

body.dark-theme .balance-amount {
  color: #60a5fa !important;
}

body.dark-theme .btn-detail-accounts {
  background: #0f172a !important;
  color: #60a5fa !important;
  border-color: #334155 !important;
  box-shadow: none !important;
}

body.dark-theme .filters-panel-dashboard,
body.dark-theme .bento-item-standard,
body.dark-theme .bento-item-control,
body.dark-theme .formula-item {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

body.dark-theme .quick-action-card {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

body.dark-theme .quick-action-card:hover {
  background: #1e293b !important;
}

body.dark-theme .dashboard-alert {
  background: rgba(30, 41, 59, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .alert-icon-box {
  background: #0f172a !important;
}

body.dark-theme .empty-alerts {
  background: #0f172a !important;
}

body.dark-theme .formula-container {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .formula-container h3 {
  color: #94a3b8 !important;
}

body.dark-theme .formula-value {
  color: #f1f5f9 !important;
}

body.dark-theme .formula-label {
  color: #94a3b8 !important;
}

body.dark-theme .streak-badge-modern {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 140, 0, 0.4) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .streak-badge-modern i {
  color: #f59e0b !important;
}

body.dark-theme .streak-badge-modern span {
  color: #fbd38d !important;
}

/* Transactions Mobile Card View Dark Mode */
body.dark-theme .transaction-card {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .transaction-card h4 {
  color: #f1f5f9 !important;
}

body.dark-theme .transaction-card .meta {
  color: #94a3b8 !important;
}

body.dark-theme .transaction-card .badge-mini {
  background: #0f172a !important;
  color: #64748b !important;
}

body.dark-theme .summary-card-mobile {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

body.dark-theme .summary-card-mobile span {
  color: #94a3b8 !important;
}

body.dark-theme .transaction-card .icon-box {
  background: #0f172a !important;
}

/* Transaction Filters Dark Mode */
body.dark-theme .filters-container {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .filter-group label {
  color: #94a3b8 !important;
}

body.dark-theme .filter-group label i {
  color: #60a5fa !important;
}

body.dark-theme .filter-select,
body.dark-theme .filter-input {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}

body.dark-theme .filter-select:focus,
body.dark-theme .filter-input:focus {
  background-color: #1e293b !important;
  border-color: #2563eb !important;
}

body.dark-theme .btn-refresh {
  background: #334155 !important;
  color: #f1f5f9 !important;
}

body.dark-theme .btn-refresh:hover {
  background: #475569 !important;
  color: #ffffff !important;
}

body.dark-theme .pagination-top a,
body.dark-theme .pagination-top span {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ============================================
   HEADER MÓVIL VIBRANTE Y MEJORADO
   ============================================ */
/* Mobile Header Removed - styles deprecated */

.mobile-header h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
}

.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: 0.2s;
}

.menu-toggle:active,
.menu-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.06);
}

/* Overlay */
.sidebar-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99999;
  /* Below bottom-nav and modals */
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
  will-change: opacity;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   SIDEBAR MEJORADO Y ESPACIOSO
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  color: var(--text-light);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  transition: transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 32px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.sidebar-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-light);
  letter-spacing: -0.5px;
}

.sidebar-nav {
  padding: 20px 0;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  margin: 2px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-group-items .nav-item {
  padding-left: 20px;
  /* Indent sub-items */
  margin: 2px 10px 2px 20px;
  font-size: 13px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 8px 8px 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  transform: translateX(4px);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.2);
  /* Softer active state for subitems */
  color: var(--accent-cyan);
  border-left-color: var(--accent-cyan);
  font-weight: 600;
}

.nav-group-items .nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  border-left: 3px solid var(--accent-cyan);
}

.nav-item i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* Accordion Group Headers */
.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  color: var(--text-light);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
  user-select: none;
}

.nav-group-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-group.active .nav-group-header {
  color: var(--accent-cyan);
}

.nav-group-header .arrow {
  font-size: 12px;
  transition: transform 0.3s;
  color: rgba(255, 255, 255, 0.4);
}

.nav-group.active .nav-group-header .arrow {
  transform: rotate(90deg);
  color: var(--accent-cyan);
}

.nav-group-items {
  display: none;
  /* Hidden by default */
  background: rgba(0, 0, 0, 0.2);
  padding: 5px 0;
}

.nav-group-items.open {
  display: block;
}

.sidebar-footer {
  padding: 24px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* Sidebar Responsive Logic */
/* Sidebar Responsive Logic */
@media (max-width: 768px) {
  /* mobile-header was removed, so we don't need this display flex rules for it */

  .sidebar {
    transform: translateX(-100%);
    /* Changed from -110% for cleaner edge */
    width: 280px;
    /* Fixed width for consistency */
    max-width: 85%;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0 !important;
    padding-top: 0;
    /* Removed old padding since Top Header is sticky inside */
  }

  .top-header {
    padding: 0 15px;
    /* Smaller padding on mobile */
  }
}

@media (min-width: 769px) {
  .sidebar {
    transform: none !important;
    position: fixed;
    z-index: 999;
    box-shadow: none;
  }

  .sidebar-overlay {
    display: none !important;
  }

  .main-content {
    margin-left: var(--sidebar-width);
  }
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  background: var(--bg-primary);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.main-footer {
  text-align: center;
  padding: 15px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  margin-top: auto;
  /* Push to bottom if content is short */
}

/* TOP HEADER STYLES */
.top-header {
  height: var(--header-height);
  background: linear-gradient(to right, #0f172a, #1e293b);
  /* Dark theme matching sidebar tone */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  /* Stronger shadow for floating effect */
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--text-light);
}

.header-left {
  display: flex;
  align-items: center;
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-light);
  /* White icon */
  cursor: pointer;
  display: none;
  /* Hidden by default, shown on mobile if needed or if sidebar is toggleable */
  margin-right: 15px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-premium-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
  transition: transform 0.2s;
}

.btn-premium-nav:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4);
}

.user-profile-dropdown {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  transition: background 0.2s;
  position: relative;
  /* For absolute dropdown positioning */
}

.user-profile-dropdown:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-lg);
  border-radius: 12px;
  min-width: 200px;
  border: 1px solid var(--border-color);
  z-index: 1000;
  overflow: hidden;
  animation: fadeIn 0.15s ease;
  color: var(--text-primary);
  /* Reset text color for dropdown content */
}

/* ... existing dropdown styles ... */
/* Ensure user name in header is white */
.user-name-head {
  font-weight: 600;
  color: var(--text-light);
  font-size: 14px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-lg);
  border-radius: 12px;
  min-width: 200px;
  border: 1px solid var(--border-color);
  z-index: 1000;
  overflow: hidden;
  animation: fadeIn 0.15s ease;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: #f1f5f9;
}

.dropdown-item.text-danger {
  color: var(--danger-color);
}

.dropdown-item.text-danger:hover {
  background: #fef2f2;
}

.dropdown-divider {
  border-top: 1px solid var(--border-color);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.user-name-head {
  font-weight: 600;
  color: var(--text-light);
  /* White text for dark header */
  font-size: 14px;
}

.content-wrapper {
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 768px) {
  .content-wrapper {
    padding: 15px 10px;
    /* Reduced padding on mobile */
  }
}

@media (max-width: 768px) {
  .top-header {
    padding: 0 16px;
  }

  .menu-toggle {
    display: block;
    /* Show menu toggle in top header on mobile if we hide the other one */
  }

  /* If keeping original mobile header, we might have two headers. 
     Let's hide the old mobile-header or integrate. 
     For now, assuming user wants THIS new header to be the main one. */

  .user-name-head {
    display: none;
    /* Hide name on small screens */
  }
}

/* ============================================
   ENCABEZADOS DE PÁGINA
   ============================================ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding: 20px 25px;
  border-radius: var(--border-radius);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  border-bottom: 4px solid var(--primary-color);
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 768px) {
  .page-header {
    padding: 15px;
    margin-bottom: 20px;
    justify-content: center;
    text-align: center;
  }

  .page-header h1 {
    font-size: 20px !important;
  }
}

.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin: 0;
}

/* Premium Main Header Styles */
.main-view-title {
  font-size: 3.8rem !important;
  font-weight: 950 !important;
  letter-spacing: 1px !important;
  line-height: 1.1 !important;
  margin-bottom: 5px !important;
  background: linear-gradient(135deg, #0f172a 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-view-title i {
  -webkit-text-fill-color: var(--primary-color);
}

.main-view-subtitle {
  font-weight: 700 !important;
  color: #64748b !important;
  letter-spacing: 2px !important;
  font-size: 0.95rem !important;
  text-transform: uppercase !important;
  margin-left: 90px !important;
  display: flex !important;
  align-items: center;
  gap: 12px;
}

.main-view-subtitle::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* Dark Mode Overrides for Premium Header */
body.dark-theme .main-view-title {
  background: linear-gradient(135deg, #f1f5f9 0%, var(--primary-color) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.dark-theme .main-view-subtitle {
  color: #94a3b8 !important;
}

/* Responsive Scaling for Premium Header */
@media (max-width: 768px) {
  .main-view-title {
    font-size: 1.8rem !important;
    gap: 10px !important;
    justify-content: center !important;
  }

  .main-view-subtitle {
    font-size: 0.65rem !important;
    margin-left: 0 !important;
    letter-spacing: 2px !important;
    justify-content: center !important;
    opacity: 0.7 !important;
  }

  .main-view-subtitle::before {
    width: 15px !important;
  }
}

/* ============================================
   COMPONENTS
   ============================================ */

/* Alertas */
.alert {
  padding: 20px 24px;
  border-radius: var(--border-radius);
  margin-bottom: 24px;
  border-left: 5px solid;
  box-shadow: var(--shadow-sm);
  animation: slideIn 0.4s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.alert-success {
  background: #ecfdf5;
  border-left-color: var(--success-color);
  color: #065f46;
}

.alert-error {
  background: #fef2f2;
  border-left-color: var(--danger-color);
  color: #991b1b;
}

.alert-warning {
  background: #fffbeb;
  border-left-color: var(--warning-color);
  color: #92400e;
}

.alert-info {
  background: #f0f9ff;
  border-left-color: var(--info-color);
  color: #075985;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.25);
  filter: brightness(1.1);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-success {
  background: var(--accent-green);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--accent-red);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

/* Formularios */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-size: 14.5px;
  background: #f8fafc;
  font-family: inherit;
  color: var(--text-primary);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background: #ffffff;
  transform: translateY(-1px);
}

.filters-section {
  margin-bottom: 20px;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

/* Modales */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-modal);
  z-index: 2000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  margin: auto;
  overflow-y: auto;
  animation: modalEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

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

.modal-header {
  background: #ffffff;
  color: var(--text-primary);
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #f1f5f9;
}

.modal-header h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.close {
  color: #64748b;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Tablas */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  background: var(--bg-secondary);
}

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

.table th {
  background-color: var(--bg-sidebar);
  color: var(--text-light);
  padding: 18px 20px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
}

.table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #f8fafc;
}

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

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

/* Cards & Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 28px;
  margin-top: 28px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.dashboard-section {
  background: var(--bg-secondary);
  padding: 28px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.dashboard-section h3 {
  margin-bottom: 20px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
  font-size: 18px;
}

.metric-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.metric-card {
  background: var(--bg-primary);
  padding: 15px;
  border-radius: 12px;
  text-align: center;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.metric-value {
  font-size: 20px;
  font-weight: 800;
}

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

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

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

.metric-value.negative {
  color: var(--danger-color);
}

/* Checklist */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-primary);
  border-radius: 10px;
  font-size: 14px;
}

.checklist-item.completed {
  color: var(--success-color);
  font-weight: 600;
}

/* ============================================
   LOGIN PAGE REDESIGN
   ============================================ */
.login-page {
  background: var(--login-gradient);
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--login-mesh);
  z-index: 1;
}

/* Background Shapes */
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.6;
  animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.2);
  top: -100px;
  left: -100px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: rgba(139, 92, 246, 0.15);
  bottom: -50px;
  right: -50px;
  animation-delay: -5s;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: rgba(6, 182, 212, 0.15);
  top: 40%;
  right: 15%;
  animation-delay: -10s;
}

.shape-4 {
  width: 200px;
  height: 200px;
  background: rgba(236, 72, 153, 0.1);
  bottom: 20%;
  left: 10%;
  animation-delay: -15s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  33% {
    transform: translate(30px, 50px) rotate(10deg) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) rotate(-10deg) scale(0.9);
  }

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

.login-container {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  overflow: hidden;
  position: relative;
  z-index: 10;
  animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }

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

.login-hero {
  padding: 60px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.08));
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-color);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-color);
  width: fit-content;
  margin-bottom: 30px;
}

.login-hero h1 {
  font-size: 42px;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-hero p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 480px;
}

.features-grid {
  display: grid;
  gap: 25px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.f-icon {
  width: 44px;
  height: 44px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary-color);
  flex-shrink: 0;
  border: 1px solid rgba(16, 185, 129, 0.1);
}

.f-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.f-text span {
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-footer {
  margin-top: 60px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Form Styles */
.login-form-wrapper {
  padding: 50px;
  display: flex;
  align-items: center;
  background: white;
}

.login-box {
  width: 100%;
}

.logo-container-modern {
  width: 60px;
  height: 60px;
  background: #f1f5f9;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.login-logo {
  width: 40px;
  height: auto;
}

.login-header h2 {
  font-size: 28px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 8px;
}

.login-header p {
  color: #64748b;
  margin-bottom: 35px;
}

/* Input Modernized */
.input-group-modern {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  margin-bottom: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.input-group-modern:hover {
  border-color: #cbd5e1;
}

.input-group-modern:focus-within {
  background: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1),
    0 10px 15px -3px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.input-group-modern input {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 12px 0 !important;
  width: 100%;
  color: var(--text-primary);
  font-size: 15px;
  height: auto;
}

.input-group-modern input:focus {
  outline: none !important;
}

.input-group-modern .input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.input-group-modern .icon-wrapper {
  width: 24px;
  margin-right: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.input-group-modern label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.password-toggle {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  font-size: 16px;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--primary-color);
}

.checkbox-modern {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  user-select: none;
  font-size: 14px;
  color: #475569;
}

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

.checkmark {
  height: 20px;
  width: 20px;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  transition: all 0.2s;
}

.checkbox-modern:hover input~.checkmark {
  background-color: #e2e8f0;
}

.checkbox-modern input:checked~.checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

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

.btn-login-modern {
  width: 100%;
  height: 56px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.25);
  transition: all 0.3s;
  margin-top: 25px;
}

.btn-login-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(59, 130, 246, 0.4);
  filter: brightness(1.05);
}

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

.login-footer {
  margin-top: 30px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
}

.login-footer a {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .login-container {
    max-width: 900px;
  }

  .login-hero {
    padding: 40px;
  }
}

@media (max-width: 900px) {
  .login-container {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .login-hero {
    display: none;
  }

  .login-form-wrapper {
    padding: 40px 30px;
  }
}

/* ============================================
   RESPONSIVE TABLES (GENERIC)
   ============================================ */
@media (max-width: 768px) {

  .table-responsive table,
  .table-responsive thead,
  .table-responsive tbody,
  .table-responsive th,
  .table-responsive td,
  .table-responsive tr {
    display: block;
  }

  .table-responsive thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .table-responsive tr {
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    padding: 12px;
    box-shadow: var(--shadow-sm);
  }

  .table-responsive td {
    border: none;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 10px;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
  }

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

  .table-responsive td:before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-secondary);
    margin-right: 16px;
    text-align: left;
  }
}

/* Batch Transactions Modal Styles */
.modal-lg {
  max-width: 1000px;
}

.transaction-type-selector {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 25px;
}

.type-option input {
  display: none;
}

.type-option .option-box {
  padding: 15px 30px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  transition: all 0.2s;
  opacity: 0.6;
}

.type-option input:checked+.option-box {
  opacity: 1;
  border-color: currentColor;
  background: rgba(0, 0, 0, 0.02);
  transform: scale(1.05);
}

.option-ingreso {
  color: var(--income-color);
}

.option-egreso {
  color: var(--expense-color);
}

/* Monthly Grid Layout in Modals */
.monthly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 10px;
}

.month-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.month-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-blue);
}

.month-card h4 {
  margin-bottom: 15px;
  font-size: 18px;
  color: var(--accent-blue);
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 10px;
}

.month-stat {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

.month-stat span:last-child {
  font-weight: 700;
  color: var(--text-primary);
}

.month-total {
  font-size: 18px;
  margin-top: 10px;
  font-weight: 800;
  color: var(--text-primary);
}

.month-card.active-month {
  border: 2px solid var(--accent-blue);
  background: #eff6ff;
}

.batch-rows-container {
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 5px;
}

.batch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  background: var(--bg-primary);
  padding: 10px;
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

.row-inputs {
  display: flex;
  flex: 1;
  gap: 10px;
  flex-wrap: wrap;
}

.input-group {
  flex: 1;
  min-width: 120px;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 6px 10px;
  /* More compact */
  font-size: 13px;
  /* Smaller font */
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.date-input {
  flex: 0 0 130px;
}

.amount-input {
  flex: 0 0 100px;
}

.desc-input {
  flex: 2;
  min-width: 180px;
}

.cat-input {
  flex: 0 0 150px;
}

.welcome-hero {
  background: white;
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 30px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 74, 173, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.8);
  overflow: hidden;
}

.welcome-hero h1 {
  font-size: 32px;
  color: #1e293b;
  font-weight: 800;
  margin: 0;
}

.welcome-hero p {
  color: #64748b;
  font-size: 16px;
  margin-top: 5px;
}

.balance-bubble {
  background: #f1f5f9;
  padding: 20px 30px;
  border-radius: 16px;
  text-align: right;
  min-width: 250px;
}

.balance-bubble small {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 5px;
}

.balance-bubble span {
  font-size: 28px;
  font-weight: 800;
  color: #2563eb;
}

/* Formula Section */
.formula-container {
  background: white;
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  border: 1px solid #f1f5f9;
}

.formula-grid {
  display: flex;
  align-items: center;
  justify-content: space-around;
  text-align: center;
  gap: 10px;
  flex-wrap: wrap;
}

.formula-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 150px;
}

.formula-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 20px;
  margin-bottom: 5px;
}

.formula-label {
  font-size: 14px;
  color: #64748b;
  font-weight: 600;
}

.formula-value {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
}

.formula-operator {
  width: 40px;
  height: 40px;
  background: #2563eb;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}

.formula-operator.equal {
  background: #eab308;
}

/* Filters */
.dashboard-filters {
  background: #f8fafc;
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 30px;
  display: flex;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
  border: 1px solid #e2e8f0;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  /* Reduced gap */
}

.filter-group label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.filter-group select,
.filter-group input {
  padding: 8px 12px;
  /* Thinner */
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: white;
  font-size: 13px;
  /* Smaller font */
  min-width: 120px;
  /* Reduced min-width */
}

/* Calendar Mode */
.calendar-view {
  background: white;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  border: 1px solid #f1f5f9;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e2e8f0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.calendar-header-day {
  background: #f8fafc;
  padding: 15px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: #64748b;
}

.calendar-day {
  background: white;
  min-height: 120px;
  padding: 10px;
  position: relative;
  transition: background 0.2s;
}

.calendar-day:hover {
  background: #f1f5f9;
}

.calendar-day-num {
  font-weight: 700;
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 10px;
  display: block;
}

.calendar-day.today .calendar-day-num {
  color: #2563eb;
  background: #eff6ff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-totals {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.day-total {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: block;
}

.day-total.inc {
  background: #dcfce7;
  color: #166534;
}

.day-total.exp {
  background: #fee2e2;
  color: #991b1b;
}

.view-toggles {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.toggle-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

@media (max-width: 768px) {
  .welcome-hero {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding: 25px 20px;
    /* More compact */
  }

  .welcome-hero h1 {
    font-size: 22px;
    /* Smaller heading */
  }

  .balance-bubble {
    width: 100%;
    text-align: center;
    padding: 15px;
    min-width: auto;
  }

  .balance-bubble span {
    font-size: 22px;
  }

  .dashboard-filters {
    padding: 15px;
    gap: 12px;
    justify-content: center;
    /* Centered */
  }

  .filter-group {
    width: 100%;
    /* Full width for stacking on smaller phones */
    max-width: 300px;
  }

  .filter-group select,
  .filter-group input {
    width: 100%;
    min-width: auto;
  }

  .formula-container {
    padding: 20px 15px;
  }

  .formula-grid {
    gap: 8px;
  }

  .formula-item {
    min-width: 100px;
    gap: 8px;
  }

  .formula-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .formula-value {
    font-size: 18px;
  }
}

.btn-remove-row {
  background: none;
  border: none;
  color: var(--danger-color);
  cursor: pointer;
  padding: 5px;
  opacity: 0.6;
  transition: 0.2s;
}

.btn-remove-row:hover {
  opacity: 1;
  transform: scale(1.1);
}

.btn-add-row {
  margin-top: 15px;
  border-style: dashed;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-summary {
  font-size: 18px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .row-inputs {
    flex-direction: column;
    gap: 8px;
  }

  .input-group {
    width: 100%;
    flex: auto;
  }

  .batch-row {
    flex-direction: column;
    align-items: stretch;
    position: relative;
    padding: 15px 10px;
    gap: 12px;
  }

  .btn-remove-row {
    position: absolute;
    top: 5px;
    right: 5px;
  }

  /* Additional Form Compaction for Mobile */
  .card-body {
    padding: 15px !important;
  }

  .form-control {
    font-size: 14px !important;
    padding: 8px 12px !important;
  }

  label {
    font-size: 12px !important;
    margin-bottom: 4px !important;
  }
}

.badge {
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--income-color);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--expense-color);
}

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

.text-danger {
  color: var(--expense-color);
}

.btn-outline-danger {
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
  background: transparent;
}

.btn-outline-danger:hover {
  background: var(--danger-color);
  color: white;
}

/* ============================================
   ESTILOS DE IMPRESIÓN (PDF)
   ============================================ */
@media print {

  /* Ocultar elementos de navegación y UI no deseados */
  .sidebar,
  .mobile-header,
  .menu-toggle,
  .sidebar-overlay,
  .no-print,
  button,
  .btn,
  nav,
  .page-header button,
  .page-header form,
  footer,
  .main-footer {
    display: none !important;
  }

  /* Ajustes de layout generales */
  body,
  .main-content,
  .app-container {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    color: black !important;
    overflow: visible !important;
  }

  .main-content {
    margin-left: 0 !important;
  }

  .content-wrapper {
    padding: 20px !important;
    max-width: 100% !important;
  }

  /* Mostrar Header de Impresión */
  .print-header {
    display: block !important;
  }

  /* Mostrar Detalles de Impresión */
  .print-details {
    display: block !important;
  }

  /* Ajustes de Grilla para Impresión */
  .dashboard-grid,
  .cards-grid {
    display: block !important;
    /* Block suele ser mejor para evitar cortes raros en grid */
    margin-top: 20px !important;
  }

  .dashboard-section,
  .card {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
    page-break-inside: avoid;
    /* Evitar que se partan a la mitad */
  }

  .card h3,
  .dashboard-section h3 {
    color: #333 !important;
    border-bottom: 1px solid #eee !important;
  }

  /* Gráficos */
  .chart-section {
    width: 48% !important;
    /* Intentar poner gráficos side-by-side si caben */
    display: inline-block !important;
    margin-right: 1% !important;
    vertical-align: top;
    page-break-inside: avoid;
  }

  .graphic-section {
    text-align: center;
  }

  .chart-wrapper {
    height: 250px !important;
    /* Reducir altura para imprimir mejor */
  }

  .metric-cards {
    display: flex !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  .metric-card {
    border: 1px solid #eee !important;
    flex: 1;
  }

  /* Textos y Colores */
  .text-success,
  .text-danger,
  .text-primary,
  .text-warning {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Tablas de impresión */
  .table-bordered th,
  .table-bordered td {
    border: 1px solid #ccc !important;
  }

  /* Forzar saltos de página limpios */
  .section-break {
    page-break-inside: avoid;
    margin-top: 30px;
  }

  /* Resetear colores de fondo para ahorrar tinta, excepto donde importa */
  .bg-primary,
  .bg-secondary {
    background: none !important;
  }

  /* Asegurar que el modal no estorbe */
  .modal {
    display: none !important;
  }

  /* ============================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ============================================ */

  /* Mobile Header (Hamburger) - Hidden on desktop */
  .mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-card);
    align-items: center;
    padding: 0 20px;
    z-index: 1050;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .mobile-header h1 {
    font-size: 1.2rem;
    margin: 0;
    flex-grow: 1;
    text-align: center;
    color: var(--primary-color);
  }

  .menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 5px;
  }

  /* Sidebar Overlay */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1090;
    opacity: 0;
    transition: opacity 0.3s;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }

  /* MEDIA QUERIES */
  @media (max-width: 768px) {

    /* 1. Header & Layout */
    .mobile-header {
      display: flex;
    }

    .app-container {
      padding-top: 60px;
      /* Space for mobile header */
    }

    .main-content {
      margin-left: 0 !important;
      /* Remove sidebar margin */
      padding: 20px 15px;
      /* Smaller padding */
      width: 100%;
    }

    /* 2. Sidebar (Drawer Mode) */
    .sidebar {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: 280px;
      z-index: 1100;
      transform: translateX(-100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
      transform: translateX(0);
    }

    /* 3. Dashboard Grid & Cards */
    .dashboard-grid,
    .cards-grid,
    .metrics-grid {
      grid-template-columns: 1fr !important;
      /* Force single column */
      gap: 15px;
    }

    .dashboard-hero {
      flex-direction: column;
      text-align: center;
      padding: 20px;
      gap: 20px;
    }

    .live-clock {
      text-align: center;
      width: 100%;
    }

    /* 4. Tables */
    .table-responsive {
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      margin-bottom: 20px;
    }

    .table th,
    .table td {
      white-space: nowrap;
      /* Prevent ugly wrapping in tight spaces */
    }

    /* 5. Modals */
    .modal-content {
      width: 95% !important;
      margin: 10px auto;
      padding: 20px 15px;
    }

    /* 6. Typography adjustments */
    h1 {
      font-size: 1.8rem;
    }

    h2 {
      font-size: 1.5rem;
    }

    h3 {
      font-size: 1.3rem;
    }

    .status-bar {
      flex-direction: column;
      align-items: stretch;
    }

    .status-item {
      justify-content: center;
    }

    .filter-bar {
      width: 100%;
      justify-content: center;
      flex-wrap: wrap;
    }
  }

  /* ============================================
     PREMIUM LOGIN PAGE DESIGN (NEO-GLASS)
     ============================================ */
  body.login-page {
    background-color: var(--login-bg);
    background-image: 
      radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%), 
      radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%), 
      radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    position: relative;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
  }

  /* Animated Mesh Gradient Background */
  body.login-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
      radial-gradient(circle at 20% 30%, rgba(96, 48, 214, 0.15) 0%, transparent 40%),
      radial-gradient(circle at 80% 70%, rgba(153, 100, 255, 0.15) 0%, transparent 40%);
    animation: meshAmbience 20s infinite alternate ease-in-out;
    z-index: 0;
  }

  @keyframes meshAmbience {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 0.8; }
  }

  .login-container {
    display: flex;
    width: 1100px;
    max-width: 95%;
    height: 680px;
    background: var(--login-card-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 40px;
    border: 1px solid var(--login-card-border);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
    z-index: 10;
    animation: cardEntrance 1s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes cardEntrance {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* Left Side: Premium Hero */
  .login-hero {
    flex: 1.1;
    background: linear-gradient(135deg, var(--p-purple-deep) 0%, var(--p-purple-main) 100%);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    position: relative;
    overflow: hidden;
  }

  .login-hero::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(153, 100, 255, 0.2) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 1;
  }

  .hero-content {
    position: relative;
    z-index: 2;
  }

  .brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 40px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  }

  .login-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -2px;
    background: linear-gradient(to bottom, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .login-hero p {
    font-size: 1.15rem;
    opacity: 0.8;
    max-width: 440px;
    margin-bottom: 50px;
    line-height: 1.6;
    font-weight: 400;
  }

  .features-vertical {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .feature-pill {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
  }

  .feature-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(12px);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .fp-icon {
    width: 48px;
    height: 48px;
    background: var(--p-purple-glow);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }

  .fp-text strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 2px;
  }

  .fp-text span {
    font-size: 0.85rem;
    opacity: 0.6;
  }

  .hero-footer {
    position: relative;
    z-index: 2;
    opacity: 0.5;
    font-size: 0.85rem;
    font-weight: 500;
  }

  /* Right Side: Modern Form */
  .login-form-wrapper {
    flex: 1;
    background: rgba(15, 23, 42, 0.4);
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .login-box {
    width: 100%;
    max-width: 380px;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
  }

  .login-header {
    text-align: center;
    margin-bottom: 40px;
  }

  .logo-container-modern {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--login-input-bg);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--login-input-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  }

  .login-logo {
    height: 45px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  }

  .login-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    letter-spacing: -1px;
  }

  .login-header p {
    color: var(--text-muted);
    font-size: 1rem;
  }

  /* Premium Inputs */
  .input-group-modern {
    position: relative;
    margin-bottom: 24px;
    background: var(--login-input-bg);
    border: 1px solid var(--login-input-border);
    border-radius: 18px;
    padding: 10px 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .input-group-modern:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .input-group-modern:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--p-purple-light);
    box-shadow: 0 0 0 4px rgba(153, 100, 255, 0.15),
                0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
  }

  .icon-wrapper {
    color: #64748b;
    font-size: 1.2rem;
    transition: color 0.3s;
  }

  .input-group-modern:focus-within .icon-wrapper {
    color: var(--p-purple-light);
  }

  .input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .input-wrapper label {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 700;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  .input-wrapper input {
    border: none;
    background: transparent;
    padding: 4px 0 6px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
    width: 100%;
  }

  .input-wrapper input::placeholder {
    color: #475569;
  }

  .input-wrapper input:focus {
    outline: none;
    box-shadow: none;
  }

  .password-toggle {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
  }

  .password-toggle:hover {
    color: white;
  }

  .form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 4px;
  }

  .checkbox-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
  }

  .forgot-link {
    color: var(--p-purple-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.3s;
  }

  .forgot-link:hover {
    opacity: 0.8;
  }

  /* Premium Button */
  .btn-login-modern {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--p-purple-main) 0%, var(--p-purple-light) 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 20px 40px rgba(96, 48, 214, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
  }

  .btn-login-modern::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: 0.6s;
  }

  .btn-login-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(96, 48, 214, 0.4);
  }

  .btn-login-modern:hover::before {
    left: 100%;
  }

  .btn-login-modern:active {
    transform: translateY(-1px);
  }

  .login-footer {
    margin-top: 30px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.95rem;
  }

  .login-footer a {
    color: white;
    font-weight: 700;
    text-decoration: none;
    margin-left: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
  }

  .login-footer a:hover {
    border-color: white;
    color: var(--p-purple-light);
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* Responsive Fixes */
  @media (max-width: 1024px) {
    .login-container {
      width: 900px;
      height: auto;
      min-height: 600px;
    }
  }

  @media (max-width: 768px) {
    body.login-page {
      padding: 20px;
      height: auto;
      min-height: 100vh;
    }

    .login-container {
      flex-direction: column;
      height: auto;
      width: 100%;
      border-radius: 30px;
    }

    .login-hero {
      padding: 40px 30px;
      text-align: center;
    }

    .login-hero h1 {
      font-size: 2.2rem;
    }

    .login-hero p {
      margin: 0 auto 30px;
    }

    .features-vertical {
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: center;
      gap: 12px;
    }

    .feature-pill {
      padding: 8px 16px;
    }

    .feature-pill:hover {
      transform: translateY(-4px);
    }

    .login-form-wrapper {
      padding: 40px 30px;
    }
  }
}

/* ============================================
   DASHBOARD WELCOME (Nuevo Diseño)
   ============================================ */
.welcome-container {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 20px;
}

/* Hero Section Animado */
.welcome-hero {
  background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 40px 30px;
  border-radius: 24px;
  text-align: center;
  margin-bottom: 40px;
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
  position: relative;
  overflow: hidden;
}

.welcome-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  position: relative;
  z-index: 10;
}

.welcome-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 0;
  position: relative;
  z-index: 10;
}

/* Decorative Circles */
.circle-decoration {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.c1 {
  width: 200px;
  height: 200px;
  top: -50px;
  right: -50px;
}

.c2 {
  width: 100px;
  height: 100px;
  bottom: 20px;
  left: 20px;
}

.c3 {
  width: 50px;
  height: 50px;
  top: 40px;
  left: 20%;
}

/* Quick Actions Grid */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.action-card {
  display: block;
  background: white;
  padding: 25px;
  border-radius: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  color: var(--primary-color);
}

.action-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform 0.3s ease;
}

.action-card:hover .action-icon {
  transform: scale(1.1);
}

.icon-ingreso {
  background: #dcfce7;
  color: #16a34a;
}

.icon-egreso {
  background: #fee2e2;
  color: #dc2626;
}

.icon-reporte {
  background: #e0f2fe;
  color: #0284c7;
}

.icon-config {
  background: #f3f4f6;
  color: #4b5563;
}

.action-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--text-primary);
}

/* Mini Resumen */
.summary-section {
  background: white;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 15px;
}

.summary-metrics {
  display: flex;
  justify-content: space-around;
  text-align: center;
  flex-wrap: wrap;
  gap: 20px;
}

.metric-item small {
  display: block;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.metric-item span {
  font-size: 1.8rem;
  font-weight: 800;
}

/* ============================================
   FLOATING ACTION BUTTON (FAB) FOR SUPPORT
   ============================================ */
.fab-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #3b82f6;
  /* Azul */
  border: none;
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transition: all 0.3s ease;
  position: relative;
}

.fab-main:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.6);
}

.fab-main i {
  transition: all 0.3s ease;
}

.fab-actions {
  position: absolute;
  bottom: 70px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.fab-actions.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fab-action {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  transform: scale(0);
  animation: fab-appear 0.3s ease forwards;
}

.fab-actions.active .fab-action:nth-child(1) {
  animation-delay: 0.1s;
}

.fab-actions.active .fab-action:nth-child(2) {
  animation-delay: 0.2s;
}

.fab-actions.active .fab-action:nth-child(3) {
  animation-delay: 0.3s;
}

.fab-actions.active .fab-action:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes fab-appear {
  0% {
    transform: scale(0) translateY(20px);
    opacity: 0;
  }

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

.fab-action:hover {
  transform: scale(1.1);
}

.fab-whatsapp {
  background-color: #25d366;
  /* Verde */
}

.fab-email {
  background-color: #ef4444;
  /* Rojo */
}

.fab-facebook {
  background-color: #1877f2;
  /* Azul */
}

.fab-instagram {
  background-color: #8b5cf6;
  /* Morado */
}