/* ============================================
   ERP WayOut - Global Admin Styles
   Design System & Component Library
   ============================================ */

/* === CSS VARIABLES === */
:root {
    /* Light Theme Colors */
    --bg-primary: linear-gradient(135deg, #dce4f7 0%, #e8d9f0 50%, #d5d9e8 100%);
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --accent-gold: #f59e0b;
    
    /* Sidebar */
    --sidebar-width: 210px;
    --sidebar-collapsed: 80px;
}

/* Dark Theme - Se activa desde html.dark-mode (pre-CSS) y body.dark-mode (post-DOMContentLoaded) */
html.dark-mode,
body.dark-mode {
    /* Dark Background - Inspired by the design */
    --bg-primary: linear-gradient(135deg, #0f1419 0%, #1a1d29 50%, #0f1419 100%);
    --bg-sidebar: #1a1d29;
    --bg-card: rgba(30, 35, 48, 0.8);
    --bg-card-hover: rgba(40, 45, 60, 0.9);
    
    /* Dark Text */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Dark Borders & Shadows */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    
    /* Gold/Bronze Accent - Like the design */
    --accent-gold: #d4a574;
    --accent-gold-light: #e8c9a0;
    --accent-gold-dark: #b8905f;
}

/* === RESET & BASE === */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    height: 100vh;
    padding: 0;
    overflow: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* === LAYOUT === */
.container {
    max-width: 100%;
    height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 0;
    transition: grid-template-columns 0.3s ease;
}

.container:has(.sidebar.collapsed) {
    grid-template-columns: 80px 1fr;
}

/* === SIDEBAR === */
.sidebar {
    background: var(--bg-sidebar);
    padding: 28px 20px;
    transition: all 0.3s ease;
    height: 100vh;
    box-shadow: 2px 0 16px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0 24px 24px 0;
    border-right: 1px solid var(--border-color);
}

/* Nav scrolleable */
.sidebar nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 20px;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 0 0 0;
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 20px,
        black calc(100% - 20px),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 20px,
        black calc(100% - 20px),
        transparent 100%
    );
}

.sidebar nav::-webkit-scrollbar {
    display: none;
}

body.dark-mode .balance-comment-header {
    border-bottom-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .balance-comment-box {
    background: rgba(30, 35, 48, 0.4);
    border-left-color: var(--accent-gold);
}

body.dark-mode .balance-comment-avatar {
    background: var(--accent-gold);
    color: #1a1d29;
}

body.dark-mode .balance-comment-user-name {
    color: var(--text-primary);
}

body.dark-mode .balance-comment-date {
    color: var(--text-secondary);
}

body.dark-mode .balance-comment-text {
    color: var(--text-primary);
}

body.dark-mode .form-label {
    color: var(--text-primary);
}

body.dark-mode .form-label {
    color: var(--text-primary);
}

/* Dark mode - Balance Tables */
body.dark-mode .balance-table thead th {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(212, 165, 116, 0.08) 100%);
    color: var(--accent-gold);
    border-bottom-color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .balance-table tbody tr {
    border-bottom-color: rgba(212, 165, 116, 0.1);
}

body.dark-mode .balance-table tbody tr:hover {
    background: rgba(212, 165, 116, 0.05);
}

body.dark-mode .balance-table-account-name {
    color: var(--text-primary);
}

body.dark-mode .balance-table-account-type {
    color: var(--text-secondary);
}

body.dark-mode .balance-account-owner {
    color: var(--accent-gold);
}

body.dark-mode .balance-amount-neutral {
    color: var(--text-muted);
}

body.dark-mode .balance-transaction-badge {
    display: inline-block;
    background: rgba(212, 165, 116, 0.15);
    color: var(--text-primary);
    text-align: center;
    min-width: 40px;
}

body.dark-mode .balance-total-row {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.12) 0%, rgba(212, 165, 116, 0.06) 100%);
    border-top-color: rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .balance-total-label {
    color: var(--text-primary);
}

body.dark-mode .balance-neto-display.positive {
    color: #34d399;
}

body.dark-mode .balance-neto-display.negative {
    color: #f87171;
}

body.dark-mode .balance-detail-table thead th {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
    color: #34d399;
    border-bottom-color: rgba(16, 185, 129, 0.3);
}

body.dark-mode .balance-detail-table.expense-table thead th {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
    color: #f87171;
    border-bottom-color: rgba(239, 68, 68, 0.3);
}

body.dark-mode .balance-detail-table tbody tr {
    border-bottom-color: rgba(212, 165, 116, 0.1);
}

body.dark-mode .balance-detail-table tbody tr:hover {
    background: rgba(212, 165, 116, 0.05);
}

body.dark-mode .balance-detail-date {
    color: var(--text-secondary);
}

body.dark-mode .balance-detail-concept {
    color: var(--text-primary);
}

body.dark-mode .balance-detail-subconcept {
    color: var(--text-secondary);
}

body.dark-mode .balance-account-name {
    color: var(--text-primary);
}

body.dark-mode .balance-income-amount {
    color: #34d399;
}

body.dark-mode .balance-expense-amount {
    color: #f87171;
}

body.dark-mode .balance-voucher-badge.has-voucher {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

body.dark-mode .balance-voucher-badge.no-voucher {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}

body.dark-mode .balance-status-badge.paid {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

body.dark-mode .balance-status-badge.pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

body.dark-mode .balance-total-income-row {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-top-color: rgba(16, 185, 129, 0.4) !important;
}

body.dark-mode .balance-total-income-row td {
    color: #34d399;
}

body.dark-mode .balance-total-expense-row {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    border-top-color: rgba(239, 68, 68, 0.4) !important;
}

body.dark-mode .balance-total-expense-row td {
    color: #f87171;
}

body.dark-mode .balance-subtotal-row {
    background: rgba(212, 165, 116, 0.05);
    border-top-color: rgba(212, 165, 116, 0.2) !important;
}

body.dark-mode .balance-subtotal-row td {
    color: var(--text-primary);
}

body.dark-mode .balance-bars-amount {
    color: #fb923c;
}

body.dark-mode .sidebar {
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.6);
    background: var(--bg-sidebar);
}

body.dark-mode .form-group label {
    color: #e2e8f0;
}

/* Dark mode - Balance styles */
body.dark-mode .summary-item-green {
    background: rgba(16, 185, 129, 0.12);
    border-left-color: #10b981;
}

body.dark-mode .summary-item-green span {
    color: var(--text-primary);
}

body.dark-mode .summary-item-green .text-base {
    color: #34d399 !important;
}

body.dark-mode .summary-item-red {
    background: rgba(220, 38, 38, 0.12);
    border-left-color: #dc2626;
}

body.dark-mode .summary-item-red span {
    color: var(--text-primary);
}

body.dark-mode .summary-item-red .text-base {
    color: #f87171 !important;
}

body.dark-mode .balance-neto-positive {
    color: #34d399;
}

body.dark-mode .balance-neto-negative {
    color: #f87171;
}

body.dark-mode .balance-total-neto.positive {
    color: #34d399;
}

body.dark-mode .balance-total-neto.negative {
    color: #f87171;
}

body.dark-mode .balance-income-total-row td {
    border-top-color: rgba(16, 185, 129, 0.4);
}

body.dark-mode .balance-expense-subtotal-row td {
    border-top-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .balance-expense-total-row td {
    border-top-color: rgba(220, 38, 38, 0.4);
}

body.dark-mode .balance-bars-cost {
    color: #fb923c;
}

body.dark-mode .balance-detail-subtitle {
    opacity: 0.7;
    color: var(--text-secondary);
}

body.dark-mode .balance-comment-header {
    border-bottom-color: rgba(212, 165, 116, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 700;
    color: #2d3748;
}

.logo-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 6px;
    border-radius: 12px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 14.5px;
    font-weight: 500;
}

.menu-item:hover {
    background: #f7fafc;
    color: #4a5568;
}

.menu-item.active {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
}

.menu-item .icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: #2d3748;
}

.menu-item.active .icon {
    color: white;
}

.menu-item .badge {
    margin-left: auto;
    background: #8b5cf6;
    color: white;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.menu-item .arrow {
    margin-left: auto;
    font-size: 16px;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.menu-item.has-submenu {
    cursor: pointer;
}

.menu-item.has-submenu.open .arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 0;
}

.submenu.open {
    max-height: 500px; /* Aumentado para submenús anidados */
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 10px 44px;
    color: #718096;
    text-decoration: none;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 2px 0;
}

.submenu-item:hover {
    background: linear-gradient(135deg, #f3f0ff 0%, #faf5ff 100%);
    color: #8b5cf6;
}

.submenu-item.active {
    background: transparent !important;
    color: #8b5cf6;
}

.submenu-item .icon {
    font-size: 14px;
}

/* Submenu groups - submenús anidados */
.submenu-group {
    margin: 0;
}

.submenu-group .submenu-item.has-submenu {
    padding: 10px 16px 10px 44px;
    cursor: pointer;
}

.submenu-group .submenu {
    margin-left: 0;
}

.submenu-group .submenu .submenu-item {
    padding-left: 64px; /* Mayor indentación para tercer nivel */
}

.submenu-item.has-submenu {
    justify-content: space-between;
}

.submenu-item.has-submenu .arrow {
    font-size: 11px;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.submenu-item.has-submenu.open .arrow {
    transform: rotate(180deg);
}

.user-profile {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.user-profile:hover {
    background: #f7fafc;
    transform: translateX(2px);
}

.user-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 15px;
    position: relative;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    background: #10b981;
    border: 2.5px solid white;
    border-radius: 50%;
    z-index: 10;
}

.user-info h4 {
    font-size: 13.5px;
    color: #2d3748;
    margin-bottom: 3px;
    font-weight: 600;
}

.user-info p {
    font-size: 11.5px;
    color: #a0aec0;
    font-weight: 500;
}

.theme-toggle {
    display: flex;
    gap: 6px;
    margin-top: 24px;
    background: #f7fafc;
    padding: 5px;
    border-radius: 12px;
}

.theme-btn {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.theme-btn i {
    font-size: 14px;
}

.theme-btn.active {
    background: #2d3748;
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Logout Button */
.logout-form {
    margin-top: 16px;
}

.logout-btn {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f7fafc;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.logout-btn:hover {
    background: #fed7d7;
    color: #c53030;
    border-color: #feb2b2;
    box-shadow: 0 2px 8px rgba(197, 48, 48, 0.15);
    transform: translateY(-1px);
}

.logout-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.logout-btn i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.logout-btn:hover i {
    transform: translateX(-2px);
}

.sidebar.collapsed .logout-btn span {
    display: none;
}

.sidebar.collapsed .logout-btn {
    justify-content: center;
    padding: 11px;
}

/* Dark Mode - Logout Button */
body.dark-mode .logout-btn {
    background: rgba(212, 165, 116, 0.08);
    border-color: rgba(212, 165, 116, 0.2);
    color: var(--text-secondary);
}

body.dark-mode .logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

/* === SIDEBAR COLLAPSE STYLES === */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

.logo-text {
    transition: opacity 0.3s ease;
}

.sidebar-collapse-btn {
    background: #f7fafc;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
}

.sidebar-collapse-btn:hover {
    background: #e2e8f0;
    color: #8b5cf6;
}

.sidebar.collapsed {
    width: 80px;
    padding: 28px 10px;
}

.sidebar.collapsed .sidebar-header {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.sidebar.collapsed .logo {
    margin-bottom: 0;
    gap: 0;
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar.collapsed .menu-item,
.sidebar.collapsed .submenu-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .menu-item span:not(.icon),
.sidebar.collapsed .menu-item .arrow,
.sidebar.collapsed .menu-item .badge {
    display: none;
}

/* Submenús flotantes cuando el sidebar está colapsado */
.sidebar.collapsed .menu-group {
    position: relative;
}

/* Ocultar submenús normales cuando está colapsado */
.sidebar.collapsed .menu-group .submenu {
    display: none !important;
}

/* Tooltips interactivos para submenús */
.submenu-tooltip {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 8px;
    min-width: 180px;
    z-index: 10000;
    animation: slideInRight 0.2s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.submenu-tooltip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #718096;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 2px 0;
    white-space: nowrap;
}

.submenu-tooltip-item:hover {
    background: linear-gradient(135deg, #f3f0ff 0%, #faf5ff 100%);
    color: #8b5cf6;
}

.submenu-tooltip-item.active {
    background: transparent;
    color: #8b5cf6;
    font-weight: 600;
}

.submenu-tooltip-item .icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.submenu-tooltip-item span {
    text-align: left;
}

.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .user-profile {
    justify-content: center;
    padding: 8px;
}

/* Sidebar collapsed theme toggle - Solo en desktop */
/* Desktop: Ensure profit chart displays correctly - HIGHEST SPECIFICITY */
@media (min-width: 769px) {
    /* Base layout - must be grid */
    .profit-layout {
        display: grid !important;
        grid-template-columns: 2fr 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        min-height: 400px !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Chart container */
    .profit-chart-container {
        width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
    }
    
    /* Chart wrapper */
    .profit-chart-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 400px !important;
        background: white !important;
    }
    
    /* Chart canvas container */
    .profit-chart-canvas {
        width: 100% !important;
        height: 350px !important;
        min-height: 350px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
    }
    
    /* Canvas element */
    .profit-chart-canvas canvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Metrics container */
    .profit-metrics-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Chart title */
    .profit-chart-title {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Chart legend */
    .chart-legend {
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Metric cards */
    .profit-metric-card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure content inside profit section is visible - MAXIMUM SPECIFICITY */
    .card[data-card-id="margen-ganancia"] {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .card[data-card-id="margen-ganancia"] .mt-3 {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        min-height: 400px !important;
    }
    
    .card[data-card-id="margen-ganancia"] .profit-section-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .card[data-card-id="margen-ganancia"] .profit-filters {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Force visibility of ALL chart elements with maximum specificity */
    .card[data-card-id="margen-ganancia"] .profit-layout {
        display: grid !important;
        grid-template-columns: 2fr 1fr !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .card[data-card-id="margen-ganancia"] .profit-chart-container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
    }
    
    .card[data-card-id="margen-ganancia"] .profit-chart-wrapper {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
    }
    
    .card[data-card-id="margen-ganancia"] .profit-chart-canvas {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 350px !important;
    }
    
    .card[data-card-id="margen-ganancia"] .profit-metrics-container {
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
    }
    
    /* Force visibility of all child elements */
    .card[data-card-id="margen-ganancia"] .profit-chart-container *,
    .card[data-card-id="margen-ganancia"] .profit-metrics-container *,
    .card[data-card-id="margen-ganancia"] .profit-chart-wrapper * {
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Specific elements */
    .card[data-card-id="margen-ganancia"] .profit-chart-title,
    .card[data-card-id="margen-ganancia"] .chart-legend,
    .card[data-card-id="margen-ganancia"] .chart-legend-item,
    .card[data-card-id="margen-ganancia"] .profit-metric-card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .card[data-card-id="margen-ganancia"] .chart-legend {
        display: grid !important;
    }
    
    .card[data-card-id="margen-ganancia"] .profit-metric-card {
        display: block !important;
    }
    
    /* Dark Mode Desktop - Ensure visibility - MAXIMUM SPECIFICITY */
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-wrapper {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%) !important;
        border: 1px solid rgba(212, 165, 116, 0.25) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1) !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        min-height: 400px !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-canvas {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        width: 100% !important;
        height: 350px !important;
        min-height: 350px !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-canvas canvas {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        background: transparent !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-title {
        color: var(--text-primary) !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-title i {
        color: var(--accent-gold) !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .chart-legend {
        background: rgba(30, 35, 48, 0.6) !important;
        border: 1px solid rgba(212, 165, 116, 0.15) !important;
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .chart-legend-item,
    body.dark-mode .card[data-card-id="margen-ganancia"] .chart-legend-text {
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-metric-card {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%) !important;
        border: 1px solid rgba(212, 165, 116, 0.25) !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Force visibility of all child elements in dark mode */
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-container *,
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-wrapper *,
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-canvas * {
        visibility: visible !important;
        opacity: 1 !important;
    }

    .sidebar.collapsed .theme-toggle {
        flex-direction: column;
        gap: 8px;
    }

    .sidebar.collapsed .theme-btn {
        padding: 10px;
        font-size: 0;
    }

    .sidebar.collapsed .theme-btn::before {
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 14px;
    }

    .sidebar.collapsed .theme-btn:first-child::before {
        content: "\f185"; /* sun icon */
    }

    .sidebar.collapsed .theme-btn:last-child::before {
        content: "\f186"; /* moon icon */
    }
    
    .sidebar.collapsed .theme-btn i {
        display: none;
    }
}

/* Tooltip para items del menú colapsado */
.sidebar.collapsed .menu-item,
.sidebar.collapsed .submenu-item {
    position: relative;
}

.sidebar.collapsed .menu-item:hover::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    padding: 8px 12px;
    background: #2d3748;
    color: white;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* === MAIN CONTENT === */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100vh;
    overflow-y: auto;
    padding: 30px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.main-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* === TOP BAR === */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4px;
}

.welcome h1 {
    font-size: 26px;
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.welcome p {
    color: #a0aec0;
    font-size: 13.5px;
    font-weight: 500;
}

.top-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* === BUTTONS === */
.icon-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #2d3748;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.create-btn, .btn-primary {
    padding: 13px 26px;
    border-radius: 24px;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.create-btn:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    padding: 13px 26px;
    border-radius: 24px;
    background: #f7fafc;
    border: none;
    color: #2d3748;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #edf2f7;
}

/* === ACTION BUTTONS === */
.btn-action {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    color: white !important;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    transform: translateY(-2px);
}

.btn-view {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4) !important;
}

.btn-view:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6) !important;
}

.btn-edit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.4) !important;
}

.btn-edit:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.6) !important;
}

.btn-return {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4) !important;
}

.btn-return:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6) !important;
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4) !important;
}

.btn-delete:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6) !important;
}

.btn-success {
    padding: 13px 26px;
    border-radius: 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    padding: 13px 26px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-delete-icon {
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-delete-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* === PAGINATION === */
.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
    flex-wrap: wrap;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    border: none !important;
    letter-spacing: 0.01em;
    outline: none;
}

/* Light Mode Pagination */
.pagination li a {
    background: var(--bg-card);
    color: var(--text-secondary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    text-decoration: none !important;
}

.pagination li a:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    text-decoration: none !important;
}

.pagination li.active span {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.pagination li.disabled span {
    background: var(--bg-card);
    color: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

/* Dark Mode Pagination */
body.dark-mode .pagination li a {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
    text-decoration: none !important;
}

body.dark-mode .pagination li a:hover {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    color: #0f1419;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.35);
    text-decoration: none !important;
}

body.dark-mode .pagination li.active span {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    color: #0f1419;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.35);
}

body.dark-mode .pagination li.disabled span {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

/* === TABLE FOOTER === */
.table-footer-total {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-top: 2px solid #10b981;
}

.table-footer-total td {
    padding: 15px 20px;
}

.table-footer-label {
    text-align: right;
    font-weight: 700;
    color: #065f46;
    font-size: 15px;
}

.table-footer-amount {
    color: #059669;
    font-weight: 700;
    font-size: 18px;
}

/* === PRODUCT SELECTION === */
.product-info-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

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

/* Product Search Results */
.product-search-results {
    position: absolute;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    margin-top: 4px;
    width: calc(100% - 48px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.product-search-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

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

.product-search-item:hover {
    background: #f8fafc;
}

.product-search-name {
    display: block;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 600;
}

.product-search-details {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}

.product-search-sku {
    color: #8b5cf6;
    font-weight: 600;
}

.product-search-stock {
    color: #10b981;
    font-weight: 600;
}

.product-search-empty {
    color: #94a3b8;
    font-size: 13px;
    margin: 10px 0;
    text-align: center;
    padding: 10px;
}

/* Dark Mode - Product Search Results */
body.dark-mode .product-search-results {
    background: #1e2330;
    border-color: rgba(212, 165, 116, 0.3);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

body.dark-mode .product-search-item {
    border-bottom-color: rgba(212, 165, 116, 0.15);
}

body.dark-mode .product-search-item:hover {
    background: #2a3040;
}

body.dark-mode .product-search-name {
    color: #e2e8f0;
}

body.dark-mode .product-search-details {
    color: #94a3b8;
}

body.dark-mode .product-search-sku {
    color: #d4a574;
}

body.dark-mode .product-search-stock {
    color: #34d399;
}

body.dark-mode .product-search-empty {
    color: #94a3b8;
}

/* ============================================
   SELECTED PRODUCTS TABLE - EXPENSES
   ============================================ */

.selected-products-container {
    display: none;
    margin-bottom: 0;
}

.selected-products-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #1e40af;
    font-size: 14px;
}

.selected-products-table-wrapper {
    overflow-x: auto;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
}

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

.selected-products-table thead th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
}

.selected-products-table thead th:first-child {
    text-align: left;
}

.selected-products-table thead th.center {
    text-align: center;
    width: 100px;
}

.selected-products-table thead th.right {
    text-align: right;
    width: 120px;
}

.selected-products-table thead th.actions {
    text-align: center;
    width: 60px;
}

.selected-products-table tfoot {
    background: #faf5ff;
    border-top: 2px solid #a855f7;
}

.selected-products-table tfoot td {
    padding: 14px 16px;
    font-weight: 700;
    color: #2d3748;
    font-size: 14px;
}

.selected-products-table tfoot .total-label {
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selected-products-table tfoot .total-amount {
    text-align: right;
    font-weight: 800;
    color: #7c3aed;
    font-size: 18px;
}

/* Dark Mode - Selected Products Table */
body.dark-mode .selected-products-label {
    color: #93c5fd;
}

body.dark-mode .selected-products-table-wrapper {
    background: #1e2330;
    border-color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .selected-products-table thead th {
    background: #2a3040;
    color: #cbd5e1;
    border-bottom-color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .selected-products-table tfoot {
    background: #2a3040;
    border-top-color: #d4a574;
}

body.dark-mode .selected-products-table tfoot td {
    color: #e2e8f0;
}

body.dark-mode .selected-products-table tfoot .total-amount,
body.dark-mode #totalAmount {
    color: #d4a574 !important;
}

.selected-products-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

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

.product-name {
    font-weight: 500;
    color: #1e293b;
    display: block;
    margin-bottom: 2px;
}

.product-sku {
    font-size: 11px;
    color: #94a3b8;
}

.product-quantity-input {
    width: 80px;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-align: center;
    background: #ffffff;
    color: #1e293b;
}

.product-price-input {
    width: 100px;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-align: right;
    background: #ffffff;
    color: #1e293b;
}

.product-subtotal {
    font-weight: 600;
    color: #1e293b;
}

.product-remove-btn {
    background: #fee2e2;
    color: #991b1b;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-remove-btn:hover {
    background: #fecaca;
    color: #7f1d1d;
}

/* Dark Mode - Selected Products Table Body */
body.dark-mode .selected-products-table tbody td {
    border-bottom-color: rgba(212, 165, 116, 0.15);
}

body.dark-mode .product-name {
    color: #e2e8f0;
}

body.dark-mode .product-sku {
    color: #94a3b8;
}

body.dark-mode .product-quantity-input,
body.dark-mode .product-price-input {
    background: #2a3040;
    border-color: rgba(212, 165, 116, 0.3);
    color: #e2e8f0;
}

body.dark-mode .product-subtotal {
    color: #d4a574;
}

body.dark-mode .product-remove-btn {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
}

body.dark-mode .product-remove-btn:hover {
    background: rgba(220, 38, 38, 0.3);
    color: #fecaca;
}

/* Money Input Field */
.money-input {
    font-weight: 600;
    font-size: 16px;
}

body.dark-mode .money-input {
    background: rgba(30, 35, 48, 0.8) !important;
    border: 1px solid rgba(212, 165, 116, 0.3) !important;
    color: #d4a574 !important;
}

body.dark-mode .money-input:focus {
    border-color: #d4a574 !important;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2) !important;
    background: rgba(30, 35, 48, 0.9) !important;
}

body.dark-mode .money-input::placeholder {
    color: rgba(212, 165, 116, 0.4);
}

.monto-help-text {
    font-size: 12px;
    color: #92400e;
}

body.dark-mode .monto-help-text {
    color: #d4a574;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

/* Ocultar elementos mobile-only en desktop */
.mobile-only {
    display: none !important;
}

/* ============================================
   MODALS FULL SCREEN MOBILE - INGRESOS, EGRESOS, TRANSFERENCIAS
   ============================================ */

@media (max-width: 768px) {
    /* Mostrar elementos mobile-only */
    .mobile-only {
        display: block !important;
    }
    
    /* Mostrar tarjetas de cuentas en flex */
    .accounts-cards-mobile.mobile-only {
        display: flex !important;
        flex-direction: column;
    }

    /* Mostrar tarjetas de ingresos en flex */
    .incomes-cards-mobile.mobile-only {
        display: flex !important;
        flex-direction: column;
    }
    
    /* Income Modal - Full Screen */
    #incomeModal.modal-overlay {
        padding: 0 !important;
        align-items: stretch !important;
        background: var(--bg-primary) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9999 !important;
    }
    
    #incomeModal .modal {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    #incomeModal .modal-header {
        border-radius: 0 !important;
        padding: 16px !important;
        flex-shrink: 0 !important;
        border-bottom: 1px solid var(--border-color) !important;
    }
    
    #incomeModal .modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 16px !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    #incomeModal .modal-footer {
        border-radius: 0 !important;
        padding: 16px !important;
        flex-shrink: 0 !important;
        border-top: 1px solid var(--border-color) !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    #incomeModal .modal-footer button {
        width: 100% !important;
        padding: 14px !important;
        font-size: 15px !important;
    }
    
    /* Expense Modal - Full Screen */
    #expenseModal.modal-overlay {
        padding: 0 !important;
        align-items: stretch !important;
        background: var(--bg-primary) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9999 !important;
    }
    
    #expenseModal .modal {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    #expenseModal .modal-header {
        border-radius: 0 !important;
        padding: 16px !important;
        flex-shrink: 0 !important;
        border-bottom: 1px solid var(--border-color) !important;
    }
    
    #expenseModal .modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 16px !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    #expenseModal .modal-footer {
        border-radius: 0 !important;
        padding: 16px !important;
        flex-shrink: 0 !important;
        border-top: 1px solid var(--border-color) !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    #expenseModal .modal-footer button {
        width: 100% !important;
        padding: 14px !important;
        font-size: 15px !important;
    }
    
    /* Transfer Modal - Full Screen */
    #transferModal.modal-overlay {
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        background: var(--bg-primary) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 9999 !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        animation: none !important;
    }
    
    #transferModal.modal-overlay.active {
        display: flex !important;
        align-items: stretch !important;
        justify-content: stretch !important;
    }
    
    #transferModal .modal {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        min-height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        box-shadow: none !important;
        border: none !important;
        transform: none !important;
        animation: none !important;
        position: relative !important;
    }
    
    /* Sobrescribir cualquier estilo inline */
    #transferModal .modal[style*="max-width"] {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    #transferModal .modal-header {
        border-radius: 0 !important;
        padding: 16px !important;
        flex-shrink: 0 !important;
        border-bottom: 1px solid var(--border-color) !important;
        margin: 0 !important;
        box-shadow: none !important;
    }
    
    #transferModal .modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 16px !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 !important;
    }
    
    #transferModal .modal-footer {
        border-radius: 0 !important;
        padding: 16px !important;
        flex-shrink: 0 !important;
        border-top: 1px solid var(--border-color) !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin: 0 !important;
        box-shadow: none !important;
    }
    
    #transferModal .modal-footer button {
        width: 100% !important;
        padding: 14px !important;
        font-size: 15px !important;
    }
    
    /* Eliminar cualquier efecto visual que delate que es un popup */
    #transferModal .modal * {
        box-shadow: none !important;
    }
    
    /* Asegurar que no haya espacios o márgenes */
    #transferModal .modal-body-padded {
        padding: 16px !important;
        margin: 0 !important;
    }
    
    /* Eliminar cualquier padding o margin del contenedor principal */
    #transferModal {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Asegurar que el form también ocupe todo el espacio */
    #transferModal form {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Eliminar cualquier borde o sombra de elementos internos */
    #transferModal .form-group,
    #transferModal .account-balance-info,
    #transferModal .transfer-projection-box,
    #transferModal .alert {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Dark Mode - Full Screen Modals */
    body.dark-mode #incomeModal.modal-overlay,
    body.dark-mode #expenseModal.modal-overlay,
    body.dark-mode #transferModal.modal-overlay {
        background: var(--bg-primary) !important;
        backdrop-filter: none !important;
    }
    
    body.dark-mode #incomeModal .modal,
    body.dark-mode #expenseModal .modal,
    body.dark-mode #transferModal .modal {
        background: var(--bg-primary) !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    /* Eliminar todas las animaciones y transiciones en mobile */
    #transferModal.modal-overlay,
    #transferModal .modal,
    #transferModal .modal * {
        animation: none !important;
        transition: none !important;
    }
    
    /* Asegurar que el header se vea como parte de la página */
    #transferModal .modal-header {
        background: var(--bg-primary) !important;
    }
    
    body.dark-mode #transferModal .modal-header {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(184, 144, 95, 0.1) 100%) !important;
    }
    
    /* Asegurar que el footer se vea como parte de la página */
    #transferModal .modal-footer {
        background: var(--bg-primary) !important;
    }
    
    body.dark-mode #transferModal .modal-footer {
        background: rgba(212, 165, 116, 0.05) !important;
    }
    
    /* Asegurar que el overlay no tenga ningún efecto de fondo */
    #transferModal.modal-overlay::before,
    #transferModal.modal-overlay::after {
        display: none !important;
    }
    
    /* Asegurar que no haya ningún espacio entre el overlay y el modal */
    #transferModal.modal-overlay {
        gap: 0 !important;
    }
    
    body.dark-mode #incomeModal .modal-header,
    body.dark-mode #expenseModal .modal-header,
    body.dark-mode #transferModal .modal-header {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(184, 144, 95, 0.1) 100%) !important;
        border-bottom-color: rgba(212, 165, 116, 0.2) !important;
    }
    
    body.dark-mode #incomeModal .modal-body,
    body.dark-mode #expenseModal .modal-body,
    body.dark-mode #transferModal .modal-body {
        background: var(--bg-primary) !important;
    }
    
    body.dark-mode #incomeModal .modal-footer,
    body.dark-mode #expenseModal .modal-footer,
    body.dark-mode #transferModal .modal-footer {
        background: rgba(212, 165, 116, 0.05) !important;
        border-top-color: rgba(212, 165, 116, 0.2) !important;
    }
    
    /* Asegurar que los inputs y selects se vean bien en full screen */
    #incomeModal .form-control,
    #expenseModal .form-control,
    #transferModal .form-control {
        font-size: 16px !important; /* Evita zoom en iOS */
    }
    
    /* Ajustar secciones internas de los modales */
    #expenseModal .bg-gradient-gray {
        margin-bottom: 16px !important;
        padding: 16px !important;
    }
    
    #expenseModal .bg-gradient-gray h3 {
        font-size: 13px !important;
    }
    
    /* Prevenir scroll del body cuando el modal está abierto */
    body:has(#incomeModal.modal-overlay.active),
    body:has(#expenseModal.modal-overlay.active),
    body:has(#transferModal.modal-overlay.active) {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Asegurar que el modal header tenga buen contraste */
    #incomeModal .modal-header,
    #expenseModal .modal-header,
    #transferModal .modal-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
    }
    
    /* Asegurar que el modal footer esté siempre visible */
    #incomeModal .modal-footer,
    #expenseModal .modal-footer,
    #transferModal .modal-footer {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 10 !important;
    }
    
    /* Mejorar el scroll del body del modal */
    #incomeModal .modal-body,
    #expenseModal .modal-body,
    #transferModal .modal-body {
        scrollbar-width: thin !important;
        scrollbar-color: rgba(212, 165, 116, 0.3) transparent !important;
    }
    
    #incomeModal .modal-body::-webkit-scrollbar,
    #expenseModal .modal-body::-webkit-scrollbar,
    #transferModal .modal-body::-webkit-scrollbar {
        width: 6px !important;
    }
    
    #incomeModal .modal-body::-webkit-scrollbar-track,
    #expenseModal .modal-body::-webkit-scrollbar-track,
    #transferModal .modal-body::-webkit-scrollbar-track {
        background: transparent !important;
    }
    
    #incomeModal .modal-body::-webkit-scrollbar-thumb,
    #expenseModal .modal-body::-webkit-scrollbar-thumb,
    #transferModal .modal-body::-webkit-scrollbar-thumb {
        background: rgba(212, 165, 116, 0.3) !important;
        border-radius: 3px !important;
    }
    
    body.dark-mode #incomeModal .modal-body::-webkit-scrollbar-thumb,
    body.dark-mode #expenseModal .modal-body::-webkit-scrollbar-thumb,
    body.dark-mode #transferModal .modal-body::-webkit-scrollbar-thumb {
        background: rgba(212, 165, 116, 0.5) !important;
    }
}

/* Dark Mode - Product Info Box */
body.dark-mode .product-info-box {
    background: rgba(30, 35, 48, 0.6);
    border-color: rgba(212, 165, 116, 0.2);
}

/* Mobile Optimizations for Product Search Modal */
@media (max-width: 768px) {
    /* Product Search Results - Mobile */
    .product-search-results {
        max-height: 200px;
        border-radius: 6px;
    }
    
    .product-search-item {
        padding: 10px 12px;
    }
    
    .product-search-name {
        font-size: 13px;
    }
    
    .product-search-details {
        font-size: 11px;
    }
    
    /* Modal adjustments for events/bars */
    #addProductModal .modal,
    #editProductModal .modal,
    #returnProductModal .modal,
    #transferProductModal .modal {
        width: 95% !important;
        max-width: 95% !important;
        margin: 10px auto;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    #addProductModal .modal-body,
    #editProductModal .modal-body,
    #returnProductModal .modal-body,
    #transferProductModal .modal-body {
        padding: 14px;
        max-height: calc(95vh - 140px);
        overflow-y: auto;
    }
    
    #addProductModal .modal-header,
    #editProductModal .modal-header,
    #returnProductModal .modal-header,
    #transferProductModal .modal-header {
        padding: 12px 14px;
    }
    
    #addProductModal .modal-title,
    #editProductModal .modal-title,
    #returnProductModal .modal-title,
    #transferProductModal .modal-title {
        font-size: 15px;
    }
    
    #addProductModal .form-group,
    #editProductModal .form-group,
    #returnProductModal .form-group,
    #transferProductModal .form-group {
        margin-bottom: 14px;
    }
    
    #addProductModal .form-input,
    #editProductModal .form-input,
    #returnProductModal .form-input,
    #transferProductModal .form-input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    #addProductModal .product-info-box,
    #editProductModal .product-info-box {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    #addProductModal .modal-footer,
    #editProductModal .modal-footer,
    #returnProductModal .modal-footer,
    #transferProductModal .modal-footer {
        flex-direction: column;
        gap: 8px;
        padding: 12px 14px;
    }
    
    #addProductModal .modal-footer button,
    #editProductModal .modal-footer button,
    #returnProductModal .modal-footer button,
    #transferProductModal .modal-footer button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    /* Dark Mode - Modals Mobile */
    body.dark-mode #addProductModal .modal,
    body.dark-mode #editProductModal .modal,
    body.dark-mode #returnProductModal .modal,
    body.dark-mode #transferProductModal .modal,
    body.dark-mode #newBarModal .modal,
    body.dark-mode #movementsModal .modal {
        background: linear-gradient(135deg, rgba(26, 29, 41, 0.98) 0%, rgba(20, 25, 38, 0.98) 100%);
        border: 1px solid rgba(212, 165, 116, 0.2);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    }
    
    body.dark-mode #addProductModal .modal-header,
    body.dark-mode #editProductModal .modal-header,
    body.dark-mode #returnProductModal .modal-header,
    body.dark-mode #transferProductModal .modal-header,
    body.dark-mode #newBarModal .modal-header,
    body.dark-mode #movementsModal .modal-header {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(184, 144, 95, 0.1) 100%);
        border-bottom: 1px solid rgba(212, 165, 116, 0.2);
    }
    
    body.dark-mode #addProductModal .form-input,
    body.dark-mode #editProductModal .form-input,
    body.dark-mode #returnProductModal .form-input,
    body.dark-mode #transferProductModal .form-input,
    body.dark-mode #newBarModal .form-input {
        background: rgba(30, 35, 48, 0.6);
        border: 1px solid rgba(212, 165, 116, 0.2);
        color: var(--text-primary);
    }
    
    body.dark-mode #addProductModal .form-input:focus,
    body.dark-mode #editProductModal .form-input:focus,
    body.dark-mode #returnProductModal .form-input:focus,
    body.dark-mode #transferProductModal .form-input:focus,
    body.dark-mode #newBarModal .form-input:focus {
        background: rgba(30, 35, 48, 0.8);
        border-color: var(--accent-gold);
        box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
    }
    
    body.dark-mode #addProductModal .form-input::placeholder,
    body.dark-mode #editProductModal .form-input::placeholder,
    body.dark-mode #returnProductModal .form-input::placeholder,
    body.dark-mode #transferProductModal .form-input::placeholder,
    body.dark-mode #newBarModal .form-input::placeholder {
        color: #64748b;
    }
    
    body.dark-mode #addProductModal label,
    body.dark-mode #editProductModal label,
    body.dark-mode #returnProductModal label,
    body.dark-mode #transferProductModal label,
    body.dark-mode #newBarModal label {
        color: var(--text-primary);
    }
}

@media (max-width: 480px) {
    .product-search-results {
        max-height: 180px;
    }
    
    .product-search-item {
        padding: 8px 10px;
    }
    
    .product-search-name {
        font-size: 12px;
        margin-bottom: 3px;
    }
    
    .product-search-details {
        font-size: 10px;
    }
    
    #addProductModal .modal,
    #editProductModal .modal,
    #returnProductModal .modal,
    #transferProductModal .modal {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    #addProductModal .modal-body,
    #editProductModal .modal-body,
    #returnProductModal .modal-body,
    #transferProductModal .modal-body {
        padding: 12px;
        max-height: calc(100vh - 120px);
    }
    
    #addProductModal .modal-title,
    #editProductModal .modal-title,
    #returnProductModal .modal-title,
    #transferProductModal .modal-title {
        font-size: 14px;
    }
}

.info-alert {
    background: #f0f9ff;
    border: 2px solid #bae6fd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.info-alert p {
    margin: 0;
    color: #0c4a6e;
    font-size: 13px;
}

.success-alert {
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
}

.success-alert small {
    color: #166534;
    font-size: 12px;
}

/* === CARDS === */
.card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

body.dark-mode .card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 165, 116, 0.1);
}

.card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 22px;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.card-subtitle {
    font-size: 12.5px;
    color: #a0aec0;
    margin-top: 5px;
    font-weight: 500;
}

.view-more {
    color: #a0aec0;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
}

.view-more:hover {
    color: #8b5cf6;
}

/* === CARD TOGGLE BUTTON === */
.card-toggle-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.card-toggle-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: scale(1.05);
}

body.dark-mode .card-toggle-btn {
    background: rgba(212, 165, 116, 0.1);
    border-color: rgba(212, 165, 116, 0.2);
    color: var(--gold-primary);
}

body.dark-mode .card-toggle-btn:hover {
    background: rgba(212, 165, 116, 0.15);
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8f9ff 0%, #faf8ff 100%);
    border-radius: 20px;
    border: 2px dashed #e2e8f0;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.empty-state:hover {
    border-color: #cbd5e0;
    background: linear-gradient(135deg, #f6f7ff 0%, #f8f6ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.08);
}

.empty-state-icon {
    font-size: 64px;
    color: #cbd5e0;
    margin-bottom: 20px;
    display: inline-block;
    transition: all 0.3s ease;
}

.empty-state:hover .empty-state-icon {
    color: #a78bfa;
    transform: scale(1.05);
}

.empty-state-title {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    letter-spacing: -0.4px;
}

.empty-state-description {
    font-size: 14px;
    color: #718096;
    margin-bottom: 24px;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state .btn-primary {
    margin-top: 8px;
    padding: 13px 32px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.empty-state .btn-primary:hover {
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
    transform: translateY(-2px);
}

/* === STATS CARDS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

@media (min-width: 769px) {
    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
    
    .stats-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (min-width: 1280px) {
    .stats-grid {
        gap: 14px;
    }
    
    .stats-grid-3 {
        gap: 14px;
    }
}

@media (min-width: 1600px) {
    .stats-grid {
        gap: 18px;
    }
    
    .stats-grid-3 {
        gap: 18px;
    }
}

.stat-card {
    background: white;
    padding: 22px 24px 26px 24px;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
    color: #718096;
    font-size: 13.5px;
    font-weight: 600;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 19px;
}

.stat-value {
    font-size: 44px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
    letter-spacing: -1px;
    line-height: 1;
}

/* === CONTENT GRID === */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

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

/* === COLORS === */
:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #2d3748;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --gray-900: #171923;
}

/* === MOBILE HEADER === */
.mobile-header {
    display: none;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 16px 20px;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header .menu-toggle {
    justify-self: start;
}

.mobile-header .logo {
    justify-self: center;
    margin: 0;
    padding: 0;
}

.mobile-header .mobile-actions {
    justify-self: end;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: #f7fafc;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #2d3748;
}

.mobile-actions {
    display: flex;
    gap: 8px;
}

/* Hide config button by default, show only on dashboard */
.config-btn-header {
    display: none !important;
}

body.dashboard-page .config-btn-header {
    display: flex !important;
}

.mobile-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f7fafc;
    border: none;
    color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-icon-btn:hover {
    background: #edf2f7;
    transform: scale(1.05);
}

.mobile-theme-btn {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
}

.mobile-theme-btn:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    /* Ocultar elementos solo para desktop */
    .desktop-only {
        display: none !important;
    }
    
    .container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        border-radius: 0 24px 24px 0;
    }
    
    /* Forzar sidebar expandido en mobile */
    .sidebar.collapsed {
        width: 260px !important;
    }
    
    .sidebar.collapsed .logo-text,
    .sidebar.collapsed .menu-item span,
    .sidebar.collapsed .user-name,
    .sidebar.collapsed .user-role {
        display: block !important;
        opacity: 1 !important;
    }
    
    .sidebar.collapsed .sidebar-collapse-btn i::before {
        content: "\f100" !important; /* fa-angles-left */
    }
    
    /* Forzar theme-toggle siempre expandido en mobile */
    .sidebar.collapsed .theme-toggle {
        flex-direction: row !important;
        gap: 6px !important;
        width: 100% !important;
        margin: 24px 0 !important;
    }
    
    .sidebar.collapsed .theme-btn {
        padding: 9px 12px !important;
        font-size: 13px !important;
        flex-direction: row !important;
        gap: 6px !important;
    }
    
    .sidebar.collapsed .theme-btn i {
        font-size: 14px !important;
        display: inline-block !important;
    }

    /* Hacer que el user-profile ocupe todo el ancho en mobile */
    .sidebar .user-profile {
        width: 100% !important;
        margin: 0 !important;
        padding: 12px !important;
        border-radius: 12px !important;
    }

    /* Hacer que el logout-btn ocupe todo el ancho en mobile */
    .sidebar .logout-form {
        width: 100% !important;
        margin: 16px 0 0 0 !important;
    }

    .sidebar .logout-btn {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Forzar que theme-toggle no colapse en mobile */
    .sidebar .theme-toggle {
        width: 100% !important;
        margin: 24px 0 !important;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    /* Ocultar botones innecesarios en mobile */
    .mobile-theme-btn {
        display: none !important;
    }
    
    .sidebar-collapse-btn {
        display: none !important;
    }
    
    .mobile-header {
        display: grid;
    }
    
    .main-content {
        height: auto;
        min-height: auto;
        padding: 12px;
        overflow-x: hidden;
        overflow-y: visible;
        max-width: 100vw;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 12px;
        padding-top: 12px;
    }
    
    .welcome h1 {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .welcome p {
        font-size: 12px;
        opacity: 0.8;
    }
    
    .top-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }
    
    .icon-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .create-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 12px;
        border-radius: 16px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    /* Stat Cards Mobile - Optimized */
    .stat-card-red,
    .stat-card-green,
    .stat-card-blue,
    .stat-card-purple,
    .stat-card-orange {
        padding: 18px;
        border-radius: 16px;
    }
    
    .stat-card-content {
        gap: 14px;
    }
    
    .stat-label {
        font-size: 11px;
        letter-spacing: 0.5px;
        margin-bottom: 6px;
    }
    
    .stat-number {
        font-size: 26px !important;
        line-height: 1.1;
    }
    
    .stat-icon-box {
        width: 54px;
        height: 54px;
        min-width: 54px;
    }
    
    .stat-icon-box i {
        font-size: 22px;
    }
    
    /* Stat card details (mobiliari/bebidas) */
    .stat-card p {
        font-size: 11px;
        margin-top: 6px;
    }
    
    /* Calendar Mobile Adjustments */
    .calendar-card-container {
        padding: 14px;
        overflow: visible !important;
        z-index: 10 !important;
        position: relative;
    }
    
    .calendar-header {
        flex-wrap: nowrap;
        gap: 8px;
        justify-content: space-between;
        margin-bottom: 12px;
        padding: 0;
    }
    
    .calendar-title {
        font-size: 15px;
        width: auto;
        flex: 1;
        text-align: center;
        order: 0;
        margin: 0;
        text-transform: uppercase !important;
    }
    
    .calendar-title i {
        font-size: 14px;
        margin-right: 6px;
    }
    
    .calendar-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 13px;
        padding: 0;
        min-width: 36px;
    }
    
    .calendar-today-btn {
        position: absolute;
        top: 14px;
        right: 14px;
        padding: 6px 12px;
        font-size: 11px;
        z-index: 10;
    }
    
    .calendar-weekdays {
        margin-bottom: 4px;
    }
    
    .calendar-weekday {
        font-size: 11px;
        padding: 8px 2px;
        font-weight: 600;
    }
    
    .calendar-day {
        min-height: 48px;
        padding: 4px;
        border-radius: 8px;
    }
    
    .calendar-day .day-number {
        font-size: 13px;
        font-weight: 600;
    }
    
    .calendar-day .event-names {
        display: none;
    }
    
    .calendar-day.has-events {
        position: relative;
    }
    
    .calendar-day.has-events::after {
        content: '';
        position: absolute;
        bottom: 6px;
        left: 50%;
        transform: translateX(-50%);
        width: 5px;
        height: 5px;
        background: #8b5cf6;
        border-radius: 50%;
    }
    
    .calendar-day.today {
        background: rgba(139, 92, 246, 0.15);
        border: 2px solid #8b5cf6;
    }
    
    .today-label {
        font-size: 8px;
        padding: 2px 5px;
        margin-top: 2px;
    }
    
    /* Todo en Orden Mobile */
    .border-l-green {
        padding: 24px 16px !important;
        min-height: 200px !important;
    }
    
    .border-l-green i {
        font-size: 48px !important;
        margin-bottom: 12px !important;
    }
    
    .border-l-green h3 {
        font-size: 17px !important;
        margin-bottom: 8px !important;
    }
    
    .border-l-green p {
        font-size: 13px !important;
    }
    
    /* Modal Mobile Adjustments */
    .modal-container {
        width: 92%;
        max-width: 92%;
        margin: 15% auto;
        border-radius: 16px;
    }
    
    .modal-header-custom {
        padding: 14px 16px;
        border-radius: 16px 16px 0 0;
    }
    
    .modal-header-custom h2 {
        font-size: 15px;
    }
    
    .modal-close-btn {
        width: 28px;
        height: 28px;
        font-size: 22px;
    }
    
    .modal-body-custom {
        padding: 14px;
    }
    
    .modal-description {
        font-size: 13px;
        margin-bottom: 14px;
    }
    
    .card-config-item {
        padding: 11px;
        border-radius: 10px;
    }
    
    .card-config-name {
        font-size: 13px;
    }
    
    .card-config-icon {
        font-size: 16px;
    }
    
    .card-config-status {
        font-size: 11px;
    }
    
    .card-config-checkbox {
        width: 16px;
        height: 16px;
    }
    
    /* Theme Toggle Mobile - Oculto (se usa el del header) */
    .main-content > .theme-toggle {
        display: none !important;
    }
    
    /* Alert Cards Mobile */
    .alert-card {
        padding: 20px;
        border-radius: 16px;
        border: 2px solid transparent;
        position: relative;
        overflow: hidden;
    }
    
    .alert-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 5px;
    }
    
    .alert-card > div:first-child {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .alert-card > div:nth-child(2) {
        font-size: 28px !important;
        margin-bottom: 4px;
    }
    
    .alert-card > div:last-child {
        font-size: 11px !important;
    }
    
    .alert-card i {
        font-size: 12px;
        margin-right: 4px;
    }
    
    /* Card Toggle Button Mobile */
    .card-toggle-btn {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    
    /* Spacing Adjustments */
    .mt-3 {
        margin-top: 12px !important;
    }
    
    .mb-3 {
        margin-bottom: 12px !important;
    }
    
    .mb-5 {
        margin-bottom: 16px !important;
    }
    
    /* General Text Sizing */
    .text-lg {
        font-size: 16px !important;
    }
    
    .text-base {
        font-size: 14px !important;
    }
    
    .text-sm {
        font-size: 12px !important;
    }
    
    /* Incomes Mobile Optimization */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .stat-card-green,
    .stat-card-red,
    .stat-card-blue,
    .stat-card-purple,
    .stat-card-orange,
    .stat-card-amber {
        padding: 16px !important;
        min-height: 110px !important;
    }
    
    .stat-label {
        font-size: 10px !important;
        margin-bottom: 6px !important;
    }
    
    .stat-number {
        font-size: 22px !important;
    }
    
    .stat-icon-box {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
    }
    
    .stat-icon-box i {
        font-size: 18px !important;
    }

    /* Filters Mobile */
    .filters-section {
        margin-left: 12px !important;
        margin-right: 12px !important;
        padding: 16px !important;
        border-radius: 12px !important;
    }

    .filters-form {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .filter-label {
        font-size: 12px !important;
        margin-bottom: 6px !important;
    }

    /* Expenses Table Mobile */
    .expenses-table-wrapper {
        width: 100%;
    }

    .expenses-table-wrapper .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .expenses-table-wrapper .events-table th {
        font-size: 10px !important;
        padding: 12px 8px !important;
        white-space: nowrap !important;
        text-transform: uppercase !important;
        font-weight: 700 !important;
    }

    .expenses-table-wrapper .events-table td {
        padding: 12px 8px !important;
        font-size: 12px !important;
        vertical-align: middle !important;
    }

    /* Hide less important columns on mobile */
    .expenses-table-wrapper .events-table th:nth-child(2),
    .expenses-table-wrapper .events-table td:nth-child(2),
    .expenses-table-wrapper .events-table th:nth-child(5),
    .expenses-table-wrapper .events-table td:nth-child(5),
    .expenses-table-wrapper .events-table th:nth-child(6),
    .expenses-table-wrapper .events-table td:nth-child(6),
    .expenses-table-wrapper .events-table th:nth-child(9),
    .expenses-table-wrapper .events-table td:nth-child(9),
    .expenses-table-wrapper .events-table th:nth-child(10),
    .expenses-table-wrapper .events-table td:nth-child(10) {
        display: none !important;
    }
    
    /* Alert Cards Mobile */
    .alerts-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .alert-card-amber,
    .alert-card-red,
    .alert-card-blue {
        padding: 18px !important;
        border: 2px solid transparent;
        position: relative;
        overflow: hidden;
    }
    
    .alert-card-amber::before,
    .alert-card-red::before,
    .alert-card-blue::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 5px;
    }
    
    .alert-card-red::before {
        background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    }
    
    .alert-card-amber::before {
        background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    }
    
    .alert-card-blue::before {
        background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    }
    
    .alert-header {
        font-size: 11px !important;
    }
    
    .alert-number {
        font-size: 24px !important;
    }
    
    .alert-description {
        font-size: 10px !important;
    }
    
    /* Table Mobile - Scroll Horizontal */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .events-table {
        font-size: 12px !important;
    }
    
    .events-table th {
        padding: 10px 8px !important;
        font-size: 11px !important;
    }
    
    .events-table td {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }
    
    .events-table td strong {
        font-size: 13px !important;
    }
    
    .events-table td small {
        font-size: 10px !important;
    }


    
    /* Badge Styles Mobile */
    .badge-status {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }
    
    /* Action Buttons Mobile */
    .action-buttons {
        gap: 4px !important;
    }
    
    .btn-action {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
    
    /* Empty State Mobile */
    .empty-state {
        padding: 40px 20px !important;
    }
    
    .empty-state i {
        font-size: 48px !important;
    }
    
    .empty-state h3 {
        font-size: 16px !important;
    }
    
    .empty-state p {
        font-size: 13px !important;
    }
}

/* Dark Mode - Mobile Specific */
@media (max-width: 768px) {
    body.dark-mode .calendar-day.has-events::after {
        background: var(--accent-gold);
    }
    
    body.dark-mode .calendar-day.today {
        background: rgba(212, 165, 116, 0.15);
        border-color: var(--accent-gold);
    }
    
    body.dark-mode .stat-card-red,
    body.dark-mode .stat-card-green,
    body.dark-mode .stat-card-blue,
    body.dark-mode .stat-card-purple,
    body.dark-mode .stat-card-orange,
    body.dark-mode .stat-card-ars,
    body.dark-mode .stat-card-usd,
    body.dark-mode .stat-card-eur,
    body.dark-mode .stat-card-btc,
    body.dark-mode .stat-card-usdt {
        background: rgba(30, 35, 48, 0.8) !important;
        border: 1px solid rgba(212, 165, 116, 0.15) !important;
    }
    
    body.dark-mode .badge-warning {
        background: rgba(212, 165, 116, 0.15);
        color: #d4a574;
        border: 1px solid rgba(212, 165, 116, 0.3);
    }
    
    .card-config-item {
        padding: 12px;
    }
    
    .card-config-name {
        font-size: 13px;
    }
    
    .card-config-icon {
        font-size: 16px;
    }
    
    /* Margen y Ganancia Mobile */
    .profit-filters {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    .profit-filters > div {
        width: 100% !important;
    }
    
    .profit-filters label {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }
    
    .profit-filters .form-control,
    .profit-filters .form-select {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }
    
    .profit-filters .create-btn {
        width: 100%;
        padding: 11px 16px !important;
        margin-top: 4px;
    }
    
    .card form {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .card form > div {
        width: 100% !important;
    }
    
    .card form .create-btn {
        width: 100%;
        margin-top: 8px;
    }
    
    .card h3 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }
    
    .card h3 i {
        font-size: 15px !important;
    }
    
    /* Métricas Grid Mobile */
    .metrics-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin-bottom: 16px !important;
    }
    
    .metrics-grid > div {
        padding: 12px 10px !important;
        border-radius: 10px !important;
    }
    
    .metrics-grid .text-xs {
        font-size: 9px !important;
        margin-bottom: 4px !important;
    }
    
    .metrics-grid .text-xl {
        font-size: 18px !important;
        font-weight: 700 !important;
    }
    
    /* Profit Section Layout Mobile */
    .profit-layout {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .profit-metrics-container {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .profit-metrics-container > div {
        min-width: 200px !important;
        flex-shrink: 0 !important;
    }
    
    /* Chart Container Mobile */
    .bg-white.p-5 {
        padding: 12px !important;
        border-radius: 12px !important;
    }
    
    .bg-white.p-5 h4 {
        font-size: 14px !important;
        margin-bottom: 12px !important;
    }
    
    canvas {
        max-height: 220px !important;
    }
    
    [style*="position: relative; height: 350px"] {
        height: 220px !important;
    }
    
    /* Chart Legend Mobile */
    .chart-legend {
        grid-template-columns: 1fr 1fr !important;
        padding: 10px !important;
        gap: 8px !important;
        margin-top: 12px !important;
        border-radius: 10px !important;
    }
    
    .chart-legend .text-center {
        padding: 6px 0;
    }
    
    .chart-legend .text-xs {
        font-size: 9px !important;
        margin-bottom: 2px !important;
    }
    
    .chart-legend .text-sm {
        font-size: 10px !important;
    }
    
    .chart-legend i {
        font-size: 10px !important;
    }
    
    /* Theme Toggle Mobile */
    .theme-toggle {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .theme-toggle i {
        font-size: 18px;
    }
    
    /* Alert Cards Mobile */
    .alert-card {
        padding: 18px;
        border: 2px solid transparent;
        position: relative;
        overflow: hidden;
    }
    
    .alert-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 5px;
    }
    
    .alert-card > div:first-child {
        font-size: 13px;
    }
    
    .alert-card > div:nth-child(2) {
        font-size: 24px !important;
    }
    
    /* Stat Cards Mobile */
    .stat-card-content {
        gap: 12px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-number {
        font-size: 24px !important;
    }
    
    .stat-icon-box {
        width: 50px;
        height: 50px;
    }
    
    .stat-icon-box i {
        font-size: 20px;
    }
    
    /* Card Toggle Button Mobile */
    .card-toggle-btn {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    /* Chart Container Mobile */
    canvas {
        max-height: 250px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        grid-template-columns: 180px 1fr;
    }
    
    .sidebar {
        padding: 24px 16px;
    }
    
    .main-content {
        padding: 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .content-grid {
        gap: 16px;
    }
}

@media (min-width: 769px) {
    .mobile-header {
        display: none !important;
    }
    
    .mobile-overlay {
        display: none !important;
    }
}

/* === UTILITIES === */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-gray { color: var(--gray-500); }

.bg-primary { background: var(--primary); }
.bg-secondary { background: var(--secondary); }
.bg-success { background: var(--success); }
.bg-danger { background: var(--danger); }
.bg-warning { background: var(--warning); }
.bg-gray { background: var(--gray-100); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }
.rounded-2xl { border-radius: 20px; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow { box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.shadow-lg { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto-fit { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }

.w-10 { width: 10px; }
.h-10 { height: 10px; }

.relative { position: relative; }
.h-350 { height: 350px; }

.bg-white { background: white; }
.bg-green-50 { background: #f0fdf4; }
.bg-red-50 { background: #fef2f2; }
.bg-gray-50 { background: #f8fafc; }
.bg-yellow-gradient { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }

.text-green-600 { color: #059669; }
.text-red-600 { color: #dc2626; }
.text-yellow-800 { color: #92400e; }
.text-green-700 { color: #065f46; }
.text-amber-800 { color: #92400e; }
.text-indigo-700 { color: #3730a3; }
.text-blue-700 { color: #1e40af; }
.text-red-700 { color: #991b1b; }

.border-l-4 { border-left-width: 4px; }
.border-l-3 { border-left-width: 3px; }
.border-yellow-500 { border-left-color: #f59e0b; }
.border-green-500 { border-left-color: #10b981; }

/* ============================================
   BALANCE PAGE COMPONENTS
   ============================================ */

/* KPI Cards con gradientes */
.stat-card-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

/* Tarjetas específicas para monedas */
.stat-card-ars {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-usd {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-eur {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-btc {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-usdt {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-neutral {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #334155;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}

.stat-card-neutral .stat-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.stat-card-neutral .stat-number {
    color: #1e293b;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.stat-card-neutral .stat-icon-box {
    background: rgba(100, 116, 139, 0.1);
}

.stat-card-neutral .stat-icon-box i {
    color: #64748b;
}

.stat-card-green::before,
.stat-card-red::before,
.stat-card-purple::before,
.stat-card-orange::before,
.stat-card-blue::before,
.stat-card-amber::before,
.stat-card-ars::before,
.stat-card-usd::before,
.stat-card-eur::before,
.stat-card-btc::before,
.stat-card-usdt::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* Links inside stat-cards */
.stat-card-green a,
.stat-card-red a,
.stat-card-blue a,
.stat-card-purple a,
.stat-card-orange a,
.stat-card-amber a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.stat-card-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    z-index: 1;
    flex: 1;
    height: 100%;
}

.stat-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.stat-icon-box {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-box i {
    font-size: 22px;
}

.stat-number {
    margin: 6px 0 0 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    word-break: break-all;
}

.stat-label {
    margin: 0;
    font-size: 11px;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Asegurar que todas las stat-cards tengan texto blanco visible */
.stat-card-green .stat-label,
.stat-card-red .stat-label,
.stat-card-blue .stat-label,
.stat-card-purple .stat-label,
.stat-card-orange .stat-label,
.stat-card-amber .stat-label {
    color: rgba(255, 255, 255, 0.95);
}

.stat-card-green .stat-number,
.stat-card-red .stat-number,
.stat-card-blue .stat-number,
.stat-card-purple .stat-number,
.stat-card-orange .stat-number,
.stat-card-amber .stat-number {
    color: #ffffff;
}

.stat-card-green p,
.stat-card-red p,
.stat-card-blue p,
.stat-card-purple p,
.stat-card-orange p,
.stat-card-amber p {
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive para números muy largos */
@media (max-width: 1400px) {
    .stat-number {
        font-size: 22px;
    }
}

@media (max-width: 1200px) {
    .stat-number {
        font-size: 20px;
    }
    .stat-icon-box {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }
    .stat-icon-box i {
        font-size: 22px;
    }
}

/* Chart containers */
.chart-container {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

.chart-canvas-wrapper {
    position: relative;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Summary items */
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
}

.summary-item-green {
    background: #f0fdf4;
    border-left: 3px solid #10b981;
}

.summary-item-red {
    background: #fef2f2;
}

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

.summary-dot-green {
    background: #10b981;
}

.category-expense-item {
    border-left: 3px solid;
}

.balance-neto-positive {
    color: #10b981;
    font-size: 1.1rem;
    font-weight: 700;
}

.balance-neto-negative {
    color: #dc2626;
    font-size: 1.1rem;
    font-weight: 700;
}

.balance-total-row td {
    text-align: right;
    font-weight: 700;
    padding-top: 1rem;
}

.balance-total-neto {
    font-size: 1.2rem;
    font-weight: 700;
}

.balance-total-neto.positive {
    color: #10b981;
}

.balance-total-neto.negative {
    color: #dc2626;
}

.balance-income-total-row td {
    text-align: right;
    font-weight: 700;
    font-size: 1.1rem;
    padding-top: 1rem;
    border-top: 2px solid #10b981;
}

.balance-expense-subtotal-row td {
    text-align: right;
    font-weight: 600;
    padding-top: 1rem;
    border-top: 2px solid #e5e7eb;
}

.balance-expense-total-row td {
    text-align: right;
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 2px solid #dc2626;
}

.balance-bars-cost {
    color: #f97316;
    font-weight: 600;
}

.balance-detail-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

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

.balance-container {
    max-width: 100%;
    overflow-x: hidden;
}

.balance-comments-section {
    margin-top: 2rem;
}

.balance-comment-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.balance-comment-item {
    margin-bottom: 1rem;
}

.balance-comment-item {
    margin-bottom: 1rem;
}

.balance-comments-list {
    padding: 1.5rem;
}

.balance-comments-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.balance-comment-box {
    border-left: 3px solid #8b5cf6;
    padding: 1rem;
    padding-left: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.balance-comment-box-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.balance-comment-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.balance-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #8b5cf6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.balance-comment-user-name {
    font-weight: 600;
    color: #1f2937;
}

.balance-comment-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.balance-comment-edited {
    font-style: italic;
}

.balance-comment-text {
    color: #374151;
    line-height: 1.6;
    margin-top: 0.75rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ============================================
   BALANCE TABLES - OPTIMIZED UX/UI
   ============================================ */

.balance-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.balance-table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #475569;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.balance-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.balance-table tbody tr:hover {
    background: #f9fafb;
}

.balance-table tbody td {
    padding: 16px;
    vertical-align: middle;
}

.balance-table-account-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 15px;
    margin-bottom: 4px;
}

.balance-table-account-type {
    color: #64748b;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.balance-table-account-type i {
    font-size: 12px;
}

.balance-account-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.balance-account-owner {
    color: #92400e;
    font-size: 11px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.balance-amount-positive {
    color: #10b981;
    font-weight: 700;
    font-size: 16px;
}

.balance-amount-negative {
    color: #ef4444;
    font-weight: 700;
    font-size: 16px;
}

.balance-amount-neutral {
    color: #94a3b8;
    font-weight: 500;
}

.balance-transaction-count {
    color: #64748b;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.balance-transaction-badge {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    min-width: 40px;
}

.balance-total-row {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 3px solid #e2e8f0 !important;
}

.balance-total-row td {
    padding: 20px 16px !important;
    font-weight: 700;
    font-size: 14px;
}

.balance-total-label {
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
}

.balance-neto-display {
    font-size: 20px;
    font-weight: 800;
}

.balance-neto-display.positive {
    color: #10b981;
}

.balance-neto-display.negative {
    color: #ef4444;
}

/* Detalle Ingresos/Egresos */
.balance-detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.balance-detail-table thead th {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #065f46;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 2px solid #86efac;
}

.balance-detail-table.expense-table thead th {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border-bottom-color: #fca5a5;
}

.balance-detail-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.balance-detail-table tbody tr:hover {
    background: #fafafa;
}

.balance-detail-table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
}

.balance-detail-date {
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    white-space: nowrap;
}

.balance-detail-concept {
    font-weight: 700;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 2px;
}

.balance-detail-subconcept {
    color: #64748b;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.balance-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border-left: 3px solid;
    background: rgba(var(--badge-color-rgb), 0.1);
    color: var(--badge-color);
}

.balance-account-name {
    font-weight: 600;
    color: #334155;
    font-size: 13px;
}

.balance-income-amount {
    font-weight: 700;
    font-size: 16px;
    color: #10b981;
}

.balance-expense-amount {
    font-weight: 700;
    font-size: 16px;
    color: #ef4444;
}

.balance-voucher-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.balance-voucher-badge.has-voucher {
    background: #dbeafe;
    color: #1e40af;
}

.balance-voucher-badge.no-voucher {
    background: #f1f5f9;
    color: #94a3b8;
}

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

.balance-status-badge.paid {
    background: #d1fae5;
    color: #065f46;
}

.balance-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.balance-total-income-row {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-top: 3px solid #10b981 !important;
}

.balance-total-income-row td {
    padding: 18px 16px !important;
    font-weight: 700;
    color: #065f46;
}

.balance-total-expense-row {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-top: 3px solid #ef4444 !important;
}

.balance-total-expense-row td {
    padding: 18px 16px !important;
    font-weight: 700;
    color: #991b1b;
}

.balance-subtotal-row {
    background: #fafafa;
    border-top: 2px solid #e5e7eb !important;
}

.balance-subtotal-row td {
    padding: 14px 16px !important;
    font-weight: 600;
    color: #475569;
}

.balance-bars-row td {
    padding: 12px 16px !important;
    font-weight: 600;
}

.balance-bars-amount {
    color: #ea580c;
    font-weight: 700;
}

.budget-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
}

/* ============================================
   ACCOUNT PAGE COMPONENTS
   ============================================ */

/* Tabs de Navegación */
.account-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
    overflow-x: auto;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #2d3748;
    background: #f8f9fa;
}

.tab-btn.active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
    background: transparent;
}

.tab-btn i {
    margin-right: 0.5rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

/* Profile Photo Section */
.profile-photo-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.profile-photo-container {
    position: relative;
}

.profile-photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: white;
}

.profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.photo-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    background: #10b981;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.profile-photo-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.profile-photo-info p {
    margin: 0 0 1rem 0;
    opacity: 0.9;
    font-size: 13.5px;
    font-weight: 500;
}

.photo-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.photo-upload-btn {
    position: relative;
    overflow: hidden;
}

.photo-upload-btn input[type="file"] {
    position: absolute;
    left: -9999px;
}

.photo-upload-btn label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 13px 26px;
    background: white;
    color: #8b5cf6;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.photo-upload-btn label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-delete-photo {
    padding: 13px 26px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-photo:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Form Sections */
.account-form {
    max-width: 600px;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 17px;
    margin-bottom: 1rem;
    color: #2d3748;
    font-weight: 700;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3 i {
    color: #8b5cf6;
    font-size: 18px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
    font-size: 13.5px;
}

.form-group .required {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
    color: #2d3748;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-control:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 12.5px;
    color: #a0aec0;
    font-weight: 500;
}

.form-hint i {
    margin-right: 0.25rem;
}

/* Messages */
.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 13px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #dc2626;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.error-message.error-spacing {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.error-message.error-spacing-top {
    margin-top: 1rem;
}

.error-message i {
    font-size: 16px;
}

.success-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 13px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    color: #16a34a;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.success-message i {
    font-size: 16px;
}

.info-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 16px 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    border-radius: 12px;
    color: #1e40af;
    font-size: 13.5px;
    margin-bottom: 1.5rem;
}

.info-box i {
    font-size: 20px;
    color: #3b82f6;
    margin-top: 2px;
}

.info-box strong {
    color: #1e3a8a;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn-save {
    padding: 13px 26px;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-cancel {
    padding: 13px 26px;
    background: #f7fafc;
    color: #2d3748;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel:hover {
    background: #edf2f7;
}

.btn-add-custom {
    padding: 8px 16px;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-add-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.btn-add-custom i {
    font-size: 12px;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s;
    background: #ef4444;
}

.password-strength-bar.weak {
    width: 33%;
    background: #ef4444;
}

.password-strength-bar.medium {
    width: 66%;
    background: #f59e0b;
}

.password-strength-bar.strong {
    width: 100%;
    background: #10b981;
}

.password-requirements {
    margin-top: 1rem;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    font-size: 12.5px;
}

.password-requirements h4 {
    margin: 0 0 0.5rem 0;
    font-size: 13.5px;
    color: #2d3748;
    font-weight: 600;
}

.password-requirements ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #a0aec0;
}

.password-requirements li {
    margin-bottom: 0.25rem;
}

.password-requirements li.valid {
    color: #10b981;
    font-weight: 500;
}

.password-requirements li.valid::marker {
    content: '✓ ';
}

/* Placeholder text styles */
.placeholder-text {
    color: #a0aec0;
    margin-bottom: 2rem;
    font-size: 13.5px;
    font-weight: 500;
}

.placeholder-text-simple {
    color: #a0aec0;
    font-size: 13.5px;
    font-weight: 500;
}

/* ============================================
   EVENTS MODULE
   ============================================ */

/* Events Dashboard Grid */
.events-dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1.4fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Metrics Dashboard Vertical */
.metrics-dashboard-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Legacy horizontal layout (no longer used but kept for compatibility) */
.metrics-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-content: start;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.5), rgba(124, 58, 237, 0.5));
    opacity: 0;
    transition: opacity 0.3s;
}

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

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.metric-content {
    flex: 1;
    min-width: 0;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 11px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 4px;
}

/* Metric Color Variants */
.metric-total .metric-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.metric-total .metric-value {
    color: #8b5cf6;
}

.metric-total::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.metric-confirmed .metric-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.metric-confirmed .metric-value {
    color: #10b981;
}

.metric-confirmed::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.metric-pending .metric-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.metric-pending .metric-value {
    color: #f59e0b;
}

.metric-pending::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.metric-canceled .metric-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.metric-canceled .metric-value {
    color: #ef4444;
}

.metric-canceled::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.metric-attendees .metric-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.metric-attendees .metric-value {
    color: #3b82f6;
}

.metric-attendees::before {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.metric-budget .metric-icon {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
}

.metric-budget .metric-value {
    color: #ec4899;
}

.metric-budget::before {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

/* Upcoming Events Card */
.upcoming-events-card {
    display: flex;
    flex-direction: column;
    max-height: 450px;
}

/* Calendar card needs higher z-index so tooltip overlaps sibling grid items */
.calendar-card-container {
    position: relative;
    z-index: 2;
}

.card-header-upcoming {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.card-header-upcoming h3 {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.card-header-upcoming i {
    color: #8b5cf6;
    font-size: 16px;
}

.upcoming-events-list {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.upcoming-event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f7fafc;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.upcoming-event-item:last-child {
    margin-bottom: 0;
}

.upcoming-event-item:hover {
    background: #edf2f7;
    transform: translateX(4px);
    border-color: #8b5cf6;
}

.upcoming-event-date {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.upcoming-date-day {
    font-size: 18px;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.upcoming-date-month {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    margin-top: 2px;
}

.upcoming-event-details {
    flex: 1;
    min-width: 0;
}

.upcoming-event-name {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upcoming-event-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.upcoming-event-time,
.upcoming-event-customer {
    font-size: 11px;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 4px;
}

.upcoming-event-time i,
.upcoming-event-customer i {
    font-size: 10px;
    color: #8b5cf6;
}

.upcoming-event-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
    border: 1px solid transparent;
}

.upcoming-event-badge.estado-confirmado {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}

.upcoming-event-badge.estado-pendiente {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.2);
}

.upcoming-event-badge.estado-cancelado {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

.no-upcoming-events {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

.no-upcoming-events i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-upcoming-events p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

/* Calendar Styles */
.calendar-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.calendar-title {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.calendar-title i {
    color: #8b5cf6;
    font-size: 16px;
}

.calendar-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.calendar-nav-btn:hover {
    border-color: #8b5cf6;
    background: #8b5cf6;
    color: white;
    transform: scale(1.05);
}

.calendar-today-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 2px solid #8b5cf6;
    background: white;
    color: #8b5cf6;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.calendar-today-btn:hover {
    background: #8b5cf6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.calendar-grid {
    padding: 12px;
    overflow: visible;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}

.calendar-weekday {
    text-align: center;
    font-size: 9px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    padding: 4px 2px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    position: static;
    overflow: visible;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 4px;
    border-radius: 8px;
    background: #f7fafc;
    position: relative;
    transition: all 0.2s;
    cursor: pointer;
    min-height: 40px;
    max-height: 40px;
    overflow: visible;
    min-width: 0;
}

.calendar-day-wrapper {
    position: relative;
    overflow: visible;
}

.calendar-day:hover {
    z-index: 100002;
    position: relative;
    overflow: visible;
}

.calendar-day:hover:not(.empty):not(.today) {
    background: #edf2f7;
    transform: scale(1.02);
    z-index: 5;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day .day-number {
    font-size: 10px;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 2px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.calendar-day.today {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    align-items: center;
    justify-content: center;
}

.calendar-day.today .day-number {
    color: white;
    position: absolute;
    top: 4px;
    left: 4px;
    margin-bottom: 0;
    font-size: 9px;
}

.today-label {
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 4px;
}

.calendar-day.today .event-names {
    align-items: center;
    margin-top: 4px;
}

.calendar-day.has-events:not(.today) {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border: 2px solid #8b5cf6;
}

.calendar-day.has-events.today {
    border: 2px solid white;
}

.event-names {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 1px;
    overflow: hidden;
    max-height: 26px;
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.event-name {
    font-size: 7px;
    font-weight: 600;
    color: #4a5568;
    background: rgba(255, 255, 255, 0.9);
    padding: 1px 3px;
    border-radius: 3px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
}

.event-name i {
    font-size: 3px;
    color: #8b5cf6;
    margin-right: 2px;
    display: inline-block;
    vertical-align: middle;
}

.calendar-day.today .event-name {
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748;
}

.calendar-day.today .event-name i {
    color: #8b5cf6;
}

/* Calendar Tooltip */
.calendar-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    z-index: 100000 !important;
    min-width: 250px;
    max-width: 300px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
    pointer-events: none;
    border: 1px solid #e2e8f0;
}

.calendar-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: white;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
    z-index: 100001 !important;
}

.calendar-day:hover .calendar-tooltip,
.calendar-day.tooltip-active .calendar-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.calendar-tooltip-header {
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #8b5cf6;
}

.calendar-tooltip-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tooltip-event {
    background: #f7fafc;
    padding: 8px;
    border-radius: 8px;
    border-left: 3px solid #8b5cf6;
}

.tooltip-event-time {
    font-size: 11px;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 4px;
}

.tooltip-event-name {
    font-size: 12px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.tooltip-event-details {
    font-size: 10px;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tooltip-estado {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 9px;
    text-transform: uppercase;
}

.tooltip-estado.estado-confirmado {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.tooltip-estado.estado-pendiente {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.tooltip-estado.estado-cancelado {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.tooltip-estado.estado-en_curso {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.tooltip-estado.estado-finalizado {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
}

/* Dark Mode - Calendar Tooltip */
body.dark-mode .calendar-tooltip {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(26, 29, 41, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

body.dark-mode .calendar-tooltip::before {
    border-top-color: rgba(30, 35, 48, 0.98);
}

body.dark-mode .calendar-tooltip-header {
    color: var(--text-primary);
    border-bottom-color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .tooltip-event {
    background: rgba(212, 165, 116, 0.08);
    border-left-color: var(--accent-gold);
}

body.dark-mode .tooltip-event-time {
    color: var(--accent-gold);
}

body.dark-mode .tooltip-event-name {
    color: var(--text-primary);
}

body.dark-mode .tooltip-event-details {
    color: var(--text-secondary);
}

body.dark-mode .tooltip-estado {
    color: var(--accent-gold);
}

body.dark-mode .tooltip-estado.estado-confirmado {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

body.dark-mode .tooltip-estado.estado-pendiente {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

body.dark-mode .tooltip-estado.estado-cancelado {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

body.dark-mode .tooltip-estado.estado-en_curso {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

body.dark-mode .tooltip-estado.estado-finalizado {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

.event-indicator {
    position: absolute;
    bottom: 6px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.event-indicator i {
    font-size: 6px;
    color: #8b5cf6;
}

.calendar-day.today .event-indicator i {
    color: white;
}

.event-count {
    font-size: 10px;
    font-weight: 700;
    color: #8b5cf6;
    background: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day.today .event-count {
    color: #8b5cf6;
}

/* Table Wrapper with Horizontal Scroll */
.table-wrapper,
.table-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    /* Ocultar scrollbars */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.table-wrapper::-webkit-scrollbar,
.table-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.table-wrapper::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track {
    display: none;
}

.table-wrapper::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb {
    display: none;
}

.table-wrapper::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover {
    display: none;
}

/* Events Table */
.events-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.events-table thead {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.events-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.events-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f7fafc;
    font-size: 14px;
    color: #2d3748;
    white-space: normal;
    line-height: 1.6;
    vertical-align: top;
}

.events-table tbody tr {
    transition: all 0.2s;
}

.events-table tbody tr:hover {
    background: #fafbfc;
    transform: scale(1.001);
}

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

.events-table td small {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-badge.pendiente {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.aprobado {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.confirmado {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.en_curso {
    background: #e0e7ff;
    color: #4338ca;
}

.status-badge.finalizado {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.cancelado {
    background: #fee2e2;
    color: #991b1b;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-edit {
    background: #e0e7ff;
    color: #4338ca;
}

.btn-edit:hover {
    background: #c7d2fe;
    transform: scale(1.05);
}

.btn-delete {
    background: #fee2e2;
    color: #991b1b;
}

.btn-delete:hover {
    background: #fecaca;
    transform: scale(1.05);
}

.btn-download {
    background: #d1fae5;
    color: #065f46;
}

.btn-download:hover {
    background: #a7f3d0;
    transform: scale(1.05);
}

.btn-info {
    background: #dbeafe;
    color: #1e40af;
}

.btn-info:hover {
    background: #bfdbfe;
    transform: scale(1.05);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

.modal-header {
    padding: 16px 20px 12px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    letter-spacing: -0.3px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f7fafc;
    color: #4a5568;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 14px 20px 16px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Form file upload */
.form-file {
    display: none;
}

/* === SUPPLIERS MODULE STYLES === */

/* File Upload Styles */
.file-upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f7ff 0%, #faf9ff 100%);
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    color: #64748b;
    font-weight: 500;
}

.file-label:hover {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #f5f3ff 0%, #faf8ff 100%);
    color: #8b5cf6;
}

.file-label i {
    font-size: 20px;
}

.file-upload-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f7fafc;
}

.file-upload-label:hover {
    border-color: #8b5cf6;
    background: #faf5ff;
}

.file-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.file-info {
    flex: 1;
}

.file-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.file-info p {
    font-size: 12px;
    color: #a0aec0;
}

.file-name {
    margin-top: 8px;
    font-size: 13px;
    color: #8b5cf6;
    font-weight: 500;
}

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

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    color: #2d3748;
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-input::placeholder {
    color: #cbd5e0;
}

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

/* Estilos para select con subcategorías */
.form-input option,
.form-select option {
    padding: 8px 12px;
}

.subcategoria-option {
    font-style: italic;
    color: #64748b !important;
    font-size: 13px;
    padding-left: 24px !important;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.table-title {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

/* Dark Mode - Table Title */
body.dark-mode .table-title {
    color: var(--accent-gold);
    text-align: left;
    justify-content: flex-start;
}

body.dark-mode .table-title i {
    color: var(--accent-gold);
}

/* Table Title - Always left aligned */
.table-title {
    text-align: left !important;
    justify-content: flex-start !important;
}

.table-subtitle {
    font-size: 13px;
    color: #a0aec0;
    margin-top: 4px;
}

/* === PRODUCT TYPE BADGES === */
.badge-mobiliario {
    background: #e0e7ff;
    color: #4338ca;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-bebida {
    background: #fce7f3;
    color: #9f1239;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-ambos {
    background: #e0f2fe;
    color: #075985;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Badges para transacciones */
.badge-success {
    background: #d1fae5;
    color: #065f46;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* === UTILITY CLASSES === */
.text-center { text-align: center; }
.text-purple { color: #8b5cf6; }
.text-green { color: #10b981; }
.text-gray { color: #4a5568; }
.text-gray-light { color: #a0aec0; }
.text-gray-lighter { color: #cbd5e0; }
.text-dark { color: #2d3748; }

.bg-light { background: #f7fafc; }
.bg-gradient-purple { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-gap-10 { gap: 10px; }

.font-mono {
    font-family: monospace;
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 6px;
    color: #4a5568;
    font-size: 13px;
}

.icon-purple { color: #8b5cf6; }
.icon-green { color: #10b981; }
.icon-orange { color: #f59e0b; }
.icon-blue { color: #3b82f6; }
.icon-gray { color: #a0aec0; }

.padding-left-50 { padding-left: 50px; }

.subcategory-row {
    background: #f7fafc;
}

.subcategory-arrow {
    color: #cbd5e0;
    margin-right: 8px;
}

.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.product-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-placeholder i {
    color: #a0aec0;
    font-size: 24px;
}

.inline-form {
    display: inline;
}

.category-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-icon i {
    color: #8b5cf6;
    font-size: 16px;
}

.category-name strong {
    color: #2d3748;
}

.category-name small {
    color: #a0aec0;
}

.subcategory-desc {
    color: #cbd5e0;
    padding-left: 28px;
}

.type-label-mobiliario {
    font-size: 12px;
    color: #667eea;
}

.type-label-bebida {
    font-size: 12px;
    color: #f5576c;
}

.count-purple {
    color: #8b5cf6;
    font-weight: bold;
}

.count-green {
    color: #10b981;
    font-weight: bold;
}

.stock-global-container {
    text-align: center;
}

.stock-value {
    font-size: 16px;
    display: block;
}

.stock-value.positive {
    color: #10b981;
}

.stock-value.negative {
    color: #ef4444;
}

.stock-label {
    color: #a0aec0;
    font-size: 11px;
    display: block;
    margin-bottom: 4px;
}

.view-stock-btn {
    background: none;
    border: none;
    color: #8b5cf6;
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    display: inline-block;
    margin-top: 2px;
}

.view-stock-btn:hover {
    text-decoration: underline;
}

.price-main {
    color: #10b981;
    font-size: 15px;
}

.price-cost {
    color: #a0aec0;
    font-size: 11px;
}

.spec-text {
    font-size: 12px;
    color: #4a5568;
}

.spec-text i {
    margin-right: 4px;
}

/* === WAREHOUSE/DEPOSITO BADGES === */
.badge-movil {
    background: #fef3c7;
    color: #92400e;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-fijo {
    background: #d1fae5;
    color: #065f46;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.warehouse-name {
    color: #2d3748;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.warehouse-name i {
    color: #8b5cf6;
    margin-right: 8px;
}

/* Deposito Card in Carousel */
.deposito-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

.address-text {
    color: #4a5568;
}

.address-text i {
    color: #10b981;
    margin-right: 4px;
}

.address-empty {
    color: #cbd5e0;
}

.product-count {
    font-weight: 600;
    color: #4a5568;
}

.product-count i {
    color: #f59e0b;
    margin-right: 4px;
}

.units-total {
    color: #10b981;
    font-size: 15px;
}

/* === CUSTOMER & EVENT DETAIL CLASSES === */
.customer-detail-text {
    font-size: 12px;
    color: #a0aec0;
}

.empty-data {
    color: #a0aec0;
}

.customer-link {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.customer-link:hover {
    color: #7c3aed;
}

.customer-secondary {
    color: #a0aec0;
}

.empty-customer {
    color: #cbd5e0;
}

.info-section {
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #faf8ff 100%);
    border-radius: 16px;
    border: 2px solid #e9d5ff;
}

.info-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-section-title i {
    color: #8b5cf6;
}

.info-label {
    color: #718096;
    font-weight: 600;
    font-size: 13px;
}

.info-value {
    color: #2d3748;
    font-weight: 500;
}

.info-value-strong {
    color: #2d3748;
    font-weight: 700;
    font-size: 15px;
}

.subsection-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.subsection-title i {
    color: #10b981;
}

.contact-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.contact-detail {
    color: #718096;
    margin-bottom: 4px;
}

.error-link {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.error-link a {
    color: #8b5cf6;
    text-decoration: underline;
}

.error-link a:hover {
    color: #7c3aed;
}

/* === BUDGETS SPECIFIC STYLES === */

/* Empty State - Budgets Enhancement */
.empty-state {
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.03) 0%, transparent 70%);
    animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 0.8; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3); }
    100% { transform: scale(1); }
}

.empty-state-icon i {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.2));
}

.empty-state:hover .empty-state-icon i {
    filter: drop-shadow(0 6px 16px rgba(139, 92, 246, 0.3));
}

/* Badge Count */
.badge-count {
    display: inline-block;
    background: #f0f4ff;
    color: #4338ca;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

/* Monto Total */
.monto-total {
    color: #059669;
    font-size: 15px;
}

/* Modal Large */
.modal-large {
    max-width: 900px;
    width: 90%;
}

/* Product Search Section */
.product-search-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.search-header h3 {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 12px;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* Search Results */
.search-results {
    margin-top: 8px;
}

.results-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s;
}

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

.result-item:hover {
    background: #f9fafb;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
    font-size: 14px;
}

.result-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.result-sku {
    font-size: 11px;
    color: #6b7280;
}

.result-price {
    font-weight: 700;
    color: #059669;
    font-size: 15px;
}

.no-results {
    padding: 32px 20px;
    text-align: center;
    color: #6b7280;
    font-style: italic;
    background: linear-gradient(135deg, #fafbff 0%, #faf9ff 100%);
    border-radius: 8px;
    margin: 8px 0;
    font-size: 14px;
}

.no-results::before {
    content: '🔍';
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Budget Items Section */
.budget-items-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
}

.items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.items-header h3 {
    font-size: 16px;
    color: #1f2937;
}

.total-preview {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
}

.items-list {
    min-height: 200px;
}

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

.items-table thead {
    background: #f9fafb;
}

.items-table th {
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.items-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

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

.items-table .subtotal {
    color: #059669;
}

.qty-input {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.qty-input:focus {
    outline: none;
    border-color: #8b5cf6;
}

.empty-items {
    padding: 80px 20px;
    text-align: center;
    color: #9ca3af;
    background: linear-gradient(135deg, #fafbff 0%, #faf9ff 100%);
    border-radius: 16px;
    border: 2px dashed #e5e7eb;
    position: relative;
}

.empty-items::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.02) 0%, transparent 70%);
    pointer-events: none;
}

.empty-items i {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.4;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.15));
}

.empty-items p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #4b5563;
}

.empty-items small {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
}

/* Button View */
.btn-view {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.btn-view:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.btn-view-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-view-green:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* ============================================
   BUDGET EDITOR - Vista dedicada para editar presupuestos
   ============================================ */

/* Back Button */
.back-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f7fafc;
    color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.back-btn:hover {
    background: #e2e8f0;
    transform: translateX(-3px);
    color: #1a202c;
}

/* Budget Invoice Header - Professional Design */
.budget-invoice-header {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: visible;
    height: auto;
    min-height: fit-content;
}

.invoice-header-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 14px 18px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #fafbff 0%, #f7f9fc 100%);
    border-radius: 12px 12px 0 0;
}

.invoice-company {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-btn-invoice {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    transition: all 0.15s;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    font-size: 14px;
}

.back-btn-invoice:hover {
    background: #f7fafc;
    transform: translateX(-2px);
    color: #8b5cf6;
    border-color: #8b5cf6;
}

.company-name {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.3px;
}

.company-tagline {
    font-size: 11px;
    color: #718096;
    margin: 2px 0 0 0;
    font-weight: 500;
}

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

.invoice-title {
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    margin: 0 0 3px 0;
    letter-spacing: 1.5px;
}

.invoice-number {
    font-size: 18px;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.status-badge-invoice {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.status-badge-invoice.pendiente {
    background: #fef3c7;
    color: #92400e;
}

.status-badge-invoice.aprobado {
    background: #d1fae5;
    color: #065f46;
}

.status-badge-invoice.rechazado {
    background: #fee2e2;
    color: #991b1b;
}

.invoice-info-section {
    display: grid;
    grid-template-columns: minmax(250px, 1.2fr) minmax(200px, 1fr) minmax(180px, 0.8fr);
    gap: 14px;
    padding: 16px 18px 18px 18px;
    align-items: stretch;
}

.invoice-party {
    padding: 14px;
    background: #fafbfc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: fit-content;
}

.party-label {
    font-size: 9px;
    font-weight: 700;
    color: #8b5cf6;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.party-name {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
    word-wrap: break-word;
}

.party-detail {
    font-size: 11px;
    color: #4a5568;
    margin-bottom: 5px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    white-space: normal;
}

.party-detail strong {
    color: #718096;
    font-weight: 600;
    display: inline-block;
    min-width: 60px;
}

.party-detail i {
    font-size: 10px;
    margin-right: 5px;
    color: #8b5cf6;
    width: 14px;
    display: inline-block;
    text-align: center;
}

.event-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 6px;
}

.event-detail {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #4a5568;
}

.event-detail i {
    color: #8b5cf6;
    font-size: 10px;
    width: 14px;
}

.invoice-total-box {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 180px;
}

.budget-actions-inside {
    margin-top: 15px;
    padding-top: 12px;
    padding-bottom: 5px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 0 0 10px 10px;
    margin: 15px -12px -12px -12px;
    padding: 12px;
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.btn-confirm-budget-inside {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-confirm-budget-inside:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}

.btn-edit-invoice-inside {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-edit-invoice-inside:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
}

.btn-pdf-preview-inside {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-pdf-preview-inside:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.btn-pdf-export-inside {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-pdf-export-inside:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
}

.budget-actions-container {
    background: #f9fafb;
    padding: 10px;
    border-radius: 0 0 10px 10px;
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    border-top: 1px solid #e5e7eb;
}

.total-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    opacity: 0.8;
    margin-bottom: 3px;
    color: white !important;

}

.total-amount-big {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-edit-invoice {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-edit-invoice:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-edit-invoice i {
    margin-right: 3px;
    font-size: 10px;
}

.btn-pdf-preview {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.btn-pdf-preview:hover {
    background: rgba(59, 130, 246, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-pdf-preview i {
    font-size: 10px;
}

.btn-confirm-budget {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.btn-confirm-budget:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-confirm-budget i {
    font-size: 10px;
}

.btn-confirm-budget-large {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-confirm-budget-large:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-edit-invoice-large {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}

.btn-edit-invoice-large:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.btn-pdf-preview-large {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-pdf-preview-large:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-pdf-export-large {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.btn-pdf-export-large:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.btn-pdf-export {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.btn-pdf-export:hover {
    background: rgba(220, 38, 38, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-pdf-export i {
    font-size: 10px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .invoice-info-section {
        grid-template-columns: 1fr;
    }
    
    .invoice-total-box {
        min-width: auto;
    }
}

/* Budget Info Card */
.budget-info-card {
    margin-bottom: 0px;
}

.budget-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.info-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.info-item i {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
    font-size: 18px;
    flex-shrink: 0;
}

.info-item-total i {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
}

.info-item div {
    flex: 1;
}

.info-item label {
    display: block;
    font-size: 12px;
    color: #718096;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item strong {
    display: block;
    font-size: 16px;
    color: #2d3748;
    font-weight: 700;
}

.total-amount {
    font-size: 24px !important;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.budget-actions {
    padding: 20px 24px;
    display: flex;
    justify-content: flex-end;
}

.budget-status-badge {
    display: flex;
    align-items: center;
}

/* Two Column Layout - REMOVED, now using single column */

/* Product Search Card - Full Width */
.product-search-card-full {
    margin-bottom: 24px;
}

.product-search-card-full .search-box {
    padding: 20px 24px;
}

.product-search-card-full .product-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 12px 12px 12px;
}

/* Responsive grid for search results */
.product-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    padding: 0 12px 12px 12px;
}

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

/* Product Search Card - Full Width */
.product-search-card-full {
    margin-bottom: 24px;
}

.product-search-card-full .search-box {
    padding: 20px 24px;
}

.product-search-card-full .product-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 12px 12px 12px;
}

/* Responsive grid for search results */
.product-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    padding: 0 12px 12px 12px;
}

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

.card-header {
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: #8b5cf6;
}

.card-subtitle {
    font-size: 13px;
    color: #718096;
    margin-top: 4px;
}

.search-box {
    padding: 20px 24px;
    position: relative;
}

.search-input-modern {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 14px;
    transition: all 0.2s;
    background: #f7fafc;
}

.search-input-modern:focus {
    outline: none;
    border-color: #8b5cf6;
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-icon-modern {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 16px;
}

/* Product Result Items */
.product-result-item {
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 10px;
    background: #f7fafc;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.product-result-item:hover {
    background: white;
    border-color: #8b5cf6;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.12);
}

.product-result-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 3px;
}

.product-result-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.product-sku {
    font-size: 11px;
    color: #718096;
    font-weight: 500;
}

.product-result-price {
    font-size: 16px;
    font-weight: 700;
    color: #8b5cf6;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.product-result-price i {
    font-size: 18px;
    opacity: 0.6;
    transition: all 0.15s;
}

.product-result-item:hover .product-result-price i {
    opacity: 1;
    transform: scale(1.15);
}

.no-results-modern {
    text-align: center;
    padding: 48px 24px;
    color: #a0aec0;
}

.no-results-modern i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results-modern p {
    font-size: 14px;
    color: #718096;
}

/* Budget Items Card */
.budget-items-card {
    min-height: 600px;
}

.items-count {
    display: flex;
    align-items: center;
    gap: 8px;
}

.budget-items-list {
    padding: 12px;
}

.budget-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.budget-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #718096;
}

.item-separator {
    color: #cbd5e0;
}

.item-price {
    font-weight: 600;
    color: #8b5cf6;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7fafc;
    padding: 6px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: white;
    color: #8b5cf6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 12px;
}

.qty-btn:hover {
    background: #8b5cf6;
    color: white;
    transform: scale(1.1);
}

.qty-input-modern {
    width: 60px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
}

.qty-input-modern:focus {
    outline: none;
}

.item-subtotal {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    min-width: 120px;
    text-align: right;
}

.btn-remove {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: #fee;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.05);
}

.empty-items-state {
    text-align: center;
    padding: 80px 24px;
    color: #a0aec0;
}

.empty-items-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-items-state p {
    font-size: 16px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 8px;
}

.empty-items-state small {
    font-size: 13px;
    color: #9ca3af;
}

/* Quantity Modal Styles */
.quantity-product-info {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.quantity-product-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.quantity-product-details {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.quantity-sku {
    font-size: 11px;
    color: #718096;
    font-weight: 500;
}

.quantity-price {
    font-size: 14px;
    font-weight: 700;
    color: #8b5cf6;
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f7fafc;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.qty-selector-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.qty-selector-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.qty-selector-btn:active {
    transform: scale(0.95);
}

.qty-selector-input {
    width: 80px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    border: none;
    background: white;
    border-radius: 8px;
    padding: 8px;
}

.qty-selector-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.quantity-total-preview {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    padding: 14px 16px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    color: white;
}

.quantity-total-preview span {
    font-size: 14px;
    font-weight: 600;
}

.quantity-total-preview strong {
    font-size: 22px;
    font-weight: 700;
}

/* ============================================
   COMPACT BUDGET UI - Optimized for many items
   ============================================ */

/* Compact Search */
.product-search-card-compact {
    margin-bottom: 0px;
}

.search-box-compact {
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input-compact {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    transition: all 0.2s;
    background: #fff;
}

.search-input-compact:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.product-results-compact {
    max-height: 280px;
    overflow-y: auto;
    padding: 0 8px 8px 8px;
}

/* Compact Items Card */
.budget-items-card-compact {
    margin-bottom: 20px;
}

.card-header-compact {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f7fafc 0%, #fff 100%);
}

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

.items-header-left h3 {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.items-header-left h3 i {
    color: #8b5cf6;
    font-size: 13px;
}

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

.total-label {
    font-size: 12px;
    color: #718096;
    font-weight: 600;
}

.total-amount-compact {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Compact Items List */
.budget-items-list-compact {
    padding: 6px;
    max-height: 60vh;
    overflow-y: auto;
}

.budget-item-compact {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: all 0.15s;
}

.budget-item-compact:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.item-left {
    flex: 1;
    min-width: 0;
}

.item-left h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-sku-compact {
    font-size: 11px;
    color: #718096;
    font-weight: 500;
}

.item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.item-price-compact {
    font-size: 13px;
    font-weight: 600;
    color: #8b5cf6;
    min-width: 70px;
    text-align: right;
}

/* Compact Quantity Control */
.quantity-control-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f7fafc;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.qty-btn-compact {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: white;
    color: #8b5cf6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-size: 10px;
}

.qty-btn-compact:hover {
    background: #8b5cf6;
    color: white;
    transform: scale(1.05);
}

.qty-input-compact {
    width: 45px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
}

.qty-input-compact:focus {
    outline: none;
}

.item-subtotal-compact {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
    min-width: 90px;
    text-align: right;
}

.btn-remove-compact {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: #fee;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.btn-remove-compact:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.05);
}

.empty-items-state-compact {
    text-align: center;
    padding: 40px 24px;
    color: #a0aec0;
}

.empty-items-state-compact i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-items-state-compact p {
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 4px;
}

.empty-items-state-compact small {
    font-size: 12px;
    color: #9ca3af;
}

/* Scrollbar styling for items list */
.budget-items-list-compact::-webkit-scrollbar {
    width: 8px;
}

.budget-items-list-compact::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 4px;
}

.budget-items-list-compact::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.budget-items-list-compact::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* ============================================
   CENTRALIZED STYLES - Summary Cards & Stats
   ============================================ */

/* === SUMMARY CARDS GRID === */
.summary-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* === SUMMARY CARD BASE === */
.summary-card {
    border-radius: 12px;
    padding: 24px;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.summary-card-info {
    flex: 1;
}

.summary-card-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.summary-card-value {
    font-size: 36px;
    font-weight: bold;
}

.summary-card-subtext {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

.summary-card-icon {
    font-size: 48px;
    opacity: 0.3;
}

/* === SUMMARY CARD VARIANTS (Gradients) === */
.summary-card-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.summary-card-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.summary-card-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.summary-card-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.summary-card-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.summary-card-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* === STAT CARDS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* === STAT CARD BASE === */
.stat-card {
    padding: 24px;
    border-radius: 16px;
    color: white;
}

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

.stat-card-info p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.stat-card-info h2 {
    margin: 8px 0 0 0;
    font-size: 28px;
    font-weight: 700;
}

.stat-card-info .stat-subtext {
    margin: 4px 0 0 0;
    font-size: 12px;
    opacity: 0.8;
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-icon i {
    font-size: 28px;
}

/* === STAT CARD VARIANTS (with shadows) === */
.stat-card-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.stat-card-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.stat-card-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

/* === INFO SECTIONS === */
.info-section {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.info-section-title {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-section-title i {
    margin-right: 8px;
}

/* === INFO SECTION VARIANTS === */
.info-section-general {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid #8b5cf6;
}

.info-section-general .info-section-title {
    color: #2d3748;
}

.info-section-general .info-section-title i {
    color: #8b5cf6;
}

.info-section-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #10b981;
}

.info-section-success .info-section-title {
    color: #065f46;
}

.info-section-success .info-section-title i {
    color: #10b981;
}

.info-section-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 4px solid #3b82f6;
}

.info-section-info .info-section-title {
    color: #1e40af;
}

.info-section-info .info-section-title i {
    color: #3b82f6;
}

.info-section-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
}

.info-section-warning .info-section-title {
    color: #92400e;
}

.info-section-warning .info-section-title i {
    color: #f59e0b;
}

.info-section-purple {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-left: 4px solid #8b5cf6;
}

.info-section-purple .info-section-title {
    color: #5b21b6;
}

.info-section-purple .info-section-title i {
    color: #8b5cf6;
}

.info-section-product {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
}

.info-section-product .info-section-title {
    color: #1e40af;
}

.info-section-product .info-section-title i {
    color: #3b82f6;
}

.info-section-product p {
    margin: 0 0 16px 0;
    font-size: 12px;
    color: #3b82f6;
    line-height: 1.5;
}

/* === FLEX UTILITIES === */
.flex {
    display: flex;
}

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

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-start {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.flex-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

/* === SPACING UTILITIES === */
.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-30 { margin-bottom: 30px; }

.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-25 { margin-top: 25px; }

.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }

/* === ALERT BOXES === */
.alert-box {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.alert-box-danger {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
}

.alert-box-danger .alert-label {
    color: #991b1b;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-box-danger .alert-value {
    color: #7f1d1d;
    font-size: 28px;
    font-weight: 700;
}

.alert-box-danger .alert-subtext {
    color: #991b1b;
    font-size: 11px;
    margin-top: 4px;
}

.alert-box-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.alert-box-warning .alert-label {
    color: #92400e;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-box-warning .alert-value {
    color: #78350f;
    font-size: 28px;
    font-weight: 700;
}

.alert-box-warning .alert-subtext {
    color: #92400e;
    font-size: 11px;
    margin-top: 4px;
}

.alert-box-info {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
}

.alert-box-info .alert-label {
    color: #1e40af;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-box-info .alert-value {
    color: #1e3a8a;
    font-size: 28px;
    font-weight: 700;
}

.alert-box-info .alert-subtext {
    color: #1e40af;
    font-size: 11px;
    margin-top: 4px;
}

/* === EMPTY STATE === */
.empty-state-centered {
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.empty-state-centered i {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state-centered h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-centered p {
    font-size: 14px;
    margin: 0;
}

.empty-state-success {
    color: #10b981;
}

.empty-state-success h3 {
    color: #2d3748;
}

.empty-state-success p {
    color: #6b7280;
}

/* === MODAL UTILITIES === */
.modal-sm {
    max-width: 450px;
}

.modal-md {
    max-width: 600px;
}

.modal-lg {
    max-width: 800px;
}

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

.modal-header-gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 20px 24px;
}

.modal-header-gradient-purple h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.modal-header-gradient-purple h2 i {
    margin-right: 12px;
    font-size: 22px;
}

.modal-close-btn-white {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close-btn-white i {
    font-size: 16px;
}

.modal-body-padded {
    padding: 30px 24px;
}

.modal-footer-styled {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* === TABLE UTILITIES === */
.table-container-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-min-width-1600 {
    min-width: 1600px;
}

/* === TEXT UTILITIES === */
.text-muted {
    color: #94a3b8;
}

.text-danger {
    color: #ef4444;
}

.text-success {
    color: #059669;
}

.text-warning {
    color: #f59e0b;
}

.text-info {
    color: #3b82f6;
}

.text-purple {
    color: #8b5cf6;
}

.text-bold {
    font-weight: bold;
}

.text-semibold {
    font-weight: 600;
}

.font-size-11 { font-size: 11px; }
.font-size-12 { font-size: 12px; }
.font-size-13 { font-size: 13px; }
.font-size-14 { font-size: 14px; }
.font-size-15 { font-size: 15px; }

/* === BADGE UTILITIES === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid transparent;
    background: #ede9fe;
    color: #7c3aed;
}

body.dark-mode .badge {
    border-color: currentColor;
    background: rgba(255, 255, 255, 0.05) !important;
}

.badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fed7aa;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-purple {
    background: #f3e8ff;
    color: #7c3aed;
}

/* === LINK UTILITIES === */
.link-purple {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
}

.link-purple:hover {
    color: #7c3aed;
    text-decoration: underline;
}

/* === ICON TEXT === */
.icon-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-text i {
    font-size: 14px;
}

/* === FORM UTILITIES === */
.form-text-helper {
    color: #64748b;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.form-text-success {
    color: #065f46;
    font-size: 12px;
    margin-top: 8px;
    display: block;
}

.form-text-warning {
    color: #92400e;
    font-size: 12px;
}

/* === BANK ACCOUNT SECTION === */
.bank-account-section {
    margin-top: 25px;
    padding: 20px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.bank-account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.bank-account-title {
    margin: 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
}

.bank-account-title i {
    color: #8b5cf6;
    margin-right: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-label span {
    color: #64748b;
    font-size: 14px;
}

/* === INFO BOX === */
.info-box {
    padding: 12px;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    margin-top: 15px;
}

.info-box p {
    margin: 0;
    font-size: 13px;
    color: #92400e;
}

.info-box i {
    margin-right: 6px;
}

/* === SALDO BADGE === */
.saldo-positive {
    color: #059669;
    font-weight: bold;
}

.saldo-negative {
    color: #ef4444;
    font-weight: bold;
}

.saldo-neutral {
    color: #64748b;
    font-weight: bold;
}

/* === INLINE DISPLAY === */
.display-inline {
    display: inline;
}

.display-inline-flex {
    display: inline-flex;
}

/* === BORDER UTILITIES === */
.border-left-success {
    border-left: 4px solid #10b981;
}

.border-left-danger {
    border-left: 4px solid #ef4444;
}

.border-left-warning {
    border-left: 4px solid #f59e0b;
}

.border-left-info {
    border-left: 4px solid #3b82f6;
}

.border-left-purple {
    border-left: 4px solid #8b5cf6;
}

/* === BACKGROUND UTILITIES === */
.bg-light {
    background: #f9fafb;
}

.bg-white {
    background: #ffffff;
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* === FILTERS SECTION === */
.filters-section {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

body.dark-mode .filters-section {
    background: rgba(26, 29, 41, 0.6);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-label {
    display: block;
}

body.dark-mode .filter-label {
    color: var(--gold-light);
    font-weight: 500;
}

/* Botones con gradientes */
.btn-edit {
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-delete {
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ============================================
   SISTEMA DE COLORES - UTILITY CLASSES
   ============================================ */

/* --- TEXT COLORS --- */
/* Grises y Neutrales */
.text-slate-900 { color: #1e293b; }
.text-slate-800 { color: #1e293b; }
.text-slate-700 { color: #334155; }
.text-slate-600 { color: #475569; }
.text-slate-500 { color: #64748b; }
.text-slate-400 { color: #94a3b8; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-200 { color: #e2e8f0; }

.text-gray-900 { color: #1f2937; }
.text-gray-800 { color: #1e293b; }
.text-gray-700 { color: #374151; }
.text-gray-600 { color: #4b5563; }
.text-gray-500 { color: #6b7280; }
.text-gray-400 { color: #9ca3af; }
.text-gray-300 { color: #cbd5e0; }
.text-gray-200 { color: #a0aec0; }

.text-neutral-900 { color: #2d3748; }
.text-neutral-800 { color: #2d3748; }
.text-neutral-700 { color: #475569; }
.text-neutral-600 { color: #64748b; }
.text-neutral-500 { color: #718096; }

/* Verdes - Success */
.text-green-900 { color: #14532d; }
.text-green-800 { color: #166534; }
.text-green-700 { color: #15803d; }
.text-green-600 { color: #16a34a; }
.text-green-500 { color: #10b981; }
.text-green-400 { color: #059669; }
.text-green-300 { color: #047857; }
.text-emerald-900 { color: #065f46; }
.text-emerald-700 { color: #047857; }
.text-emerald-600 { color: #059669; }

/* Rojos - Danger */
.text-red-900 { color: #7f1d1d; }
.text-red-800 { color: #991b1b; }
.text-red-700 { color: #b91c1c; }
.text-red-600 { color: #dc2626; }
.text-red-500 { color: #ef4444; }
.text-red-400 { color: #f87171; }
.text-red-alt { color: #c33; }

/* Púrpuras - Brand */
.text-purple-900 { color: #581c87; }
.text-purple-800 { color: #6b21a8; }
.text-purple-700 { color: #7c3aed; }
.text-purple-600 { color: #8b5cf6; }
.text-purple-500 { color: #a855f7; }
.text-violet-900 { color: #5b21b6; }
.text-violet-800 { color: #6b21a8; }
.text-violet-700 { color: #7c3aed; }

/* Azules - Info */
.text-blue-900 { color: #1e3a8a; }
.text-blue-800 { color: #1e40af; }
.text-blue-700 { color: #2563eb; }
.text-blue-600 { color: #3b82f6; }
.text-blue-500 { color: #60a5fa; }
.text-indigo-900 { color: #312e81; }
.text-indigo-800 { color: #3730a3; }
.text-indigo-700 { color: #4338ca; }
.text-sky-900 { color: #0c4a6e; }
.text-sky-600 { color: #0284c7; }
.text-sky-500 { color: #0ea5e9; }

/* Amarillos/Naranjas - Warning */
.text-amber-900 { color: #78350f; }
.text-amber-800 { color: #92400e; }
.text-amber-600 { color: #d97706; }
.text-amber-500 { color: #f59e0b; }
.text-yellow-400 { color: #fbbf24; }
.text-orange-600 { color: #ea580c; }

/* --- BACKGROUND COLORS --- */
/* Grises y Neutrales */
.bg-white { background: #ffffff; }
.bg-slate-50 { background: #f8fafc; }
.bg-slate-100 { background: #f1f5f9; }
.bg-slate-200 { background: #e2e8f0; }
.bg-gray-50 { background: #f9fafb; }
.bg-gray-100 { background: #f3f4f6; }
.bg-gray-200 { background: #e5e7eb; }
.bg-neutral-50 { background: #f8fafb; }
.bg-neutral-100 { background: #f7fafc; }

/* Verdes */
.bg-green-50 { background: #f0fdf4; }
.bg-green-100 { background: #dcfce7; }
.bg-green-200 { background: #bbf7d0; }
.bg-green-300 { background: #86efac; }
.bg-green-400 { background: #4ade80; }
.bg-emerald-50 { background: #ecfdf5; }
.bg-emerald-100 { background: #d1fae5; }
.bg-emerald-200 { background: #a7f3d0; }
.bg-emerald-300 { background: #6ee7b7; }

/* Rojos */
.bg-red-50 { background: #fef2f2; }
.bg-red-100 { background: #fee2e2; }
.bg-red-200 { background: #fecaca; }
.bg-red-300 { background: #fca5a5; }
.bg-rose-100 { background: #ffe4e6; }
.bg-pink-alt { background: #fee; }

/* Púrpuras */
.bg-purple-50 { background: #faf5ff; }
.bg-purple-100 { background: #f3e8ff; }
.bg-purple-200 { background: #e9d5ff; }
.bg-purple-300 { background: #d8b4fe; }
.bg-purple-400 { background: #c084fc; }
.bg-violet-50 { background: #f5f3ff; }
.bg-violet-100 { background: #ede9fe; }
.bg-violet-200 { background: #ddd6fe; }

/* Azules */
.bg-blue-50 { background: #eff6ff; }
.bg-blue-100 { background: #dbeafe; }
.bg-blue-200 { background: #bfdbfe; }
.bg-blue-300 { background: #93c5fd; }
.bg-indigo-100 { background: #e0e7ff; }
.bg-sky-50 { background: #f0f9ff; }
.bg-sky-100 { background: #e0f2fe; }
.bg-sky-200 { background: #bae6fd; }

/* Amarillos */
.bg-amber-50 { background: #fffbeb; }
.bg-amber-100 { background: #fef3c7; }
.bg-amber-200 { background: #fde68a; }
.bg-amber-300 { background: #fcd34d; }
.bg-orange-100 { background: #fed7aa; }

/* --- GRADIENT BACKGROUNDS --- */
.bg-gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.bg-gradient-purple-alt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bg-gradient-green-light {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.bg-gradient-green-soft {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.bg-gradient-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.bg-gradient-red-light {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.bg-gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.bg-gradient-blue-light {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.bg-gradient-blue-soft {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.bg-gradient-amber {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.bg-gradient-amber-alt {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.bg-gradient-violet {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.bg-gradient-violet-alt {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.bg-gradient-gray {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.bg-gradient-gray-alt {
    background: linear-gradient(135deg, #f8f9ff 0%, #faf8ff 100%);
}

.bg-gradient-sky {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.bg-gradient-emerald {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

/* --- BORDER COLORS --- */
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #cbd5e0; }

.border-green-500 { border-color: #22c55e; }
.border-green-600 { border-color: #16a34a; }
.border-emerald-500 { border-color: #10b981; }
.border-emerald-600 { border-color: #059669; }

.border-red-500 { border-color: #ef4444; }
.border-red-600 { border-color: #dc2626; }

.border-purple-500 { border-color: #a855f7; }
.border-purple-600 { border-color: #8b5cf6; }

.border-blue-500 { border-color: #3b82f6; }
.border-blue-600 { border-color: #2563eb; }

.border-amber-500 { border-color: #f59e0b; }
.border-amber-400 { border-color: #fbbf24; }

.border-sky-500 { border-color: #0ea5e9; }

/* --- BORDER LEFT COLORS (para highlights) --- */
.border-l-purple { border-left: 4px solid #8b5cf6; }
.border-l-green { border-left: 4px solid #10b981; }
.border-l-emerald { border-left: 4px solid #059669; }
.border-l-blue { border-left: 4px solid #3b82f6; }
.border-l-red { border-left: 4px solid #ef4444; }
.border-l-amber { border-left: 4px solid #f59e0b; }
.border-l-sky { border-left: 4px solid #0ea5e9; }
.border-l-gray { border-left: 4px solid #e5e7eb; }

/* Variantes de 2px y 3px */
.border-l-2-purple { border-left: 2px solid #8b5cf6; }
.border-l-2-green { border-left: 2px solid #22c55e; }
.border-l-2-red { border-left: 2px solid #ef4444; }
.border-l-2-gray { border-left: 2px solid #e2e8f0; }

.border-l-3-purple { border-left: 3px solid #8b5cf6; }
.border-l-3-green { border-left: 3px solid #10b981; }
.border-l-3-amber { border-left: 3px solid #f59e0b; }

/* --- BOX SHADOW COLORS --- */
.shadow-green {
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.08);
}

.shadow-red {
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

.shadow-purple {
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* --- RGBA BACKGROUNDS (para overlays) --- */
.bg-black-50 { background-color: rgba(0, 0, 0, 0.5); }
.bg-green-alpha { background: rgba(22, 163, 74, 0.1); }
.bg-red-alpha { background: rgba(220, 38, 38, 0.1); }
.bg-gray-alpha { background: rgba(100, 116, 139, 0.1); }

/* --- COLORES CONDICIONALES DE SALDOS --- */
.text-saldo-positive { color: #16a34a; }
.text-saldo-negative { color: #dc2626; }
.text-saldo-neutral { color: #64748b; }

.bg-saldo-positive { background: rgba(22, 163, 74, 0.1); }
.bg-saldo-negative { background: rgba(220, 38, 38, 0.1); }
.bg-saldo-neutral { background: rgba(100, 116, 139, 0.1); }

/* --- COLORES DE BADGES --- */
.badge-color-purple {
    background: #ddd6fe;
    color: #5b21b6;
}

.badge-color-indigo {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-color-blue {
    background: #e0e7ff;
    color: #4338ca;
}

.badge-color-violet {
    background: #f3e8ff;
    color: #7c3aed;
}

.badge-color-green {
    background: #d1fae5;
    color: #065f46;
}

.badge-color-emerald {
    background: #ecfdf5;
    color: #047857;
}

.badge-color-red {
    background: #fee2e2;
    color: #991b1b;
}

.badge-color-amber {
    background: #fed7aa;
    color: #92400e;
}

.badge-color-yellow {
    background: #fef3c7;
    color: #92400e;
}

.badge-color-sky {
    background: #e0f2fe;
    color: #0c4a6e;
}

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

/* --- BACKGROUND TRANSPARENTES CON COLOR --- */
.bg-purple-10 { background: rgba(139, 92, 246, 0.1); }
.bg-green-10 { background: rgba(16, 185, 129, 0.1); }
.bg-emerald-10 { background: rgba(6, 95, 70, 0.1); }
.bg-red-10 { background: rgba(220, 38, 38, 0.1); }
.bg-blue-10 { background: rgba(59, 130, 246, 0.1); }
.bg-slate-10 { background: rgba(100, 116, 139, 0.1); }

/* --- TEXT CENTER --- */
.text-center { text-align: center; }

/* --- HELPERS FONT SIZE --- */
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-base { font-size: 13px; }
.text-lg { font-size: 14px; }

/* --- HELPERS FONT WEIGHT --- */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* --- BORDER RADIUS --- */
.rounded-full { border-radius: 999px; }
.rounded-xl { border-radius: 12px; }
.rounded-lg { border-radius: 8px; }
.rounded-md { border-radius: 6px; }
.rounded { border-radius: 4px; }

/* --- BOX SHADOWS --- */
.shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 10px 25px rgba(0,0,0,0.15); }

/* --- BORDER WIDTHS --- */
.border { border: 1px solid; }
.border-2 { border: 2px solid; }
.border-t-2 { border-top: 2px solid; }
.border-b { border-bottom: 1px solid; }
.border-b-2 { border-bottom: 2px solid; }
.border-l-2 { border-left: 2px solid; }
.border-r-2 { border-right: 2px solid; }

.filter-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

/* =============================================
   BADGE UTILITIES ADICIONALES
   ============================================= */
.badge-small {
    font-size: 9px;
    padding: 2px 6px;
    margin-left: 4px;
    font-weight: 600;
    border-radius: 4px;
}

.badge-yellow {
    background-color: #fbbf24;
    color: #78350f;
}

.badge-green-white {
    background-color: #10b981;
    color: white;
}

.badge-stock-low {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-stock-medium {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-fixed {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.badge-pending-gradient {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.badge-budget-linked {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.badge-budget-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

/* =============================================
   LAYOUT UTILITIES (Para reducir inline styles)
   ============================================= */

/* Display utilities */
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

/* Flex utilities */
.flex-1 { flex: 1; }
.flex-between { display: flex; justify-content: space-between; }
.flex-center { display: flex; align-items: center; }
.flex-gap-6 { display: flex; align-items: center; gap: 6px; }
.flex-gap-10 { display: flex; align-items: center; gap: 10px; }

/* Position utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.absolute-right { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }

/* Width utilities */
.w-10 { width: 10%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.w-120 { width: 120px; }
.w-180 { width: 180px; }
.max-w-600 { max-width: 600px; }

/* Spacing utilities */
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mr-6 { margin-right: 6px; }
.pt-1 { padding-top: 1rem; }
.p-24 { padding: 24px; }

/* Text align utilities */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Specific combinations */
.header-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.section-title {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 15px;
}

.stat-number {
    font-size: 24px;
    margin-top: 2px;
}

.help-text {
    font-size: 13px;
    line-height: 1.5;
}

/* =============================================
   LAYOUT UTILITIES ADICIONALES
   ============================================= */

/* Grid utilities */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: 1fr 1fr; }
.gap-3 { gap: 12px; }
.gap-5 { gap: 20px; }

/* Flex adicionales */
.items-start { align-items: flex-start; }

/* Width adicionales */
.w-5 { width: 5%; }
.w-7 { width: 7%; }
.w-8 { width: 8%; }
.w-9 { width: 9%; }
.w-10 { width: 10%; }
.w-11 { width: 11%; }
.w-12 { width: 12%; }
.w-13 { width: 13%; }
.w-14 { width: 14%; }
.w-16 { width: 16%; }
.w-18 { width: 18%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-50 { width: 50%; }
.w-80px { width: 80px; }
.w-130 { width: 130px; }
.w-250 { width: 250px; }
.w-full { width: 100%; }
.max-w-800 { max-width: 800px; }

/* Spacing adicional */
.ml-1 { margin-left: 4px; }
.mb-1 { margin-bottom: 4px; }
.mb-4 { margin-bottom: 16px; }
.p-4 { padding: 16px; }
.p-10 { padding: 40px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.py-15 { padding-top: 60px; padding-bottom: 60px; }

/* Typography adicional */
.text-4xl { font-size: 2rem; }
.opacity-90 { opacity: 0.9; }

/* Misc utilities */
.no-underline { text-decoration: none; }
.mix-blend-hard-light { mix-blend-mode: hard-light; }

/* Transform utilities */
.rotate-90 { transform: rotate(90deg); }
.-ml-1 { margin-left: -5px; }

/* =============================================
   ALERT CARD UTILITIES
   ============================================= */
.alert-card {
    padding: 20px;
    border-radius: 16px;
    text-decoration: none;
    display: block;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.alert-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    transition: width 0.3s ease;
}

.alert-card-red {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
}

.alert-card-red::before {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.alert-card-amber {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fde68a;
}

.alert-card-amber::before {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.alert-card-blue {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
}

.alert-card-blue::before {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.alert-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.alert-card:hover::before {
    width: 8px;
}

.alert-card-red:hover {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
}

.alert-card-amber:hover {
    border-color: #fcd34d;
    background: linear-gradient(135deg, #fffbeb 0%, #fde68a 100%);
}

.alert-card-blue:hover {
    border-color: #93c5fd;
    background: linear-gradient(135deg, #eff6ff 0%, #bfdbfe 100%);
}

/* Text sizes */
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-base { font-size: 13px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 20px; }
.text-3xl { font-size: 28px; }
.text-4xl { font-size: 32px; }
.text-5xl { font-size: 48px; }

/* Margins */
.mt-1 { margin-top: 4px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mr-6 { margin-right: 6px; }

/* Additional utilities */
.tracking-wide { letter-spacing: 0.5px; }
.uppercase { text-transform: uppercase; }
.p-5 { padding: 20px; }

/* Badge sizes */
.badge-sm {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

/* =============================================
   DARK MODE THEME - LUXURY DESIGN
   Inspired by elegant financial dashboards
   ============================================= */

/* Dark Mode Pattern Background */
body.dark-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(212, 165, 116, 0.02) 2px,
            rgba(212, 165, 116, 0.02) 4px
        );
    pointer-events: none;
    z-index: 0;
}

/* Dark Mode Cards with Gold Accent */
body.dark-mode .stat-card-red,
body.dark-mode .stat-card-green,
body.dark-mode .stat-card-blue,
body.dark-mode .stat-card-purple,
body.dark-mode .stat-card-amber,
body.dark-mode .stat-card-ars,
body.dark-mode .stat-card-usd,
body.dark-mode .stat-card-eur,
body.dark-mode .stat-card-btc,
body.dark-mode .stat-card-usdt {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1);
    color: #e2e8f0;
    position: relative;
    overflow: hidden;
}

/* Línea superior de 3px removida - solo borde de 1px */

body.dark-mode .stat-card-neutral {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.6) 0%, rgba(20, 25, 38, 0.6) 100%);
    border: 1px solid rgba(212, 165, 116, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .stat-card-neutral .stat-label {
    color: #94a3b8;
}

body.dark-mode .stat-card-neutral .stat-number {
    color: #e2e8f0;
}

body.dark-mode .stat-card-neutral .stat-icon-box {
    background: rgba(212, 165, 116, 0.1);
}

body.dark-mode .stat-card-neutral .stat-icon-box i {
    color: #94a3b8;
}

body.dark-mode .stat-card-neutral:hover {
    border-color: rgba(212, 165, 116, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ============================================
   UNIFIED DARK MODE STYLE FOR ALL CARDS
   Based on admin dashboard stat-cards
   ============================================ */

/* Summary Cards - Same style as stat-cards */
body.dark-mode .summary-card,
body.dark-mode .summary-card-purple,
body.dark-mode .summary-card-pink,
body.dark-mode .summary-card-green,
body.dark-mode .summary-card-blue,
body.dark-mode .summary-card-red,
body.dark-mode .summary-card-orange {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1);
    color: #e2e8f0;
    position: relative;
    overflow: hidden;
}

/* Línea superior de 3px removida - solo borde de 1px */

body.dark-mode .summary-card:hover,
body.dark-mode .summary-card-purple:hover,
body.dark-mode .summary-card-pink:hover,
body.dark-mode .summary-card-green:hover,
body.dark-mode .summary-card-blue:hover,
body.dark-mode .summary-card-red:hover,
body.dark-mode .summary-card-orange:hover {
    border-color: rgba(212, 165, 116, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(212, 165, 116, 0.2), 0 0 0 1px rgba(212, 165, 116, 0.2);
    background: linear-gradient(135deg, rgba(35, 40, 55, 0.98) 0%, rgba(25, 30, 45, 0.98) 100%);
}

body.dark-mode .summary-card-label {
    color: rgba(203, 213, 225, 0.9);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-mode .summary-card-value {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

body.dark-mode .summary-card-subtext {
    color: rgba(203, 213, 225, 0.8);
}

body.dark-mode .summary-card-icon {
    color: var(--accent-gold);
    opacity: 0.6;
    filter: drop-shadow(0 2px 4px rgba(212, 165, 116, 0.3));
}

/* Metric Cards - Same style */
body.dark-mode .metric-card {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1);
    color: #e2e8f0;
    position: relative;
    overflow: hidden;
}

/* Línea superior de 3px removida - solo borde de 1px */

body.dark-mode .metric-card:hover {
    border-color: rgba(212, 165, 116, 0.5);
    box-shadow: 0 12px 48px rgba(212, 165, 116, 0.2), 0 0 0 1px rgba(212, 165, 116, 0.2);
    background: linear-gradient(135deg, rgba(35, 40, 55, 0.98) 0%, rgba(25, 30, 45, 0.98) 100%);
}

body.dark-mode .metric-icon {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2) 0%, rgba(184, 144, 95, 0.15) 100%);
    border: 1px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.15);
}

body.dark-mode .metric-icon i {
    color: var(--accent-gold);
    filter: drop-shadow(0 2px 4px rgba(212, 165, 116, 0.3));
}

body.dark-mode .metric-value {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

body.dark-mode .metric-label {
    color: rgba(203, 213, 225, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Alert Cards - Same style */
body.dark-mode .alert-card,
body.dark-mode .alert-card-amber,
body.dark-mode .alert-card-red,
body.dark-mode .alert-card-blue {
    background: linear-gradient(135deg, rgba(26, 29, 41, 0.98) 0%, rgba(20, 23, 35, 0.98) 100%);
    border: 2px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 165, 116, 0.15);
    color: #e2e8f0;
}

body.dark-mode .alert-card::before {
    background: linear-gradient(180deg, #d4a574 0%, #b8905f 100%);
}

body.dark-mode .alert-card-red::before {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

body.dark-mode .alert-card-amber::before {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

body.dark-mode .alert-card-blue::before {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

body.dark-mode .alert-card:hover,
body.dark-mode .alert-card-amber:hover,
body.dark-mode .alert-card-red:hover,
body.dark-mode .alert-card-blue:hover {
    border-color: rgba(212, 165, 116, 0.6);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 48px rgba(212, 165, 116, 0.25), 0 0 0 1px rgba(212, 165, 116, 0.3);
    background: linear-gradient(135deg, rgba(30, 35, 50, 0.98) 0%, rgba(24, 28, 42, 0.98) 100%);
}

body.dark-mode .alert-card:hover::before {
    width: 8px;
}

body.dark-mode .alert-header {
    color: rgba(226, 232, 240, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

body.dark-mode .alert-number {
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

body.dark-mode .alert-description {
    color: rgba(203, 213, 225, 0.85);
}

/* Budget Info Card - Same style */
body.dark-mode .budget-info-card {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1);
    color: #e2e8f0;
    position: relative;
    overflow: hidden;
}

/* Línea superior de 3px removida - solo borde de 1px */

body.dark-mode .budget-info-card:hover {
    border-color: rgba(212, 165, 116, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(212, 165, 116, 0.2), 0 0 0 1px rgba(212, 165, 116, 0.2);
    background: linear-gradient(135deg, rgba(35, 40, 55, 0.98) 0%, rgba(25, 30, 45, 0.98) 100%);
}

/* Info Section - Same style */
body.dark-mode .info-section,
body.dark-mode .info-section-general,
body.dark-mode .info-section-success,
body.dark-mode .info-section-info,
body.dark-mode .info-section-warning,
body.dark-mode .info-section-purple,
body.dark-mode .info-section-product {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1);
    color: #e2e8f0;
    position: relative;
    overflow: hidden;
}

/* Línea superior de 3px removida - solo borde de 1px */

body.dark-mode .info-section-title {
    color: var(--accent-gold);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-mode .info-section-title i {
    color: var(--accent-gold);
    filter: drop-shadow(0 2px 4px rgba(212, 165, 116, 0.3));
}

/* General Card - Enhanced to match stat-cards */
body.dark-mode .card {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;
}

/* Línea superior de 3px removida - solo borde de 1px */

body.dark-mode .card:hover {
    border-color: rgba(212, 165, 116, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(212, 165, 116, 0.2), 0 0 0 1px rgba(212, 165, 116, 0.2);
    background: linear-gradient(135deg, rgba(35, 40, 55, 0.98) 0%, rgba(25, 30, 45, 0.98) 100%);
}

body.dark-mode .card-title {
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-mode .card-subtitle {
    color: var(--text-secondary);
}

body.dark-mode .stat-card-red .stat-label,
body.dark-mode .stat-card-green .stat-label,
body.dark-mode .stat-card-blue .stat-label,
body.dark-mode .stat-card-purple .stat-label,
body.dark-mode .stat-card-amber .stat-label,
body.dark-mode .stat-card-ars .stat-label,
body.dark-mode .stat-card-usd .stat-label,
body.dark-mode .stat-card-eur .stat-label,
body.dark-mode .stat-card-btc .stat-label,
body.dark-mode .stat-card-usdt .stat-label {
    color: rgba(203, 213, 225, 0.9);
    opacity: 1;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-mode .stat-card-red .stat-number,
body.dark-mode .stat-card-green .stat-number,
body.dark-mode .stat-card-blue .stat-number,
body.dark-mode .stat-card-purple .stat-number,
body.dark-mode .stat-card-amber .stat-number,
body.dark-mode .stat-card-ars .stat-number,
body.dark-mode .stat-card-usd .stat-number,
body.dark-mode .stat-card-eur .stat-number,
body.dark-mode .stat-card-btc .stat-number,
body.dark-mode .stat-card-usdt .stat-number {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

body.dark-mode .stat-card-red:hover,
body.dark-mode .stat-card-green:hover,
body.dark-mode .stat-card-blue:hover,
body.dark-mode .stat-card-purple:hover,
body.dark-mode .stat-card-amber:hover,
body.dark-mode .stat-card-ars:hover,
body.dark-mode .stat-card-usd:hover,
body.dark-mode .stat-card-eur:hover,
body.dark-mode .stat-card-btc:hover,
body.dark-mode .stat-card-usdt:hover {
    border-color: rgba(212, 165, 116, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(212, 165, 116, 0.2), 0 0 0 1px rgba(212, 165, 116, 0.2);
    background: linear-gradient(135deg, rgba(35, 40, 55, 0.98) 0%, rgba(25, 30, 45, 0.98) 100%);
}

body.dark-mode .stat-card-ars .stat-icon-box,
body.dark-mode .stat-card-usd .stat-icon-box,
body.dark-mode .stat-card-eur .stat-icon-box,
body.dark-mode .stat-card-btc .stat-icon-box,
body.dark-mode .stat-card-usdt .stat-icon-box {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2) 0%, rgba(184, 144, 95, 0.15) 100%);
    border: 1px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.15);
}

body.dark-mode .stat-card-ars .stat-icon-box i,
body.dark-mode .stat-card-usd .stat-icon-box i,
body.dark-mode .stat-card-eur .stat-icon-box i,
body.dark-mode .stat-card-btc .stat-icon-box i,
body.dark-mode .stat-card-usdt .stat-icon-box i {
    color: var(--accent-gold);
    filter: drop-shadow(0 2px 4px rgba(212, 165, 116, 0.3));
}

/* Gold Gradient for Premium Elements */
body.dark-mode .bg-gradient-gold {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
}

/* Dark Mode Tabs with Gold Theme */
body.dark-mode .tab-btn {
    color: var(--text-secondary);
    border-bottom-color: transparent;
}

body.dark-mode .tab-btn:hover {
    color: var(--accent-gold-light);
    background: rgba(212, 165, 116, 0.1);
}

body.dark-mode .tab-btn.active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
    background: transparent;
}

/* Dark Mode Icon Boxes with Gold */
body.dark-mode .stat-icon-box {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(184, 144, 95, 0.1) 100%);
    color: var(--accent-gold);
}

/* Dark Mode Top Bar */
body.dark-mode .top-bar {
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 165, 116, 0.15);
}

body.dark-mode .top-bar .welcome h1 {
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .top-bar .welcome .table-subtitle {
    color: var(--text-secondary);
}

body.dark-mode .top-bar .btn-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
    color: #0f1419;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.4);
    border: none;
}

body.dark-mode .top-bar .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
    transform: translateY(-2px);
    border-bottom: 1px solid rgba(212, 165, 116, 0.1);
}

/* Dark Mode Navigation */
body.dark-mode .nav-item {
    color: var(--text-secondary);
}

body.dark-mode .nav-item:hover {
    background: rgba(212, 165, 116, 0.1);
    color: var(--accent-gold);
}

body.dark-mode .nav-item.active {
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.2) 0%, rgba(212, 165, 116, 0.05) 100%);
    color: var(--accent-gold);
    border-left: 3px solid var(--accent-gold);
}

/* Dark Mode - Menu Items (Sidebar Navigation) */
body.dark-mode .menu-item {
    color: var(--text-secondary);
}

body.dark-mode .menu-item:hover {
    background: rgba(212, 165, 116, 0.1);
    color: var(--accent-gold);
}

body.dark-mode .menu-item.active {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2) 0%, rgba(184, 144, 95, 0.15) 100%);
    color: var(--accent-gold);
}

body.dark-mode .menu-item .icon {
    color: var(--text-secondary);
}

body.dark-mode .menu-item.active .icon {
    color: var(--accent-gold);
}

body.dark-mode .menu-item .badge {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    color: #0f1419;
    font-weight: 700;
}

/* Dark Mode - Submenu Items */
body.dark-mode .submenu-item {
    color: var(--text-muted);
}

body.dark-mode .submenu-item:hover {
    background: rgba(212, 165, 116, 0.08);
    color: var(--accent-gold);
}

body.dark-mode .submenu-item.active {
    background: transparent;
    color: var(--accent-gold);
}

/* Dark Mode - Submenu anidados */
body.dark-mode .submenu-item.has-submenu {
    color: var(--text-muted);
}

body.dark-mode .submenu-item.has-submenu:hover {
    background: rgba(212, 165, 116, 0.08);
    color: var(--accent-gold);
}

body.dark-mode .submenu-item.has-submenu.active {
    color: var(--accent-gold);
}

/* Dark Mode - User Profile */
body.dark-mode .user-profile:hover {
    background: rgba(212, 165, 116, 0.1);
}

body.dark-mode .user-avatar {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

body.dark-mode .user-avatar::after {
    background: #10b981;
    border-color: var(--bg-sidebar);
}

body.dark-mode .user-info h4 {
    color: var(--text-primary);
}

body.dark-mode .user-info p {
    color: var(--text-muted);
}

/* Dark Mode - Logo */
body.dark-mode .logo {
    color: var(--accent-gold);
}

body.dark-mode .logo-icon {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    color: #0f1419;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

/* Dark Mode - Sidebar Collapse Button */
body.dark-mode .sidebar-collapse-btn {
    background: rgba(212, 165, 116, 0.15);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

body.dark-mode .sidebar-collapse-btn:hover {
    background: rgba(212, 165, 116, 0.25);
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Dark Mode - Theme Toggle (Light/Dark buttons in sidebar) */
body.dark-mode .theme-toggle {
    background: rgba(30, 35, 48, 0.6);
    border: none;
}

body.dark-mode .theme-btn {
    color: var(--text-secondary);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

body.dark-mode .theme-btn.active {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    color: #0f1419;
    border: 1px solid transparent;
}

/* Dark Mode - Mobile Header */
body.dark-mode .mobile-header {
    background: rgba(26, 29, 41, 0.98);
    border-bottom: 1px solid rgba(212, 165, 116, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .menu-toggle {
    background: rgba(30, 35, 48, 0.8);
    color: var(--text-primary);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

body.dark-mode .menu-toggle:hover {
    background: rgba(212, 165, 116, 0.15);
    color: var(--accent-gold);
}

body.dark-mode .mobile-icon-btn {
    background: rgba(30, 35, 48, 0.8);
    color: var(--accent-gold);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

body.dark-mode .mobile-icon-btn:hover {
    background: rgba(212, 165, 116, 0.15);
    color: var(--accent-gold);
}

body.dark-mode .mobile-theme-btn {
    background: rgba(30, 35, 48, 0.8);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

body.dark-mode .mobile-theme-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

body.dark-mode .mobile-header .logo {
    color: var(--text-primary);
}

body.dark-mode .mobile-header .logo-icon {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    color: #0f1419;
}

body.dark-mode .theme-btn:hover:not(.active) {
    background: rgba(212, 165, 116, 0.1);
    color: var(--accent-gold);
}

/* Dark Mode - Dashboard Active Item (Purple to Gold) */
body.dark-mode .menu-item.active[href*="admin"],
body.dark-mode .menu-item.active[href*="dashboard"] {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.25) 0%, rgba(184, 144, 95, 0.18) 100%);
}

/* Dark Mode Forms */
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="number"],
body.dark-mode input[type="date"],
body.dark-mode textarea,
body.dark-mode select {
    background: rgba(30, 35, 48, 0.6);
    border: 1px solid rgba(212, 165, 116, 0.2);
    color: var(--text-primary);
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus,
body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
    background: rgba(30, 35, 48, 0.8);
}

/* Dark Mode Buttons */
body.dark-mode .btn-primary {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    border: none;
    color: #0f1419;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(212, 165, 116, 0.4);
}

body.dark-mode .btn-primary:hover {
    background: linear-gradient(135deg, #e8c9a0 0%, #d4a574 100%);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
    transform: translateY(-2px);
}

body.dark-mode .btn-secondary {
    background: rgba(30, 35, 48, 0.8);
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: var(--accent-gold);
}

body.dark-mode .btn-secondary:hover {
    background: rgba(40, 45, 60, 0.9);
    border-color: var(--accent-gold);
}

/* Dark Mode Tables */
body.dark-mode table {
    background: rgba(30, 35, 48, 0.4);
}

body.dark-mode thead {
    background: rgba(212, 165, 116, 0.1);
    border-bottom: 2px solid rgba(212, 165, 116, 0.3);
}

body.dark-mode th {
    color: var(--accent-gold);
    font-weight: 600;
}

body.dark-mode tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode tr:hover {
    background: rgba(212, 165, 116, 0.05);
}

/* Dark Mode Badges with Gold */
body.dark-mode .badge {
    background: rgba(212, 165, 116, 0.2);
    color: var(--accent-gold);
    border: 1px solid rgba(212, 165, 116, 0.3);
}

body.dark-mode .badge-color-green {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

body.dark-mode .badge-color-red {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

body.dark-mode .badge-color-purple {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border-color: rgba(139, 92, 246, 0.3);
}

/* Dark Mode Alert Cards */
/* Alert cards now use unified style - see unified dark mode section above (line ~7919) */

/* Dark Mode Chart/Donut Styling */
body.dark-mode .chart-container {
    background: rgba(30, 35, 48, 0.6);
    border: 1px solid rgba(212, 165, 116, 0.2);
    border-radius: 16px;
    padding: 24px;
}

/* Dark Mode Calendar */
body.dark-mode .calendar-day {
    background: rgba(30, 35, 48, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .calendar-day:hover {
    background: rgba(212, 165, 116, 0.15);
    border-color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .calendar-day:hover:not(.empty):not(.today) {
    background: rgba(212, 165, 116, 0.15);
}

body.dark-mode .calendar-day:hover .day-number {
    color: var(--text-primary);
}

body.dark-mode .calendar-day.has-event {
    background: rgba(212, 165, 116, 0.2);
    border-color: var(--accent-gold);
}

body.dark-mode .calendar-day.today {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.25) 0%, rgba(184, 144, 95, 0.18) 100%);
    border-color: var(--accent-gold);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

body.dark-mode .calendar-day.today .day-number {
    color: #0f1419;
}

body.dark-mode .calendar-title {
    color: var(--text-primary);
}

body.dark-mode .calendar-title i.fa-calendar-alt {
    color: var(--accent-gold);
}

body.dark-mode .calendar-weekday {
    color: var(--text-secondary);
}

body.dark-mode .calendar-day .day-number {
    color: var(--text-primary);
}

body.dark-mode .calendar-day .event-names {
    color: var(--text-secondary);
}

body.dark-mode .calendar-day.today .event-names {
    color: var(--text-primary);
}

body.dark-mode .calendar-nav-btn {
    background: rgba(30, 35, 48, 0.6);
    border: 1px solid rgba(212, 165, 116, 0.2);
    color: var(--text-secondary);
}

body.dark-mode .calendar-nav-btn:hover {
    background: rgba(212, 165, 116, 0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

body.dark-mode .calendar-today-btn {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2) 0%, rgba(184, 144, 95, 0.15) 100%);
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: var(--accent-gold);
}

body.dark-mode .calendar-today-btn:hover {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    color: #0f1419;
}

/* Dark Mode - Todo en Orden Card */
body.dark-mode .border-l-green {
    border-left-color: var(--accent-gold);
}

body.dark-mode .fas.fa-check-circle.text-green-500 {
    color: var(--accent-gold) !important;
}

/* Dark Mode - Margen y Ganancia Section */
body.dark-mode .fas.fa-chart-line.text-green-500 {
    color: var(--accent-gold) !important;
}

/* Dark Mode - Filter button icon */
body.dark-mode .create-btn {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    box-shadow: 0 4px 14px rgba(212, 165, 116, 0.35);
    color: #0f1419;
}

body.dark-mode .create-btn:hover {
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
}

body.dark-mode .create-btn .fa-filter {
    color: #0f1419;
}

/* Dark Mode - Chart legend icons */
body.dark-mode .fa-arrow-up,
body.dark-mode .fa-arrow-down,
body.dark-mode .fa-dollar-sign,
body.dark-mode .fa-percentage {
    color: inherit;
}

body.dark-mode .text-green-500 .fa-arrow-up {
    color: var(--accent-gold) !important;
}

/* Dark Mode - Metric Cards in Margen y Ganancia */
body.dark-mode [style*="background: #f9fafb"] {
    background: rgba(30, 35, 48, 0.6) !important;
    border-color: rgba(212, 165, 116, 0.2) !important;
}

/* Dark Mode - Metric card borders with gold accent */
body.dark-mode .border-l-3-green,
body.dark-mode [style*="border-left: 3px solid #10b981"],
body.dark-mode [style*="border-left: 3px solid #f59e0b"],
body.dark-mode [style*="border-left: 3px solid #8b5cf6"] {
    border-left-color: var(--accent-gold) !important;
}

body.dark-mode .text-emerald-700 {
    color: #34d399 !important;
}

body.dark-mode .text-amber-600 {
    color: #fbbf24 !important;
}

body.dark-mode .text-purple-700 {
    color: var(--accent-gold) !important;
}

body.dark-mode .text-green-500 {
    color: var(--accent-gold) !important;
}

body.dark-mode .text-amber-500 {
    color: #fbbf24 !important;
}

body.dark-mode .text-blue-600 {
    color: #60a5fa !important;
}

body.dark-mode .text-purple-600 {
    color: var(--accent-gold) !important;
}

/* Dark Mode Modals */
body.dark-mode .modal-content {
    background: rgba(26, 29, 41, 0.98);
    border: 1px solid rgba(212, 165, 116, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

body.dark-mode .modal-header {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2) 0%, rgba(184, 144, 95, 0.1) 100%);
    border-bottom: 1px solid rgba(212, 165, 116, 0.3);
}

/* Card Manager Modal - Base Styles */
.modal-overlay {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-container {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 500px;
    max-width: 90%;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.modal-header-custom {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body-custom {
    padding: 24px;
}

.modal-description {
    margin-bottom: 20px;
    color: #64748b;
    font-size: 14px;
}

.card-manager-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    border-radius: 8px;
    border-left: 4px solid;
    transition: all 0.2s;
}

.card-config-item.card-visible {
    background: #f0fdf4;
}

.card-config-item.card-hidden {
    background: #fee2e2;
}

.card-config-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-config-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-config-icon {
    font-size: 18px;
}

.card-config-name {
    font-weight: 500;
    color: #1e293b;
    font-size: 14px;
}

.card-config-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.card-config-status {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.card-config-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #8b5cf6;
}

/* Dark Mode - Card Manager Modal */
body.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

body.dark-mode .modal-container {
    background: rgba(26, 29, 41, 0.98);
    border: 1px solid rgba(212, 165, 116, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

body.dark-mode .modal-header-custom {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.3) 0%, rgba(184, 144, 95, 0.2) 100%);
    border-bottom: 1px solid rgba(212, 165, 116, 0.3);
}

body.dark-mode .modal-description {
    color: var(--text-secondary);
}

body.dark-mode .card-config-item.card-visible {
    background: rgba(212, 165, 116, 0.1);
    border-left-color: var(--accent-gold);
}

body.dark-mode .card-config-item.card-hidden {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
}

body.dark-mode .card-config-item:hover {
    background: rgba(212, 165, 116, 0.15);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.2);
}

body.dark-mode .card-config-icon {
    filter: brightness(1.2);
}

body.dark-mode .card-config-name {
    color: var(--text-primary);
}

body.dark-mode .card-config-status {
    color: var(--text-secondary);
}

body.dark-mode .card-config-checkbox {
    accent-color: var(--accent-gold);
    border-color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .modal-close-btn:hover {
    background: rgba(212, 165, 116, 0.2);
}

/* Dark Mode Toggle Button - Removido (ahora está en el sidebar) */
/* 
.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    border: none;
    color: #0f1419;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(212, 165, 116, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 12px 32px rgba(212, 165, 116, 0.6);
}
*/

/* 
body.dark-mode .theme-toggle {
    background: linear-gradient(135deg, #1a1d29 0%, #0f1419 100%);
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
}
*/

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Text Colors */
body.dark-mode .text-slate-900 { color: #e2e8f0; }
body.dark-mode .text-slate-800 { color: #cbd5e1; }
body.dark-mode .text-slate-700 { color: #94a3b8; }
body.dark-mode .text-slate-600 { color: #64748b; }
body.dark-mode .text-slate-500 { color: #475569; }

/* Dark Mode Backgrounds */
body.dark-mode .bg-white { background: rgba(30, 35, 48, 0.8); }
body.dark-mode .bg-slate-50 { background: rgba(30, 35, 48, 0.6); }
body.dark-mode .bg-slate-100 { background: rgba(30, 35, 48, 0.7); }

/* CRITICAL: Force profit chart visibility in dark mode - MUST BE AFTER ALL OTHER STYLES */
body.dark-mode .card[data-card-id="margen-ganancia"] {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

body.dark-mode .card[data-card-id="margen-ganancia"] .profit-layout,
body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-container,
body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-wrapper,
body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-canvas,
body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-canvas canvas,
body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-title,
body.dark-mode .card[data-card-id="margen-ganancia"] .chart-legend,
body.dark-mode .card[data-card-id="margen-ganancia"] .profit-metrics-container,
body.dark-mode .card[data-card-id="margen-ganancia"] .profit-metric-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

body.dark-mode .card[data-card-id="margen-ganancia"] .profit-layout {
    display: grid !important;
    height: auto !important;
    min-height: 400px !important;
    max-height: none !important;
    overflow: visible !important;
}

body.dark-mode .card[data-card-id="margen-ganancia"] .mt-3 {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-canvas {
    height: 350px !important;
    min-height: 350px !important;
}

body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-canvas canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

body.dark-mode .card[data-card-id="margen-ganancia"] .profit-metrics-container {
    display: flex !important;
    flex-direction: column !important;
}

body.dark-mode .card[data-card-id="margen-ganancia"] .chart-legend {
    display: grid !important;
}

/* ============================================
   TRANSFER MODAL - ACCOUNTS
   ============================================ */

/* Account Balance Info */
.account-balance-info {
    transition: all 0.3s ease;
}

body.dark-mode .account-balance-info {
    background: rgba(30, 35, 48, 0.6) !important;
    border-left-color: rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .account-balance-info small {
    color: var(--text-primary) !important;
}

/* Transfer Projection Box */
.transfer-projection-box {
    transition: all 0.3s ease;
}

body.dark-mode .transfer-projection-box {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%) !important;
    border-color: rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .transfer-projection-box h4 {
    color: var(--accent-gold) !important;
}

body.dark-mode .transfer-projection-box h4 i {
    color: var(--accent-gold) !important;
}

body.dark-mode .transfer-projection-box > div > div:first-child {
    background: rgba(239, 68, 68, 0.15) !important;
}

body.dark-mode .transfer-projection-box > div > div:first-child small {
    color: #fca5a5 !important;
}

body.dark-mode .transfer-projection-box > div > div:first-child div {
    color: #f87171 !important;
}

body.dark-mode .transfer-projection-box > div > div:last-child {
    background: rgba(16, 185, 129, 0.15) !important;
}

body.dark-mode .transfer-projection-box > div > div:last-child small {
    color: #34d399 !important;
}

body.dark-mode .transfer-projection-box > div > div:last-child div {
    color: #10b981 !important;
}

/* Moneda Warning */
body.dark-mode #moneda_warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border-left-color: rgba(245, 158, 11, 0.5) !important;
    color: var(--text-primary) !important;
}

body.dark-mode #moneda_warning i {
    color: #fbbf24 !important;
}

/* Monto Error */
body.dark-mode #monto_error {
    color: #f87171 !important;
}

body.dark-mode #monto_error i {
    color: #ef4444 !important;
}

/* Transfer Form Labels */
body.dark-mode #transferModal label {
    color: var(--text-primary) !important;
}

body.dark-mode #transferModal .form-control {
    background: rgba(30, 35, 48, 0.6) !important;
    border-color: rgba(212, 165, 116, 0.2) !important;
    color: var(--text-primary) !important;
}

body.dark-mode #transferModal .form-control:focus {
    background: rgba(30, 35, 48, 0.8) !important;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1) !important;
}

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

/* Mobile Optimizations */
@media (max-width: 768px) {
    #transferModal .modal {
        width: 95% !important;
        max-width: 95% !important;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .transfer-projection-box > div {
        grid-template-columns: 1fr !important;
    }
    
    #transferModal .modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    #transferModal .modal-footer button {
        width: 100%;
    }
}

/* ==========================
   PROFIT SECTION LAYOUT
   ========================== */
/* Desktop: Chart (2/3) + Metrics (1/3) */
.profit-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    width: 100%;
    align-items: start;
    min-height: 400px;
    visibility: visible;
    opacity: 1;
}

.profit-chart-container {
    min-width: 0; /* Prevent overflow */
    width: 100%;
    overflow: visible;
    display: block;
    visibility: visible;
    opacity: 1;
    position: relative;
}

.profit-metrics-container {
    display: flex;
    flex-direction: column;
    gap: 0; /* No gap, margin-bottom on each child */
    width: 100%;
    visibility: visible;
    opacity: 1;
}

/* Dark mode support */
body.dark-mode .profit-chart-container .bg-white,
body.dark-mode .profit-metrics-container > div {
    background: rgba(26, 29, 41, 0.95) !important;
    border-color: rgba(212, 165, 116, 0.2) !important;
}

body.dark-mode .chart-legend {
    background: rgba(30, 35, 48, 0.6) !important;
}

/* Profit Empty State */
.profit-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    min-height: 400px;
    color: #9ca3af;
    background: #f9fafb;
    border-radius: 16px;
}

.profit-empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.profit-empty-state p {
    margin: 0;
    font-size: 16px;
}

body.dark-mode .profit-empty-state {
    background: rgba(26, 29, 41, 0.95);
    color: #64748b;
}

/* Profit Section Header */
.profit-section-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.profit-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profit-section-title i {
    color: #10b981;
    font-size: 20px;
}

/* Profit Filters Adjustments */
.profit-filters {
    display: flex;
    gap: 8px;
    align-items: end;
    margin-top: 16px;
}

.profit-filters .create-btn {
    padding: 10px 16px !important;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profit-filter-btn {
    padding: 8px 16px !important;
}

.profit-filters .form-control,
.profit-filters .form-select {
    height: 42px;
}

/* Profit Metric Cards */
.profit-metric-card {
    padding: 16px;
    border-radius: 12px;
    border-left: 3px solid;
    background: #f9fafb;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.profit-metric-card:last-child {
    margin-bottom: 0;
}

.profit-metric-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profit-metric-green {
    border-left-color: #10b981;
}

.profit-metric-amber {
    border-left-color: #f59e0b;
}

.profit-metric-purple {
    border-left-color: #8b5cf6;
}

.profit-metric-success {
    border-left-color: #10b981;
}

.profit-metric-danger {
    border-left-color: #ef4444;
}

.profit-metric-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profit-metric-label i {
    font-size: 11px;
}

.profit-metric-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.profit-metric-value-green {
    color: #047857;
}

.profit-metric-value-amber {
    color: #d97706;
}

.profit-metric-value-purple {
    color: #7c3aed;
}

.profit-metric-value-success {
    color: #047857;
}

.profit-metric-value-danger {
    color: #dc2626;
}

/* Profit Chart Wrapper */
.profit-chart-wrapper {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    display: block;
    min-height: 400px;
}

.profit-chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profit-chart-title i {
    color: #10b981;
    font-size: 18px;
}

.profit-chart-canvas {
    position: relative;
    height: 350px;
    width: 100%;
    min-height: 350px;
}

.profit-chart-canvas canvas {
    max-width: 100% !important;
    height: 100% !important;
}

/* Chart Legend */
.chart-legend {
    margin-top: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.chart-legend-item {
    text-align: center;
}

.chart-legend-icon {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.chart-legend-green {
    color: #10b981;
}

.chart-legend-amber {
    color: #f59e0b;
}

.chart-legend-blue {
    color: #3b82f6;
}

.chart-legend-purple {
    color: #8b5cf6;
}

.chart-legend-text {
    font-size: 13px;
    color: #1e293b;
}

/* Dark Mode - Profit Section */
body.dark-mode .profit-section-header {
    border-bottom-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .profit-section-title {
    color: var(--text-primary);
}

body.dark-mode .profit-section-title i {
    color: var(--accent-gold);
}

body.dark-mode .profit-metric-card {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border-left-color: var(--accent-gold);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .profit-metric-card:hover {
    border-color: rgba(212, 165, 116, 0.4);
    box-shadow: 0 6px 16px rgba(212, 165, 116, 0.2);
    transform: translateX(4px);
}

body.dark-mode .profit-metric-green {
    border-left-color: #10b981;
}

body.dark-mode .profit-metric-amber {
    border-left-color: #f59e0b;
}

body.dark-mode .profit-metric-purple {
    border-left-color: #8b5cf6;
}

body.dark-mode .profit-metric-success {
    border-left-color: #10b981;
}

body.dark-mode .profit-metric-danger {
    border-left-color: #ef4444;
}

body.dark-mode .profit-metric-label {
    color: rgba(203, 213, 225, 0.8);
}

body.dark-mode .profit-metric-label i {
    color: var(--accent-gold);
}

body.dark-mode .profit-metric-value-green {
    color: #34d399;
}

body.dark-mode .profit-metric-value-amber {
    color: #fbbf24;
}

body.dark-mode .profit-metric-value-purple {
    color: #a78bfa;
}

body.dark-mode .profit-metric-value-success {
    color: #34d399;
}

body.dark-mode .profit-metric-value-danger {
    color: #f87171;
}

body.dark-mode .profit-chart-wrapper {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%) !important;
    border: 1px solid rgba(212, 165, 116, 0.25) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.dark-mode .profit-chart-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.dark-mode .profit-chart-canvas {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: 100% !important;
    height: 350px !important;
    min-height: 350px !important;
}

body.dark-mode .profit-chart-canvas canvas {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    background: transparent !important;
    position: relative !important;
}

body.dark-mode .profit-chart-title {
    color: var(--text-primary) !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.dark-mode .profit-chart-title i {
    color: var(--accent-gold) !important;
}

body.dark-mode .chart-legend {
    background: rgba(30, 35, 48, 0.6) !important;
    border: 1px solid rgba(212, 165, 116, 0.15);
}

body.dark-mode .chart-legend-text {
    color: var(--text-primary);
}

body.dark-mode .chart-legend-green {
    color: #34d399;
}

body.dark-mode .chart-legend-amber {
    color: #fbbf24;
}

body.dark-mode .chart-legend-blue {
    color: #60a5fa;
}

body.dark-mode .chart-legend-purple {
    color: #a78bfa;
}

/* Dark Mode - Utility Text Classes Override */
body.dark-mode .text-gray-600,
body.dark-mode .text-gray-700,
body.dark-mode .text-gray-800,
body.dark-mode .text-gray-900 {
    color: var(--text-primary) !important;
}

body.dark-mode .text-sm,
body.dark-mode .text-base {
    color: inherit;
}

/* Dark Mode - Form Labels in Profit Section */
body.dark-mode .card[data-card-id="margen-ganancia"] label {
    color: var(--text-primary) !important;
}

body.dark-mode .card[data-card-id="margen-ganancia"] .form-control,
body.dark-mode .card[data-card-id="margen-ganancia"] .form-select {
    background: rgba(30, 35, 48, 0.6) !important;
    color: var(--text-primary) !important;
    border-color: rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .card[data-card-id="margen-ganancia"] .form-control:focus,
body.dark-mode .card[data-card-id="margen-ganancia"] .form-select:focus {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.2) !important;
}

/* Dark Mode - Empty State */
body.dark-mode .profit-empty-state {
    color: var(--text-primary);
}

body.dark-mode .profit-empty-state i {
    color: var(--accent-gold);
    opacity: 0.3;
}

body.dark-mode .profit-empty-state p {
    color: rgba(203, 213, 225, 0.7);
}

/* ============================================
   BUDGET EDIT PAGE - DARK MODE OPTIMIZATION
   ============================================ */

/* Budget Invoice Header */
body.dark-mode .budget-invoice-header {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1);
    position: relative;
    overflow: hidden;
}

/* Línea superior de 3px removida - solo borde de 1px */

body.dark-mode .invoice-header-top {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(26, 29, 41, 0.95) 100%);
    border-bottom-color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .back-btn-invoice {
    background: rgba(30, 35, 48, 0.8);
    border-color: rgba(212, 165, 116, 0.3);
    color: var(--accent-gold);
}

body.dark-mode .back-btn-invoice:hover {
    background: rgba(212, 165, 116, 0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateX(-2px);
}

body.dark-mode .company-name {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .company-tagline {
    color: var(--text-secondary);
}

body.dark-mode .invoice-title {
    color: var(--accent-gold);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-mode .invoice-number {
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .status-badge-invoice.pendiente {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

body.dark-mode .status-badge-invoice.aprobado {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

body.dark-mode .status-badge-invoice.rechazado {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Invoice Info Section */
body.dark-mode .invoice-info-section {
    background: transparent;
}

body.dark-mode .invoice-party {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.6) 0%, rgba(20, 25, 38, 0.5) 100%);
    border-color: rgba(212, 165, 116, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .party-label {
    color: var(--accent-gold);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-mode .party-name {
    color: var(--text-primary);
}

body.dark-mode .party-detail {
    color: var(--text-secondary);
}

body.dark-mode .party-detail strong {
    color: var(--text-secondary);
}

body.dark-mode .party-detail i {
    color: var(--accent-gold);
}

body.dark-mode .event-detail {
    color: var(--text-secondary);
}

body.dark-mode .event-detail i {
    color: var(--accent-gold);
}

/* Invoice Total Box */
body.dark-mode .invoice-total-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(124, 58, 237, 0.25) 100%);
    border: 1px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.2);
    color: var(--text-primary);
}

/* Línea superior de 3px removida - solo borde de 1px */

body.dark-mode .total-label {
    color: rgba(203, 213, 225, 0.9) !important;
}

body.dark-mode .total-amount-big {
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

body.dark-mode .budget-actions-inside {
    background: rgba(212, 165, 116, 0.1);
    border-top: 1px solid rgba(212, 165, 116, 0.2);
}

/* Budget Actions Buttons Inside */
body.dark-mode .btn-confirm-budget-inside {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

body.dark-mode .btn-confirm-budget-inside:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

body.dark-mode .btn-edit-invoice-inside {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
}

body.dark-mode .btn-edit-invoice-inside:hover {
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.5);
}

body.dark-mode .btn-pdf-preview-inside {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

body.dark-mode .btn-pdf-preview-inside:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

body.dark-mode .btn-pdf-export-inside {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

body.dark-mode .btn-pdf-export-inside:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

/* Budget Items Card Compact */
body.dark-mode .budget-items-card-compact {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1);
}

body.dark-mode .card-header-compact {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(26, 29, 41, 0.95) 100%);
    border-bottom-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .items-header-left h3 {
    color: var(--text-primary);
}

body.dark-mode .items-header-left h3 i {
    color: var(--accent-gold);
}

body.dark-mode .total-label {
    color: var(--text-secondary);
}

body.dark-mode .total-amount-compact {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Budget Items List Compact */
body.dark-mode .budget-items-list-compact {
    background: transparent;
}

body.dark-mode .budget-items-list-compact::-webkit-scrollbar-track {
    background: rgba(30, 35, 48, 0.5);
}

body.dark-mode .budget-items-list-compact::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.3);
    border: 2px solid rgba(30, 35, 48, 0.5);
}

body.dark-mode .budget-items-list-compact::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 165, 116, 0.5);
}

/* Budget Item Compact */
body.dark-mode .budget-item-compact {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.6) 0%, rgba(20, 25, 38, 0.5) 100%);
    border-color: rgba(212, 165, 116, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .budget-item-compact:hover {
    border-color: rgba(212, 165, 116, 0.4);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.2);
    transform: translateX(2px);
}

body.dark-mode .item-left h4 {
    color: var(--text-primary);
}

body.dark-mode .item-sku-compact {
    color: var(--text-secondary);
}

body.dark-mode .item-price-compact {
    color: var(--accent-gold);
}

body.dark-mode .quantity-control-compact {
    background: rgba(30, 35, 48, 0.8);
    border-color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .qty-btn-compact {
    background: rgba(212, 165, 116, 0.1);
    color: var(--accent-gold);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

body.dark-mode .qty-btn-compact:hover {
    background: var(--accent-gold);
    color: #0f1419;
    border-color: var(--accent-gold);
}

body.dark-mode .qty-input-compact {
    color: var(--text-primary);
}

body.dark-mode .item-subtotal-compact {
    color: var(--text-primary);
    font-weight: 700;
}

body.dark-mode .btn-remove-compact {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

body.dark-mode .btn-remove-compact:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

body.dark-mode .empty-items-state-compact {
    color: var(--text-secondary);
}

body.dark-mode .empty-items-state-compact i {
    color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .empty-items-state-compact p {
    color: var(--text-primary);
}

body.dark-mode .empty-items-state-compact small {
    color: var(--text-secondary);
}

/* Product Search Card Compact */
body.dark-mode .product-search-card-compact {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1);
}

body.dark-mode .search-box-compact {
    background: transparent;
}

body.dark-mode .search-input-compact {
    background: rgba(30, 35, 48, 0.6);
    border-color: rgba(212, 165, 116, 0.2);
    color: var(--text-primary);
}

body.dark-mode .search-input-compact:focus {
    border-color: var(--accent-gold);
    background: rgba(30, 35, 48, 0.8);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

body.dark-mode .search-input-compact::placeholder {
    color: var(--text-secondary);
}

body.dark-mode .product-results-compact {
    background: transparent;
}

body.dark-mode .product-result-item {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.6) 0%, rgba(20, 25, 38, 0.5) 100%);
    border-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .product-result-item:hover {
    background: linear-gradient(135deg, rgba(35, 40, 55, 0.8) 0%, rgba(25, 30, 45, 0.7) 100%);
    border-color: rgba(212, 165, 116, 0.4);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.2);
}

body.dark-mode .product-result-info h4 {
    color: var(--text-primary);
}

body.dark-mode .product-result-meta {
    color: var(--text-secondary);
}

body.dark-mode .product-result-price {
    color: var(--accent-gold);
}

body.dark-mode .btn-add-custom {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
    color: #0f1419;
    border: none;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
}

body.dark-mode .btn-add-custom:hover {
    background: linear-gradient(135deg, #e8c9a0 0%, var(--accent-gold) 100%);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.5);
    transform: translateY(-1px);
}

body.dark-mode .product-result-price i {
    color: var(--accent-gold);
}

body.dark-mode .no-results-modern {
    color: var(--text-secondary);
}

body.dark-mode .no-results-modern i {
    color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .no-results-modern p {
    color: var(--text-primary);
}

/* Quantity Product Info */
body.dark-mode .quantity-product-info {
    background: rgba(30, 35, 48, 0.6);
    border-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .quantity-product-info h3 {
    color: var(--text-primary);
}

body.dark-mode .quantity-sku {
    color: var(--text-secondary);
}

body.dark-mode .quantity-price {
    color: var(--accent-gold);
}

body.dark-mode .quantity-selector {
    background: rgba(30, 35, 48, 0.6);
    border-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .qty-selector-btn {
    background: rgba(212, 165, 116, 0.1);
    color: var(--accent-gold);
    border-color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .qty-selector-btn:hover {
    background: var(--accent-gold);
    color: #0f1419;
    border-color: var(--accent-gold);
}

body.dark-mode .qty-selector-input {
    background: transparent;
    color: var(--text-primary);
}

body.dark-mode .quantity-total-preview {
    background: rgba(30, 35, 48, 0.6);
    border-color: rgba(212, 165, 116, 0.2);
    color: var(--text-primary);
}

body.dark-mode .quantity-total-preview strong {
    color: var(--accent-gold);
}

/* Budget Confirmed Info Box */
body.dark-mode .invoice-total-box [style*="background: #fff"] {
    background: rgba(30, 35, 48, 0.8) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

body.dark-mode .invoice-total-box [class*="text-green"] {
    color: #34d399 !important;
}

body.dark-mode .invoice-total-box a[class*="text-green"] {
    color: #34d399 !important;
}

body.dark-mode .invoice-total-box a[class*="text-green"]:hover {
    color: #6ee7b7 !important;
}

/* Badge Count */
body.dark-mode .badge-count {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2) 0%, rgba(184, 144, 95, 0.15) 100%);
    color: var(--accent-gold);
    border: 1px solid rgba(212, 165, 116, 0.3);
}

/* Budget Confirmed Box */
.budget-confirmed-box {
    margin-top: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.budget-confirmed-label {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #047857;
    display: flex;
    align-items: center;
    gap: 6px;
}

.budget-confirmed-label i {
    color: #10b981;
}

.budget-confirmed-link {
    font-size: 10px;
    color: #047857;
    text-decoration: underline;
    transition: color 0.2s;
}

.budget-confirmed-link:hover {
    color: #059669;
}

.budget-confirmed-alert {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #3b82f6;
    padding: 12px;
    margin: 15px 20px 0;
    border-radius: 8px;
}

.budget-confirmed-alert-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 6px;
}

.budget-confirmed-alert-title i {
    color: #3b82f6;
}

.budget-confirmed-alert-text {
    color: #4b5563;
    font-size: 11px;
    margin: 0;
}

.form-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

/* Dark Mode - Budget Confirmed Box */
body.dark-mode .budget-confirmed-box {
    background: rgba(30, 35, 48, 0.8);
    border-color: rgba(16, 185, 129, 0.3);
}

body.dark-mode .budget-confirmed-label {
    color: #34d399;
}

body.dark-mode .budget-confirmed-label i {
    color: #10b981;
}

body.dark-mode .budget-confirmed-link {
    color: #34d399;
}

body.dark-mode .budget-confirmed-link:hover {
    color: #6ee7b7;
}

body.dark-mode .budget-confirmed-alert {
    background: rgba(59, 130, 246, 0.15);
    border-left-color: #3b82f6;
}

body.dark-mode .budget-confirmed-alert-title {
    color: #60a5fa;
}

body.dark-mode .budget-confirmed-alert-title i {
    color: #3b82f6;
}

body.dark-mode .budget-confirmed-alert-text {
    color: var(--text-secondary);
}

/* ============================================
   BUDGET EDIT PAGE - MOBILE OPTIMIZATION
   ============================================ */

@media (max-width: 768px) {
    /* Budget Invoice Header - Mobile */
    .budget-invoice-header {
        margin: 0 12px 16px 12px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Invoice Header Top - Stack on mobile */
    .invoice-header-top {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .invoice-company {
        flex-wrap: wrap;
    }
    
    .company-name {
        font-size: 18px;
    }
    
    .company-tagline {
        font-size: 10px;
    }
    
    .invoice-details {
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    
    .invoice-title {
        font-size: 11px;
    }
    
    .invoice-number {
        font-size: 16px;
    }
    
    /* Invoice Info Section - Stack columns */
    .invoice-info-section {
        grid-template-columns: 1fr !important;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .invoice-party {
        padding: 12px;
    }
    
    .party-label {
        font-size: 8px;
    }
    
    .party-name {
        font-size: 13px;
    }
    
    .party-detail {
        font-size: 10px;
    }
    
    .party-detail strong {
        min-width: 50px;
        font-size: 10px;
    }
    
    /* Event Details Grid - Single column on mobile */
    .event-details-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .event-detail {
        font-size: 10px;
    }
    
    /* Invoice Total Box - Full width on mobile */
    .invoice-total-box {
        min-width: 100%;
        padding: 16px 12px;
    }
    
    .total-label {
        font-size: 9px;
    }
    
    .total-amount-big {
        font-size: 20px;
    }
    
    /* Budget Actions Inside - Stack buttons */
    .budget-actions-inside {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        margin: 12px -12px -12px -12px;
    }
    
    .budget-actions-inside button,
    .budget-actions-inside a {
        width: 100%;
        padding: 10px 16px;
        font-size: 12px;
        justify-content: center;
    }
    
    .btn-confirm-budget-inside,
    .btn-edit-invoice-inside,
    .btn-pdf-preview-inside,
    .btn-pdf-export-inside {
        width: 100%;
    }
    
    /* Budget Confirmed Box - Mobile */
    .budget-confirmed-box {
        margin-top: 12px;
        padding: 12px;
    }
    
    .budget-confirmed-label {
        font-size: 10px;
    }
    
    .budget-confirmed-link {
        font-size: 9px;
    }
    
    /* Product Search Card - Mobile */
    .product-search-card-compact {
        margin: 0 12px 16px 12px;
        border-radius: 12px;
    }
    
    .search-box-compact {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }
    
    .search-input-compact {
        width: 100%;
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .btn-add-custom {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
        justify-content: center;
    }
    
    .product-results-compact {
        padding: 0 12px 12px 12px;
        max-height: 50vh;
    }
    
    /* Budget Items Card - Mobile */
    .budget-items-card-compact {
        margin: 0 12px 16px 12px;
        border-radius: 12px;
    }
    
    .card-header-compact {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .items-header-left h3 {
        font-size: 14px;
    }
    
    .items-header-right {
        width: 100%;
        justify-content: space-between;
        margin-top: 4px;
    }
    
    .total-amount-compact {
        font-size: 16px;
    }
    
    /* Budget Items List - Mobile */
    .budget-items-list-compact {
        padding: 8px 12px;
        max-height: 50vh;
    }
    
    .budget-item-compact {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        gap: 12px;
    }
    
    .item-left {
        width: 100%;
    }
    
    .item-left h4 {
        font-size: 13px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    
    .item-sku-compact {
        font-size: 10px;
    }
    
    .item-right {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-between;
    }
    
    .item-price-compact {
        font-size: 12px;
        min-width: auto;
        text-align: left;
    }
    
    .quantity-control-compact {
        order: 2;
        flex: 1;
        min-width: 120px;
    }
    
    .item-subtotal-compact {
        font-size: 14px;
        min-width: auto;
        text-align: right;
        order: 3;
        flex: 1;
    }
    
    .btn-remove-compact {
        order: 4;
        width: 32px;
        height: 32px;
    }
    
    /* Quantity Control - Mobile */
    .qty-btn-compact {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .qty-input-compact {
        width: 40px;
        font-size: 13px;
    }
    
    /* Empty Items State - Mobile */
    .empty-items-state-compact {
        padding: 30px 20px;
    }
    
    .empty-items-state-compact i {
        font-size: 32px;
    }
    
    .empty-items-state-compact p {
        font-size: 13px;
    }
    
    .empty-items-state-compact small {
        font-size: 11px;
    }
    
    /* Modals - Mobile */
    .modal {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer button {
        width: 100%;
    }
    
    /* Form Elements - Mobile */
    .form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .form-row-grid {
        grid-template-columns: 1fr !important;
    }
    
    .form-group {
        width: 100%;
    }
    
    .form-group.full-width {
        width: 100%;
    }
    
    /* Quantity Selector - Mobile */
    .quantity-selector {
        padding: 8px;
        gap: 8px;
    }
    
    .qty-selector-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .qty-selector-input {
        width: 60px;
        font-size: 20px;
        padding: 6px;
    }
    
    /* Quantity Product Info - Mobile */
    .quantity-product-info {
        padding: 12px;
    }
    
    .quantity-product-info h3 {
        font-size: 15px;
    }
    
    .quantity-sku {
        font-size: 11px;
    }
    
    .quantity-price {
        font-size: 13px;
    }
    
    .quantity-total-preview {
        padding: 12px;
        margin-top: 12px;
    }
    
    .quantity-total-preview span {
        font-size: 13px;
    }
    
    .quantity-total-preview strong {
        font-size: 18px;
    }
    
    /* Budget Confirmed Alert - Mobile */
    .budget-confirmed-alert {
        margin: 12px 16px 0;
        padding: 10px;
    }
    
    .budget-confirmed-alert-title {
        font-size: 11px;
    }
    
    .budget-confirmed-alert-text {
        font-size: 10px;
    }
    
    /* Form Hints - Mobile */
    .form-hint {
        font-size: 10px;
    }
    
    /* Badge Count - Mobile */
    .badge-count {
        font-size: 11px;
        padding: 2px 8px;
    }
    
    /* Dark Mode Mobile Optimizations */
    body.dark-mode .invoice-info-section {
        grid-template-columns: 1fr !important;
    }
    
    body.dark-mode .invoice-total-box {
        margin-top: 16px;
    }
    
    body.dark-mode .budget-actions-inside {
        flex-direction: column;
    }
    
    body.dark-mode .budget-actions-inside button,
    body.dark-mode .budget-actions-inside a {
        width: 100%;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .invoice-header-top {
        padding: 10px 12px;
    }
    
    .company-name {
        font-size: 16px;
    }
    
    .invoice-number {
        font-size: 14px;
    }
    
    .invoice-info-section {
        padding: 10px 12px;
    }
    
    .invoice-party {
        padding: 10px;
    }
    
    .total-amount-big {
        font-size: 18px;
    }
    
    .search-input-compact {
        font-size: 13px;
    }
    
    .budget-item-compact {
        padding: 10px;
    }
    
    .item-left h4 {
        font-size: 12px;
    }
    
    .modal {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
}

/* Select Arrow Position */
.form-select {
    background-position: right 0.5rem center !important;
    padding-right: 2rem !important;
}

/* ==========================
   INCOMES PAGE STYLES
   ========================== */

/* Alert Cards */
.alert-card-amber {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 16px;
    border-radius: 16px;
}

.alert-card-red {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
    padding: 16px;
    border-radius: 16px;
}

.alert-card-blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 4px solid #3b82f6;
    padding: 16px;
    border-radius: 16px;
}

.alert-header {
    color: #92400e;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-card-red .alert-header {
    color: #991b1b;
}

.alert-card-blue .alert-header {
    color: #1e40af;
}

.alert-number {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.alert-card-amber .alert-number {
    color: #92400e;
}

.alert-card-red .alert-number {
    color: #7f1d1d;
}

.alert-card-blue .alert-number {
    color: #1e3a8a;
}

.alert-description {
    font-size: 11px;
    margin-top: 4px;
}

.alert-card-amber .alert-description {
    color: #78350f;
}

.alert-card-red .alert-description {
    color: #7f1d1d;
}

.alert-card-blue .alert-description {
    color: #1e40af;
}

.alerts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Badge Styles */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.badge-deposited {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.badge-pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.badge-check {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* Account Info Box */
.account-info-box {
    display: none;
    padding: 12px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    margin-bottom: 12px;
}

.account-info-text {
    margin: 0;
    font-size: 13px;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-info-detail {
    margin: 8px 0 0 24px;
    font-size: 12px;
    color: #3b82f6;
}

/* Section Headers */
.section-header-green {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 700;
    color: #065f46;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header-blue {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header-sky {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 700;
    color: #0c4a6e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header-purple {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 700;
    color: #5b21b6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header-amber {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dark Mode - Incomes */
/* Alert cards now use unified style - see unified dark mode section above (line ~7919) */

body.dark-mode .alert-header,
body.dark-mode .alert-card-red .alert-header,
body.dark-mode .alert-card-blue .alert-header {
    color: var(--gold-primary);
}

body.dark-mode .alert-number {
    color: var(--text-primary);
}

body.dark-mode .alert-description {
    color: var(--text-secondary);
}

body.dark-mode .badge-deposited {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.15) 100%);
    color: #6ee7b7;
}

body.dark-mode .badge-pending {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.2) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: var(--gold-primary);
}

body.dark-mode .badge-check {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.15) 100%);
    color: #60a5fa;
}

body.dark-mode .account-info-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-left-color: #3b82f6;
}

body.dark-mode .account-info-text {
    color: #60a5fa;
}

body.dark-mode .account-info-detail {
    color: #93c5fd;
}

body.dark-mode .section-header-green,
body.dark-mode .section-header-blue,
body.dark-mode .section-header-sky,
body.dark-mode .section-header-purple,
body.dark-mode .section-header-amber {
    color: var(--gold-primary);
}

/* Dark Mode - Empty State */
body.dark-mode .empty-state {
    background: linear-gradient(135deg, rgba(26, 29, 41, 0.6) 0%, rgba(30, 35, 48, 0.4) 100%);
    border-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .empty-state:hover {
    border-color: rgba(212, 165, 116, 0.4);
    background: linear-gradient(135deg, rgba(26, 29, 41, 0.7) 0%, rgba(30, 35, 48, 0.5) 100%);
    box-shadow: 0 8px 20px rgba(212, 165, 116, 0.15);
}

body.dark-mode .empty-state i,
body.dark-mode .empty-state-icon {
    color: rgba(212, 165, 116, 0.3);
}

body.dark-mode .empty-state-icon i {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    color: rgba(212, 165, 116, 0.4);
    filter: drop-shadow(0 4px 12px rgba(212, 165, 116, 0.15));
}

body.dark-mode .empty-state:hover .empty-state-icon i {
    color: rgba(212, 165, 116, 0.6);
    filter: drop-shadow(0 6px 16px rgba(212, 165, 116, 0.25));
}

body.dark-mode .empty-state:hover i,
body.dark-mode .empty-state:hover .empty-state-icon {
    color: var(--gold-primary);
}

body.dark-mode .empty-state h3,
body.dark-mode .empty-state-title {
    color: var(--text-primary);
}

body.dark-mode .empty-state p,
body.dark-mode .empty-state-description {
    color: var(--text-secondary);
}

/* Dark Mode - Table Styles */
body.dark-mode .table-container {
    background: rgba(26, 29, 41, 0.8);
    border: 1px solid rgba(212, 165, 116, 0.15);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .table-wrapper {
    background: transparent;
}

body.dark-mode .events-table {
    background: rgba(30, 35, 48, 0.6);
    border-radius: 12px;
}

body.dark-mode .events-table thead {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(26, 29, 41, 0.9) 100%);
    border-bottom: 2px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .events-table th {
    color: var(--accent-gold);
    border-bottom-color: rgba(212, 165, 116, 0.3);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.8px;
}

body.dark-mode .events-table tbody tr {
    border-bottom-color: rgba(212, 165, 116, 0.12);
    background: rgba(30, 35, 48, 0.4);
    transition: all 0.3s ease;
}

body.dark-mode .events-table tbody tr:hover {
    background: rgba(212, 165, 116, 0.12);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.15);
}

body.dark-mode .events-table tbody tr:last-child td {
    border-bottom: none;
}

body.dark-mode .events-table td {
    color: var(--text-primary);
    font-weight: 500;
    white-space: normal !important;
    line-height: 1.6;
    vertical-align: top;
}

body.dark-mode .events-table td br {
    display: block !important;
    content: "" !important;
    margin: 2px 0 !important;
}

body.dark-mode .events-table td small {
    color: var(--text-secondary);
    font-size: 12px;
    display: inline-block !important;
    margin-top: 4px;
    opacity: 1 !important;
    visibility: visible !important;
    line-height: 1.4;
}

body.dark-mode .events-table td small.text-gray-200 {
    color: #9ca3af !important;
}

body.dark-mode .events-table td strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Table Footer Dark Mode */
body.dark-mode .table-footer-total {
    background: var(--card-bg);
    border-top: 2px solid var(--border-color);
}

body.dark-mode .table-footer-label {
    color: var(--text-primary);
}

body.dark-mode .table-footer-amount {
    color: var(--accent-gold);
}

/* Fix events table visibility in dark mode */
body.dark-mode .card .events-table-wrapper {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
}

body.dark-mode .card .table-wrapper {
    height: auto !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
}

/* Dark mode for account name wrapper */
body.dark-mode .account-name-wrapper {
    color: var(--text-primary);
}

body.dark-mode .account-name-wrapper span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Dark mode for account socio badge */
body.dark-mode .account-socio-badge-wrapper {
    margin-top: 6px;
}

body.dark-mode .account-socio-badge-wrapper .badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.25) 100%);
    color: var(--accent-gold);
    border: 1px solid rgba(212, 165, 116, 0.4);
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.2);
}

body.dark-mode .account-socio-badge-wrapper .badge-warning i {
    color: var(--accent-gold);
}

body.dark-mode .account-socio-badge-wrapper .account-socio-name {
    color: #fbbf24;
    font-weight: 500;
}

/* Dark mode for action buttons in table */
body.dark-mode .account-actions-desktop .btn-action {
    background: rgba(30, 35, 48, 0.8);
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: var(--accent-gold);
    transition: all 0.3s ease;
}

body.dark-mode .account-actions-desktop .btn-action:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

body.dark-mode .account-actions-desktop .btn-edit {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

body.dark-mode .account-actions-desktop .btn-edit:hover {
    background: rgba(16, 185, 129, 0.35);
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

body.dark-mode .account-actions-desktop .btn-warning {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

body.dark-mode .account-actions-desktop .btn-warning:hover {
    background: rgba(245, 158, 11, 0.35);
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

body.dark-mode .account-actions-desktop .btn-primary {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

body.dark-mode .account-actions-desktop .btn-primary:hover {
    background: rgba(59, 130, 246, 0.35);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

body.dark-mode .account-actions-desktop .btn-info {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
}

body.dark-mode .account-actions-desktop .btn-info:hover {
    background: rgba(139, 92, 246, 0.35);
    border-color: #8b5cf6;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

body.dark-mode .account-actions-desktop .btn-danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

body.dark-mode .account-actions-desktop .btn-danger:hover {
    background: rgba(239, 68, 68, 0.35);
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Ensure delete button is red with .btn-action class */
body.dark-mode .account-actions-desktop .btn-action.btn-danger {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}

body.dark-mode .account-actions-desktop .btn-action.btn-danger:hover {
    background: rgba(239, 68, 68, 0.35) !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
}

/* Light mode delete button styles */
.account-actions-desktop .btn-action.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: 1px solid #dc2626 !important;
    color: white !important;
}

.account-actions-desktop .btn-action.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    border-color: #b91c1c !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4) !important;
}

/* ==========================
   FLOATING ACTION BUTTON (FAB)
   ========================== */
.fab-mobile {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4), 0 8px 24px rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.fab-mobile:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5), 0 12px 32px rgba(139, 92, 246, 0.3);
}

.fab-mobile:active {
    transform: scale(0.95);
}

/* Show FAB only on mobile */
@media (max-width: 768px) {
    .fab-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hide desktop button on mobile */
    .top-bar .btn-primary {
        display: none !important;
    }
}

/* Dark Mode FAB */
body.dark-mode .fab-mobile {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    color: #0f1419;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.5), 0 8px 24px rgba(212, 165, 116, 0.3);
}

body.dark-mode .fab-mobile:hover {
    background: linear-gradient(135deg, #e8c9a0 0%, #d4a574 100%);
    box-shadow: 0 6px 16px rgba(212, 165, 116, 0.6), 0 12px 32px rgba(212, 165, 116, 0.4);
}

/* ==========================
   FAB WITH MENU (reusable)
   ========================== */
.fab-container-menu {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

@media (max-width: 768px) {
    .fab-container-menu.mobile-only {
        display: block;
    }
}

.fab-main-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5);
    transition: all 0.3s ease;
}

.fab-main-button:active {
    transform: scale(0.95);
}

.fab-main-button.active {
    transform: rotate(45deg);
}

body.dark-mode .fab-main-button {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.6);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.fab-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.fab-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 12px 16px;
    border-radius: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #2d3748;
    white-space: nowrap;
    min-width: 200px;
    border: none;
    font-family: inherit;
    font-size: 14px;
}

.fab-menu-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

body.dark-mode .fab-menu-item {
    background: linear-gradient(135deg, rgba(26, 29, 41, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.2);
    color: #cbd5e1;
}

body.dark-mode .fab-menu-item:hover {
    border-color: rgba(212, 165, 116, 0.4);
}

.fab-menu-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.fab-menu-item-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.fab-menu-item-icon.red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.fab-menu-item-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.fab-menu-item-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

body.dark-mode .fab-menu-item-icon.green {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.3) 0%, rgba(184, 144, 95, 0.3) 100%);
    border: 1px solid rgba(212, 165, 116, 0.4);
    color: #d4a574;
}

body.dark-mode .fab-menu-item-icon.red {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.25) 0%, rgba(184, 144, 95, 0.25) 100%);
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: #e8c9a0;
}

body.dark-mode .fab-menu-item-icon.blue {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.35) 0%, rgba(184, 144, 95, 0.35) 100%);
    border: 1px solid rgba(212, 165, 116, 0.5);
    color: #b8905f;
}

body.dark-mode .fab-menu-item-icon.purple {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.32) 0%, rgba(184, 144, 95, 0.32) 100%);
    border: 1px solid rgba(212, 165, 116, 0.45);
    color: #d4a574;
}

.fab-menu-item-text {
    font-size: 14px;
    font-weight: 600;
}

.fab-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 999;
    transition: background 0.3s ease;
}

.fab-overlay.active {
    display: block;
    background: rgba(0, 0, 0, 0.5);
}

body.dark-mode .fab-overlay.active {
    background: rgba(0, 0, 0, 0.7);
}

/* ==========================
   DARK MODE - INCOME MODAL
   ========================== */
body.dark-mode .modal {
    background: linear-gradient(135deg, rgba(26, 29, 41, 0.98) 0%, rgba(20, 25, 38, 0.98) 100%);
    border: 1px solid rgba(212, 165, 116, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

body.dark-mode .modal-header {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(184, 144, 95, 0.1) 100%);
    border-bottom: 1px solid rgba(212, 165, 116, 0.2);
}

body.dark-mode .modal-title {
    color: var(--gold-primary);
}

body.dark-mode .modal-title i {
    color: var(--gold-primary);
}

body.dark-mode .modal-close {
    background: rgba(212, 165, 116, 0.1);
    color: var(--gold-primary);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

body.dark-mode .modal-close:hover {
    background: rgba(212, 165, 116, 0.2);
    border-color: var(--gold-primary);
}

body.dark-mode .modal-body {
    background: transparent;
}

/* Form Sections in Dark Mode */
body.dark-mode .bg-gradient-green-soft {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%) !important;
    border-left: 4px solid rgba(16, 185, 129, 0.5) !important;
}

body.dark-mode .bg-gradient-blue-soft {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%) !important;
    border-left: 4px solid rgba(59, 130, 246, 0.5) !important;
}

body.dark-mode .bg-gradient-purple-soft {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%) !important;
    border-left: 4px solid rgba(139, 92, 246, 0.5) !important;
}

body.dark-mode .bg-gradient-amber-soft {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%) !important;
    border-left: 4px solid rgba(245, 158, 11, 0.5) !important;
}

/* Section Headers in Modal */
body.dark-mode .modal-body h3 {
    color: var(--gold-primary) !important;
}

body.dark-mode .modal-body h3 i {
    color: var(--gold-primary) !important;
}

/* Form Controls in Modal */
body.dark-mode .form-control,
body.dark-mode .form-select {
    background: rgba(30, 35, 48, 0.6);
    border: 1px solid rgba(212, 165, 116, 0.2);
    color: var(--text-primary);
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background: rgba(30, 35, 48, 0.8);
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

body.dark-mode .form-control::placeholder {
    color: #64748b;
}

body.dark-mode .form-control option {
    background: #1a1d29;
    color: var(--text-primary);
}

body.dark-mode .form-select option {
    background: #1a1d29;
    color: var(--text-primary);
}

/* Labels in Modal */
body.dark-mode .modal-body label {
    color: #cbd5e1;
}

body.dark-mode .required {
    color: #fca5a5;
}

/* File Upload in Modal */
body.dark-mode .file-upload-wrapper {
    background: rgba(30, 35, 48, 0.6);
    border: 2px dashed rgba(212, 165, 116, 0.3);
}

body.dark-mode .file-upload-wrapper:hover {
    background: rgba(30, 35, 48, 0.8);
    border-color: var(--gold-primary);
}

body.dark-mode .file-upload-icon {
    color: var(--gold-primary);
}

body.dark-mode .file-upload-text {
    color: #cbd5e1;
}

body.dark-mode .file-name {
    color: var(--gold-primary);
}

/* Modal Footer */
body.dark-mode .modal-footer {
    background: rgba(30, 35, 48, 0.4);
    border-top: 1px solid rgba(212, 165, 116, 0.2);
}

body.dark-mode .btn-secondary {
    background: rgba(30, 35, 48, 0.8);
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: var(--gold-primary);
}

body.dark-mode .btn-secondary:hover {
    background: rgba(30, 35, 48, 1);
    border-color: var(--gold-primary);
}

/* Info Boxes in Modal */
body.dark-mode .account-info-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-left-color: #3b82f6;
}

/* ========================================
   INCOME CATEGORIES STYLES
======================================== */

/* Badge Variants for Categories */
.badge-indigo {
    background: #eef2ff;
    color: #4338ca;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-purple {
    background: #faf5ff;
    color: #7c3aed;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* Dark Mode Badge Variants */
body.dark-mode .badge-indigo {
    background: rgba(79, 70, 229, 0.2);
    color: #a5b4fc;
}

body.dark-mode .badge-purple {
    background: rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
}

body.dark-mode .badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

body.dark-mode .badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Subcategory Row Styles */
.subcategory-row {
    background: #f8fafc;
}

.subcategory-cell {
    padding-left: 50px !important;
}

.subsubcategory-row {
    background: #f1f5f9;
}

.subsubcategory-cell {
    padding-left: 80px !important;
}

/* Dark Mode Subcategory Rows */
body.dark-mode .subcategory-row {
    background: rgba(15, 20, 25, 0.5);
}

body.dark-mode .subsubcategory-row {
    background: rgba(15, 20, 25, 0.7);
}

/* Helper Classes */
.ml-neg-1 {
    margin-left: -4px;
}

.rotate-90 {
    transform: rotate(90deg);
    display: inline-block;
}

.text-muted {
    color: #94a3b8;
}

body.dark-mode .text-muted {
    color: #64748b;
}

/* Checkbox Label Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.checkbox-input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

body.dark-mode .checkbox-input {
    accent-color: var(--gold-primary);
}

.checkbox-text {
    font-weight: 600;
    color: #1e293b;
}

body.dark-mode .checkbox-text {
    color: var(--text-color);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

body.dark-mode .checkbox-group {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(100, 116, 139, 0.2);
}

/* Input with Suffix */
.input-with-suffix {
    position: relative;
}

.input-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 600;
    pointer-events: none;
}

.input-with-suffix .form-control {
    padding-right: 40px;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 16px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-input {
    margin-right: 6px;
    cursor: pointer;
}

.radio-text {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Icon Colors */
.icon-amber {
    color: #f59e0b;
}

/* Action Buttons Dark Mode */
body.dark-mode .btn-action {
    color: white !important;
}

body.dark-mode .btn-edit {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%) !important;
    box-shadow: 0 2px 4px rgba(212, 165, 116, 0.4) !important;
}

body.dark-mode .btn-edit:hover {
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.6) !important;
    transform: translateY(-2px);
}

body.dark-mode .btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4) !important;
}

body.dark-mode .btn-delete:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6) !important;
    transform: translateY(-2px);
}

body.dark-mode .btn-return {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%) !important;
    box-shadow: 0 2px 4px rgba(232, 201, 160, 0.4) !important;
}

body.dark-mode .btn-return:hover {
    box-shadow: 0 4px 12px rgba(232, 201, 160, 0.6) !important;
    transform: translateY(-2px);
}

/* Mobile Optimization for Income Categories */
@media (max-width: 768px) {
    /* Top Bar Mobile */
    .top-bar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .top-bar .welcome h1 {
        font-size: 22px;
    }

    .top-bar .welcome .table-subtitle {
        font-size: 13px;
    }

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

    /* Categories Table Wrapper - Contenedor externo */
    .categories-table-wrapper {
        margin: 0 -12px !important;
        width: calc(100% + 24px) !important;
        position: relative;
    }

    .categories-table-wrapper .table-container {
        overflow-x: scroll !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 0;
        padding: 0 12px;
        width: 100% !important;
        display: block !important;
    }

    /* Income Categories Table Mobile */
    .categories-table-wrapper .events-table {
        min-width: 700px !important;
        max-width: none !important;
        width: 700px !important;
        font-size: 13px;
        margin: 0;
    }

    .categories-table-wrapper .events-table th,
    .categories-table-wrapper .events-table td {
        padding: 12px 10px;
        font-size: 13px;
    }

    .categories-table-wrapper .events-table th {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        white-space: nowrap;
    }

    /* Ajuste de columnas */
    .categories-table-wrapper .events-table td:first-child,
    .categories-table-wrapper .events-table th:first-child {
        min-width: 140px;
        position: sticky;
        left: 12px;
        background: var(--card-bg);
        z-index: 2;
    }

    body.dark-mode .categories-table-wrapper .events-table td:first-child,
    body.dark-mode .categories-table-wrapper .events-table th:first-child {
        background: var(--card-bg);
    }

    .categories-table-wrapper .events-table td:nth-child(2),
    .categories-table-wrapper .events-table th:nth-child(2) {
        min-width: 150px;
    }

    .categories-table-wrapper .events-table td:nth-child(3),
    .categories-table-wrapper .events-table th:nth-child(3),
    .categories-table-wrapper .events-table td:nth-child(4),
    .categories-table-wrapper .events-table th:nth-child(4) {
        min-width: 100px;
        text-align: center;
    }

    .categories-table-wrapper .events-table td:nth-child(5),
    .categories-table-wrapper .events-table th:nth-child(5) {
        min-width: 100px;
    }

    .categories-table-wrapper .events-table td:last-child,
    .categories-table-wrapper .events-table th:last-child {
        min-width: 100px;
        text-align: center;
    }

    /* Badges Mobile */
    .categories-table-wrapper .badge {
        font-size: 11px;
        padding: 3px 8px;
        white-space: nowrap;
    }

    .categories-table-wrapper .badge i {
        font-size: 10px;
    }

    /* Action Buttons Mobile */
    .categories-table-wrapper .action-buttons {
        display: flex;
        gap: 6px;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .categories-table-wrapper .btn-action {
        padding: 8px 10px;
        font-size: 11px;
        min-width: 36px;
    }

    .categories-table-wrapper .btn-action i {
        font-size: 14px;
    }

    /* Subcategory Indentation Mobile */
    .categories-table-wrapper .subcategory-cell {
        padding-left: 30px !important;
    }

    .categories-table-wrapper .subsubcategory-cell {
        padding-left: 50px !important;
    }

    /* Empty State Mobile */
    .empty-state {
        padding: 40px 20px;
    }

    .empty-state i {
        font-size: 48px;
    }

    .empty-state h3 {
        font-size: 18px;
    }

    .empty-state p {
        font-size: 13px;
    }

    /* Hide desktop button, show FAB */
    .top-bar .btn-primary {
        display: none !important;
    }

    .fab-categories {
        display: flex !important;
    }
}

.fab-categories {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6d28d9 100%);
    color: white;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    border: none;
}

.fab-categories:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.fab-categories:active {
    transform: scale(0.95);
}

body.dark-mode .fab-categories {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

body.dark-mode .fab-categories:hover {
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.6);
}


/* Cheque Fields */
body.dark-mode #chequeFields {
    background: rgba(30, 35, 48, 0.4);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

/* ============================================
   ACCOUNTS PAGE - MOBILE OPTIMIZATION
   ============================================ */

/* Accounts Cards Mobile */
.accounts-cards-mobile {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.account-card-mobile {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.account-card-mobile:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.account-card-title h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.account-card-type {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-card-saldo {
    text-align: right;
}

.account-saldo-amount {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.account-saldo-moneda {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}

.account-card-socio {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px;
    background: #fef3c7;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
}

.account-socio-name {
    font-size: 12px;
    color: #92400e;
    font-weight: 500;
}

.account-card-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.account-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.account-info-label {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.account-info-label i {
    font-size: 14px;
    color: #8b5cf6;
}

.account-info-value {
    font-size: 13px;
    color: #1e293b;
    font-weight: 600;
    text-align: right;
    flex: 1;
    margin-left: 12px;
}

.account-card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.btn-action-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border: none;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.btn-action-mobile i {
    font-size: 16px;
    margin-bottom: 2px;
}

.btn-action-mobile span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-action-mobile.btn-edit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-action-mobile.btn-edit:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-action-mobile.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.btn-action-mobile.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-action-mobile.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-action-mobile.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-action-mobile.btn-info {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.btn-action-mobile.btn-info:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-action-mobile.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-action-mobile.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Mobile: Show cards, hide table */
@media (max-width: 768px) {
    .accounts-cards-mobile {
        display: flex;
        padding: 0 12px;
    }
    
    .account-card-mobile {
        margin: 0 0 16px 0;
        border-radius: 12px;
    }
    
    .table-container.desktop-only {
        display: none;
    }
    
    /* Optimize stats grid for mobile */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
        padding: 0 12px;
    }
    
    /* Account card mobile adjustments */
    .account-card-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .account-card-actions .btn-action-mobile:last-child {
        grid-column: 1 / -1;
    }
}

/* ============================================
   ACCOUNTS PAGE - DARK MODE
   ============================================ */

body.dark-mode .account-card-mobile {
    background: rgba(30, 35, 48, 0.8);
    border-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .account-card-mobile:hover {
    background: rgba(30, 35, 48, 0.95);
    border-color: rgba(212, 165, 116, 0.3);
    box-shadow: 0 4px 20px rgba(212, 165, 116, 0.15);
}

body.dark-mode .account-card-header {
    border-bottom-color: rgba(212, 165, 116, 0.15);
}

body.dark-mode .account-card-title h3 {
    color: var(--text-primary);
}

body.dark-mode .account-card-type {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
}

body.dark-mode .account-saldo-amount {
    color: var(--text-primary);
}

body.dark-mode .account-saldo-moneda {
    color: var(--text-secondary);
}

body.dark-mode .account-card-socio {
    background: rgba(245, 158, 11, 0.15);
    border-left-color: var(--accent-gold);
}

body.dark-mode .account-socio-name {
    color: #fbbf24;
}

body.dark-mode .account-info-label {
    color: var(--text-secondary);
}

body.dark-mode .account-info-label i {
    color: var(--accent-gold);
}

body.dark-mode .account-info-value {
    color: var(--text-primary);
}

body.dark-mode .account-card-actions {
    border-top-color: rgba(212, 165, 116, 0.15);
}

/* Dark mode for accounts table */
body.dark-mode .events-table tbody tr {
    border-bottom-color: rgba(212, 165, 116, 0.1);
}

body.dark-mode .events-table tbody tr:hover {
    background: rgba(212, 165, 116, 0.05);
}

body.dark-mode .events-table td {
    color: var(--text-primary);
    font-weight: 500;
    white-space: normal !important;
    line-height: 1.6;
    vertical-align: top;
}

body.dark-mode .events-table td br {
    display: block !important;
    content: "" !important;
    margin: 2px 0 !important;
}

body.dark-mode .events-table td small {
    color: var(--text-secondary);
    font-size: 12px;
    display: inline-block !important;
    margin-top: 4px;
    opacity: 1 !important;
    visibility: visible !important;
    line-height: 1.4;
}

body.dark-mode .events-table td small.text-gray-200 {
    color: #9ca3af !important;
}

/* Dark mode for modals in accounts */
body.dark-mode .modal-body .bg-gradient-amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-left-color: var(--accent-gold);
}

body.dark-mode .modal-body .bg-gradient-amber h4 {
    color: var(--accent-gold) !important;
}

body.dark-mode .modal-body .bg-gradient-amber small {
    color: #fbbf24 !important;
}

body.dark-mode .modal-body .bg-gradient-amber label span {
    color: #fbbf24 !important;
}

body.dark-mode .modal-body .bg-gradient-purple-alt {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(124, 58, 237, 0.25) 100%);
    color: var(--text-primary);
}

body.dark-mode .modal-body .bg-gradient-purple-alt p {
    color: var(--text-primary);
}

body.dark-mode .modal-body .bg-gradient-purple-alt h3 {
    color: var(--text-primary);
}

body.dark-mode .modal-body .bg-slate-50 {
    background: rgba(30, 35, 48, 0.6);
}

body.dark-mode .modal-body .bg-slate-50 h4 {
    color: var(--text-primary);
}

body.dark-mode .modal-body .bg-slate-50 .text-slate-500 {
    color: var(--text-secondary);
}

body.dark-mode .modal-body .bg-slate-50 .text-slate-900 {
    color: var(--text-primary);
}

body.dark-mode .modal-body .bg-red-50 {
    background: rgba(239, 68, 68, 0.15);
    border-left-color: #ef4444;
}

body.dark-mode .modal-body .bg-red-50 p {
    color: #fca5a5;
}

body.dark-mode .modal-body .bg-gray-50 {
    background: rgba(30, 35, 48, 0.5);
    border-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .modal-body .bg-gray-50 p {
    color: var(--text-primary);
}

body.dark-mode .modal-body .bg-gray-50 span {
    color: var(--text-primary);
}

body.dark-mode .modal-body .bg-amber-50 {
    background: rgba(245, 158, 11, 0.15);
    border-left-color: var(--accent-gold);
}

body.dark-mode .modal-body .bg-amber-50 p {
    color: #fbbf24;
}

/* Form error messages */
.form-error-message {
    display: none;
    padding: 14px 16px;
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    border-radius: 10px;
    margin-bottom: 20px;
}

.form-error-message p {
    margin: 0;
    font-size: 13px;
    color: #991b1b;
    display: flex;
    align-items: center;
}

.form-error-message i {
    margin-right: 8px;
    font-size: 16px;
}

body.dark-mode .form-error-message {
    background: rgba(239, 68, 68, 0.15);
    border-left-color: #ef4444;
}

body.dark-mode .form-error-message p {
    color: #fca5a5;
}

/* CBU/Alias validation messages */
.cbu-error,
.alias-error {
    display: none;
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
}

.cbu-success {
    display: none;
    color: #10b981;
    font-size: 12px;
    margin-top: 4px;
}

.cbu-checking {
    display: none;
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}

body.dark-mode .cbu-error,
body.dark-mode .alias-error {
    color: #fca5a5;
}

body.dark-mode .cbu-success {
    color: #34d399;
}

body.dark-mode .cbu-checking {
    color: var(--text-secondary);
}

/* Socio section styles */
.socio-section {
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.socio-section h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.socio-section h4 i {
    color: #f59e0b;
}

.socio-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 2px solid #fbbf24;
    transition: all 0.2s;
}

.socio-checkbox-label:hover {
    border-color: #f59e0b;
    background: #fffbeb;
}

.socio-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: 10px;
}

.socio-checkbox-label span {
    font-weight: 600;
    color: #92400e;
}

.socio-info-text {
    display: block;
    margin-top: 8px;
    color: #92400e;
    font-size: 12px;
}

.socio-field-wrapper {
    display: none;
    margin-top: 16px;
}

body.dark-mode .socio-section {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-left-color: var(--accent-gold);
}

body.dark-mode .socio-section h4 {
    color: var(--accent-gold);
}

body.dark-mode .socio-section h4 i {
    color: var(--accent-gold);
}

body.dark-mode .socio-checkbox-label {
    background: rgba(30, 35, 48, 0.6);
    border-color: var(--accent-gold);
}

body.dark-mode .socio-checkbox-label:hover {
    background: rgba(30, 35, 48, 0.8);
    border-color: #fbbf24;
}

body.dark-mode .socio-checkbox-label span {
    color: #fbbf24;
}

body.dark-mode .socio-info-text {
    color: #fbbf24;
}

/* Transaction modal header */
.transaction-modal-header {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.transaction-modal-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.transaction-modal-header-section p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.transaction-modal-header-section h3 {
    margin: 4px 0 0 0;
    font-size: 18px;
    font-weight: 600;
}

.transaction-modal-header .header-label {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.transaction-modal-header .header-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.saldos-container {
    margin-top: 16px;
    display: grid;
    gap: 8px;
}

.transaction-proyeccion {
    display: none;
    margin-top: 12px;
    padding: 12px;
    background: rgba(139, 92, 246, 0.1);
    border-left: 3px solid #8b5cf6;
    border-radius: 6px;
}

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

.proyeccion-label {
    margin: 0;
    font-size: 13px;
    color: #cbd5e1;
}

.transaction-modal-header-section .saldo-amount {
    margin: 4px 0 0 0;
    font-size: 24px;
    font-weight: 700;
}

.transaction-proyeccion {
    display: none;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.transaction-proyeccion p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.transaction-proyeccion .saldo-proyectado {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.saldo-proyectado {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

body.dark-mode .transaction-modal-header {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.25) 0%, rgba(184, 134, 76, 0.2) 100%);
    color: var(--text-primary);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

body.dark-mode .transaction-modal-header .header-label {
    color: var(--text-secondary);
}

body.dark-mode .transaction-modal-header .header-title {
    color: var(--gold-primary);
    font-weight: 600;
}

body.dark-mode .transaction-modal-header p {
    color: var(--text-secondary);
}

body.dark-mode .transaction-modal-header h3 {
    color: var(--gold-primary);
    font-weight: 600;
}

body.dark-mode .transaction-proyeccion {
    border-top-color: rgba(212, 165, 116, 0.3);
    background: rgba(212, 165, 116, 0.08) !important;
    border-left-color: var(--gold-primary) !important;
}

body.dark-mode .proyeccion-label {
    color: var(--text-secondary);
}

/* Utility classes for accounts */
.padding-16 {
    padding: 16px;
}

.padding-12 {
    padding: 12px;
}

.mb-20 {
    margin-bottom: 20px;
}

.gap-12 {
    gap: 12px;
}

.flex-2 {
    flex: 2;
}

.border-b-2 {
    border-bottom: 2px solid;
}

.border-red-600 {
    border-color: #dc2626;
}

/* Modal footer styled */
.modal-footer-styled {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

body.dark-mode .modal-footer-styled {
    background: rgba(30, 35, 48, 0.6);
    border-top-color: rgba(212, 165, 116, 0.2);
}

/* Dark mode scrollbar for table container */
body.dark-mode .table-container::-webkit-scrollbar {
    display: none; /* Ocultar scrollbar en modo oscuro también */
}

body.dark-mode .table-container::-webkit-scrollbar-track {
    display: none;
}

body.dark-mode .table-container::-webkit-scrollbar-thumb {
    display: none;
}

body.dark-mode .table-container::-webkit-scrollbar-thumb:hover {
    display: none;
}

/* Dark mode for success message */
body.dark-mode .success-message {
    background: rgba(16, 185, 129, 0.2);
    border-left: 4px solid #10b981;
    color: #34d399;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

body.dark-mode .success-message i {
    color: #10b981;
}

/* Dark mode for account type badge in table */
body.dark-mode .account-card-type {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(124, 58, 237, 0.25) 100%);
    color: var(--accent-gold);
    border: 1px solid rgba(212, 165, 116, 0.3);
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.2);
}

/* Desktop specific dark mode improvements */
@media (min-width: 769px) {
    body.dark-mode .events-table {
        background: rgba(30, 35, 48, 0.7);
    }
    
    body.dark-mode .events-table thead {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(26, 29, 41, 0.95) 100%);
    }
    
    body.dark-mode .events-table tbody tr {
        background: rgba(30, 35, 48, 0.5);
    }
    
    body.dark-mode .events-table tbody tr:nth-child(even) {
        background: rgba(26, 29, 41, 0.4);
    }
    
    body.dark-mode .events-table tbody tr:hover {
        background: rgba(212, 165, 116, 0.15);
        border-left: 3px solid var(--accent-gold);
        padding-left: 17px;
    }
    
    body.dark-mode .table-container {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(212, 165, 116, 0.1);
    }
}

/* Dark mode for form controls in accounts modals */
body.dark-mode #accountModal .form-control,
body.dark-mode #editAccountModal .form-control,
body.dark-mode #transactionModal .form-control {
    background: rgba(30, 35, 48, 0.6);
    border-color: rgba(212, 165, 116, 0.2);
    color: var(--text-primary);
}

body.dark-mode #accountModal .form-control:focus,
body.dark-mode #editAccountModal .form-control:focus,
body.dark-mode #transactionModal .form-control:focus {
    border-color: var(--accent-gold);
    background: rgba(30, 35, 48, 0.8);
}

body.dark-mode #accountModal label,
body.dark-mode #editAccountModal label,
body.dark-mode #transactionModal label {
    color: var(--text-primary);
}

/* Account name wrapper */
.account-name-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-socio-badge-wrapper {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
}

.account-actions-desktop {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* FAB for accounts mobile */
.fab-accounts {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fab-accounts:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.fab-accounts:active {
    transform: scale(0.95);
}

body.dark-mode .fab-accounts {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.6);
    color: #0f1419;
}

body.dark-mode .fab-accounts:hover {
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.6);
}

body.dark-mode .fab-accounts.fab-secondary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
    color: white;
}

body.dark-mode .fab-accounts.fab-secondary:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* Mobile optimizations for modals */
@media (max-width: 768px) {
    .fab-container-accounts {
        display: flex !important;
    }
    
    .fab-accounts {
        display: flex !important;
    }
    
    .modal {
        max-width: 95vw !important;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-body {
        padding: 16px !important;
    }
    
    .modal-header {
        padding: 16px !important;
    }
    
    .modal-footer {
        padding: 12px 16px !important;
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100% !important;
    }
    
    /* Account card actions on mobile - 2 columns */
    .account-card-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .account-card-actions .btn-action-mobile:last-child {
        grid-column: 1 / -1;
    }
    
    /* Optimize action buttons in desktop table for mobile */
    .account-actions-desktop {
        gap: 4px;
    }
    
    .account-actions-desktop .btn-action {
        width: 32px;
        height: 32px;
        padding: 0;
        font-size: 12px;
    }
}

/* ============================================
   EVENTS VIEW - REMOVE PURPLE IN DARK MODE
   ============================================ */

/* Upcoming Events - Change purple to gold */
body.dark-mode .card-header-upcoming i {
    color: var(--accent-gold) !important;
}

body.dark-mode .upcoming-event-item:hover {
    border-color: var(--accent-gold) !important;
}

body.dark-mode .upcoming-event-date {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%) !important;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3) !important;
}

/* Calendar Day - Change purple to gold */
body.dark-mode .calendar-day.today {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%) !important;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3) !important;
    border-color: var(--accent-gold) !important;
}

body.dark-mode .calendar-day.has-events:not(.today) {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1) 0%, rgba(184, 144, 95, 0.1) 100%) !important;
    border-color: var(--accent-gold) !important;
}

body.dark-mode .calendar-day.has-events.today {
    border-color: white !important;
}

body.dark-mode .event-name i {
    color: var(--accent-gold) !important;
}

body.dark-mode .calendar-day.today .event-name i {
    color: var(--accent-gold) !important;
}

/* Events Table - Change purple text to gold */
body.dark-mode .events-table a.text-purple-600,
body.dark-mode .events-table .text-purple-600 {
    color: var(--accent-gold) !important;
}

body.dark-mode .events-table a.text-purple-600:hover {
    color: #e8c9a0 !important;
}

/* Budget Badge - Change purple to gold */
body.dark-mode .events-table [style*="#8b5cf6"],
body.dark-mode .events-table [style*="bg-purple"] {
    background: rgba(212, 165, 116, 0.1) !important;
    color: var(--accent-gold) !important;
    border: 1px solid rgba(212, 165, 116, 0.3) !important;
}

/* Event Budget Badge Class */
.event-budget-badge {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

body.dark-mode .event-budget-badge {
    background: rgba(212, 165, 116, 0.1) !important;
    color: var(--accent-gold) !important;
    border: 1px solid rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .event-budget-badge i {
    color: var(--accent-gold) !important;
}

/* Events Table Action Buttons - Change to gold in dark mode */
body.dark-mode .events-table .btn-action {
    background: rgba(212, 165, 116, 0.15) !important;
    color: var(--accent-gold) !important;
    border: 1px solid rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .events-table .btn-action:hover {
    background: rgba(212, 165, 116, 0.25) !important;
    border-color: var(--accent-gold) !important;
    color: var(--accent-gold) !important;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
}

body.dark-mode .events-table .btn-view {
    background: rgba(212, 165, 116, 0.15) !important;
    color: var(--accent-gold) !important;
    border: 1px solid rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .events-table .btn-view:hover {
    background: rgba(212, 165, 116, 0.25) !important;
    border-color: var(--accent-gold) !important;
    color: var(--accent-gold) !important;
}

body.dark-mode .events-table .btn-edit {
    background: rgba(212, 165, 116, 0.15) !important;
    color: var(--accent-gold) !important;
    border: 1px solid rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .events-table .btn-edit:hover {
    background: rgba(212, 165, 116, 0.25) !important;
    border-color: var(--accent-gold) !important;
    color: var(--accent-gold) !important;
}

body.dark-mode .events-table .btn-delete {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

body.dark-mode .events-table .btn-delete:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
}

/* Override inline styles for action buttons in events table */
body.dark-mode .events-table .btn-action[class*="bg-gradient-green"],
body.dark-mode .events-table .btn-action[style*="#10b981"],
body.dark-mode .events-table .btn-action[style*="green"] {
    background: rgba(212, 165, 116, 0.15) !important;
    color: var(--accent-gold) !important;
    border: 1px solid rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .events-table .btn-action[class*="bg-gradient-green"]:hover,
body.dark-mode .events-table .btn-action[style*="#10b981"]:hover,
body.dark-mode .events-table .btn-action[style*="green"]:hover {
    background: rgba(212, 165, 116, 0.25) !important;
    border-color: var(--accent-gold) !important;
    color: var(--accent-gold) !important;
}

/* Event Customer Link */
.event-customer-link {
    color: #8b5cf6;
}

body.dark-mode .event-customer-link {
    color: var(--accent-gold) !important;
}

body.dark-mode .event-customer-link:hover {
    color: #e8c9a0 !important;
}

/* ============================================
   DARK MODE - DEPOSITOS
   ============================================ */

/* Badges movil/fijo en dark mode */
body.dark-mode .badge-movil {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25) 0%, rgba(217, 119, 6, 0.2) 100%);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

body.dark-mode .badge-fijo {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.2) 100%);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Carousel de depósitos en dark mode */
body.dark-mode #depositosCarousel::-webkit-scrollbar-track {
    background: rgba(30, 35, 48, 0.5);
}

body.dark-mode #depositosCarousel::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
}

body.dark-mode #depositosCarousel::-webkit-scrollbar-thumb:hover {
    background: #e8c9a0;
}

/* Botones de navegación del carousel */
body.dark-mode #scrollLeft,
body.dark-mode #scrollRight {
    background: rgba(30, 35, 48, 0.95);
    border-color: rgba(212, 165, 116, 0.3);
}

body.dark-mode #scrollLeft:hover,
body.dark-mode #scrollRight:hover {
    background: rgba(212, 165, 116, 0.15);
    border-color: var(--accent-gold);
}

body.dark-mode #scrollLeft i,
body.dark-mode #scrollRight i {
    color: var(--text-secondary);
}

body.dark-mode #scrollLeft:hover i,
body.dark-mode #scrollRight:hover i {
    color: var(--accent-gold);
}

/* Warehouse name en dark mode */
body.dark-mode .warehouse-name {
    color: var(--text-primary);
}

body.dark-mode .warehouse-name i {
    color: var(--accent-gold);
}

/* Deposito cards en dark mode */
body.dark-mode .deposito-card {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .deposito-card:hover {
    border-color: rgba(212, 165, 116, 0.4);
    box-shadow: 0 6px 16px rgba(212, 165, 116, 0.2);
}

/* Textos dentro de deposito cards en dark mode */
body.dark-mode .deposito-card span[style*="color: #64748b"] {
    color: var(--text-secondary) !important;
}

body.dark-mode .deposito-card span[style*="color: #059669"],
body.dark-mode .deposito-card span[style*="color: #1d4ed8"] {
    color: var(--text-primary) !important;
}

body.dark-mode .deposito-card i.fa-couch {
    color: #34d399 !important;
}

body.dark-mode .deposito-card i.fa-wine-bottle {
    color: #60a5fa !important;
}

body.dark-mode .deposito-card div[style*="color: #9ca3af"] {
    color: var(--text-secondary) !important;
}

body.dark-mode .deposito-card div[style*="border-bottom"] {
    border-bottom-color: rgba(212, 165, 116, 0.15) !important;
}

/* Address text en dark mode */
body.dark-mode .address-text {
    color: var(--text-secondary);
}

body.dark-mode .address-text i {
    color: #34d399;
}

/* ============================================
   PRODUCT MODAL - IMPROVED STYLES
   ============================================ */

/* Product Modal - General Improvements */
#productModal .modal {
    max-width: 900px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

#productModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 16px 16px 0 0 !important;
    padding: 20px 24px !important;
    border-bottom: none !important;
}

#productModal .modal-title {
    color: white !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

#productModal .modal-close {
    color: white !important;
    font-size: 28px !important;
    opacity: 0.9 !important;
    transition: all 0.2s ease !important;
}

#productModal .modal-close:hover {
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

#productModal .modal-body {
    padding: 24px !important;
    background: #f8fafc !important;
}

/* Type Selector Container */
.product-type-selector-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 24px !important;
    border-radius: 12px !important;
    margin-bottom: 24px !important;
    border: none !important;
}

.product-type-label {
    color: white !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
    display: block !important;
    font-size: 15px !important;
}

.product-type-label i {
    margin-right: 8px !important;
}

.product-type-selector-grid {
    display: flex !important;
    gap: 12px !important;
}

.product-type-selector-grid .type-selector {
    flex: 1 !important;
}

/* Type Card Styles - Light Mode */
.type-card {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    backdrop-filter: blur(10px) !important;
}

.type-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.3) !important;
}

.type-card i {
    font-size: 36px !important;
    color: white !important;
    display: block !important;
    margin-bottom: 10px !important;
    transition: all 0.3s ease !important;
}

.type-card:hover i {
    transform: scale(1.1) !important;
}

.type-card span {
    display: block !important;
    color: white !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    margin-bottom: 6px !important;
}

.type-card small {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

.type-selector input[type="radio"]:checked + .type-card {
    background: white !important;
    border-color: white !important;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4) !important;
    transform: translateY(-2px) !important;
}

.type-selector input[type="radio"]:checked + .type-card i,
.type-selector input[type="radio"]:checked + .type-card span {
    color: #667eea !important;
}

.type-selector input[type="radio"]:checked + .type-card small {
    color: #764ba2 !important;
}

/* Section Headers */
.product-section-header {
    color: #4a5568 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 24px 0 16px 0 !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.product-section-header i {
    color: #667eea !important;
    font-size: 18px !important;
}

.product-section-mobiliario {
    color: #667eea !important;
    border-bottom-color: #667eea !important;
}

.product-section-mobiliario i {
    color: #667eea !important;
}

.product-section-bebida {
    color: #f5576c !important;
    border-bottom-color: #f5576c !important;
}

.product-section-bebida i {
    color: #f5576c !important;
}

.product-section-inventory {
    color: #f59e0b !important;
    border-bottom-color: #f59e0b !important;
}

.product-section-inventory i {
    color: #f59e0b !important;
}

/* Form Groups */
#productModal .form-group {
    margin-bottom: 20px !important;
}

#productModal .form-group label {
    color: #2d3748 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
    display: block !important;
}

#productModal .form-control,
#productModal .form-select {
    border: 1px solid #cbd5e0 !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

#productModal .form-control:focus,
#productModal .form-select:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}

/* File Upload */
#productModal .file-upload-label {
    border: 2px dashed #cbd5e0 !important;
    border-radius: 12px !important;
    padding: 32px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
}

#productModal .file-upload-label:hover {
    border-color: #667eea !important;
    background: linear-gradient(135deg, #f0f4ff 0%, #f7faff 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15) !important;
}

#productModal .file-icon {
    width: 80px !important;
    height: 80px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 36px !important;
    color: white !important;
    margin: 0 !important;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3) !important;
}

#productModal .file-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

#productModal .file-info h4 {
    color: #2d3748 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    margin: 0 !important;
}

#productModal .file-info p {
    color: #718096 !important;
    font-size: 13px !important;
    margin: 0 !important;
}

/* Depositos Container */
#productModal #depositosContainer {
    background: #f7fafc !important;
    padding: 20px !important;
    border-radius: 12px !important;
    border: 2px dashed #cbd5e0 !important;
}

#productModal .bg-white {
    background: white !important;
    padding: 16px !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.2s ease !important;
}

#productModal .bg-white:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    border-color: #667eea !important;
}

/* Modal Footer */
#productModal .modal-footer {
    padding: 20px 24px !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    border-radius: 0 0 16px 16px !important;
    display: flex !important;
    gap: 12px !important;
    justify-content: flex-end !important;
}

/* Product Modal - Error Container */
.product-modal-error-container {
    display: none;
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 16px;
    margin: 0 24px 16px 24px;
}

.product-modal-error-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.product-modal-error-icon {
    color: #ef4444;
    font-size: 20px;
    margin-top: 2px;
}

.product-modal-error-body {
    flex: 1;
}

.product-modal-error-title {
    color: #991b1b;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-modal-error-list {
    color: #991b1b;
    font-size: 13px;
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.product-modal-error-close {
    background: none;
    border: none;
    color: #991b1b;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    transition: opacity 0.2s ease;
}

.product-modal-error-close:hover {
    opacity: 0.7;
}

/* Product Modal - Grid Layouts */
.product-modal-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.product-modal-grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
}

/* Product Modal - Hint Text */
.product-modal-hint {
    color: #9ca3af;
    font-size: 11px;
    display: block;
    margin-top: 4px;
}

.product-modal-hint i {
    margin-right: 4px;
}

/* Product Modal - Checkbox Label */
.product-modal-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.product-modal-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
}

.product-modal-checkbox-text {
    color: #4a5568;
    font-weight: 500;
}

/* Product Modal - File Upload Preview */
.product-modal-image-preview {
    margin-top: 12px;
    text-align: center;
}

/* Product Modal - Depot Container */
.product-modal-depot-container {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    border: 2px dashed #cbd5e0;
}

.product-modal-depot-grid {
    display: grid;
    gap: 16px;
}

.product-modal-depot-card {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.product-modal-depot-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.product-modal-depot-icon {
    color: #7c3aed;
    font-size: 18px;
    margin-right: 10px;
}

.product-modal-depot-name {
    color: #1f2937;
    flex: 1;
}

.product-modal-depot-badge {
    background: #fef3c7;
    color: #f59e0b;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.product-modal-depot-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Product Modal - Info Box */
.product-modal-info-box {
    margin-top: 12px;
    padding: 12px;
    background: #eff6ff;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
}

.product-modal-info-text {
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* Product Modal - Empty State */
.product-modal-empty-state {
    text-align: center;
    padding: 40px;
    color: #a0aec0;
}

.product-modal-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

#productModal .btn-cancel {
    background: #e2e8f0 !important;
    color: #4a5568 !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

#productModal .btn-cancel:hover {
    background: #cbd5e0 !important;
    transform: translateY(-1px) !important;
}

#productModal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
    transition: all 0.2s ease !important;
}

#productModal .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4) !important;
}

/* ============================================
   PRODUCT MODAL - DARK MODE
   ============================================ */

body.dark-mode #productModal .modal {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(26, 29, 41, 0.95) 100%) !important;
    border: 1px solid rgba(212, 165, 116, 0.25) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode #productModal .modal-header {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.3) 0%, rgba(184, 144, 95, 0.25) 100%) !important;
    border-bottom: 1px solid rgba(212, 165, 116, 0.2) !important;
}

body.dark-mode #productModal .modal-title {
    color: var(--text-primary) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode #productModal .modal-close {
    color: var(--text-primary) !important;
}

body.dark-mode #productModal .modal-close:hover {
    color: var(--accent-gold) !important;
}

body.dark-mode #productModal .modal-body {
    background: var(--bg-primary) !important;
}

/* Error Container - Dark Mode */
body.dark-mode .product-modal-error-container {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

body.dark-mode .product-modal-error-icon {
    color: #fca5a5 !important;
}

body.dark-mode .product-modal-error-title,
body.dark-mode .product-modal-error-list {
    color: #fca5a5 !important;
}

body.dark-mode .product-modal-error-close {
    color: #fca5a5 !important;
}

/* Depot Container - Dark Mode */
body.dark-mode .product-modal-depot-container {
    background: rgba(45, 55, 72, 0.4) !important;
    border-color: rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .product-modal-depot-card {
    background: rgba(30, 35, 48, 0.6) !important;
    border-color: rgba(212, 165, 116, 0.2) !important;
}

body.dark-mode .product-modal-depot-icon {
    color: var(--accent-gold) !important;
}

body.dark-mode .product-modal-depot-name {
    color: var(--text-primary) !important;
}

body.dark-mode .product-modal-depot-badge {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #fcd34d !important;
}

/* Hint Text - Dark Mode */
body.dark-mode .product-modal-hint {
    color: var(--text-secondary) !important;
}

/* Checkbox Text - Dark Mode */
body.dark-mode .product-modal-checkbox-text {
    color: var(--text-primary) !important;
}

/* Info Box - Dark Mode */
body.dark-mode .product-modal-info-box {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

body.dark-mode .product-modal-info-text {
    color: #93c5fd !important;
}

/* Empty State - Dark Mode */
body.dark-mode .product-modal-empty-state {
    color: var(--text-secondary) !important;
}

body.dark-mode .product-modal-empty-icon {
    color: var(--text-secondary) !important;
}

/* Type Selector Container - Dark Mode */
body.dark-mode .product-type-selector-container {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.25) 0%, rgba(184, 144, 95, 0.2) 100%) !important;
    border: 1px solid rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .product-type-label {
    color: var(--text-primary) !important;
}

body.dark-mode .product-type-label i {
    color: var(--accent-gold) !important;
}

/* Type Card - Dark Mode */
body.dark-mode .type-card {
    background: rgba(30, 35, 48, 0.4) !important;
    border: 2px solid rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .type-card:hover {
    background: rgba(212, 165, 116, 0.15) !important;
    border-color: rgba(212, 165, 116, 0.5) !important;
    box-shadow: 0 8px 20px rgba(212, 165, 116, 0.2) !important;
}

body.dark-mode .type-card i {
    color: var(--accent-gold) !important;
}

body.dark-mode .type-card span {
    color: var(--text-primary) !important;
}

body.dark-mode .type-card small {
    color: var(--text-secondary) !important;
}

body.dark-mode .type-selector input[type="radio"]:checked + .type-card {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.3) 0%, rgba(184, 144, 95, 0.25) 100%) !important;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 8px 24px rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .type-selector input[type="radio"]:checked + .type-card i,
body.dark-mode .type-selector input[type="radio"]:checked + .type-card span {
    color: var(--accent-gold) !important;
}

body.dark-mode .type-selector input[type="radio"]:checked + .type-card small {
    color: rgba(212, 165, 116, 0.9) !important;
}

/* Section Headers - Dark Mode */
body.dark-mode .product-section-header {
    color: var(--text-primary) !important;
    border-bottom-color: rgba(212, 165, 116, 0.2) !important;
}

body.dark-mode .product-section-header i {
    color: var(--accent-gold) !important;
}

body.dark-mode .product-section-mobiliario {
    color: var(--accent-gold) !important;
    border-bottom-color: rgba(212, 165, 116, 0.4) !important;
}

body.dark-mode .product-section-mobiliario i {
    color: var(--accent-gold) !important;
}

body.dark-mode .product-section-bebida {
    color: #fca5a5 !important;
    border-bottom-color: rgba(239, 68, 68, 0.4) !important;
}

body.dark-mode .product-section-bebida i {
    color: #fca5a5 !important;
}

body.dark-mode .product-section-inventory {
    color: #fbbf24 !important;
    border-bottom-color: rgba(251, 191, 36, 0.4) !important;
}

body.dark-mode .product-section-inventory i {
    color: #fbbf24 !important;
}

/* Form Controls - Dark Mode */
body.dark-mode #productModal .form-group label {
    color: var(--text-primary) !important;
}

body.dark-mode #productModal .form-control,
body.dark-mode #productModal .form-select {
    background: rgba(30, 35, 48, 0.6) !important;
    border-color: rgba(212, 165, 116, 0.2) !important;
    color: var(--text-primary) !important;
}

body.dark-mode #productModal .form-control:focus,
body.dark-mode #productModal .form-select:focus {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15) !important;
    background: rgba(30, 35, 48, 0.8) !important;
}

body.dark-mode #productModal .form-control::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.6 !important;
}

/* File Upload - Dark Mode */
body.dark-mode #productModal .file-upload-label {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.8) 0%, rgba(20, 25, 38, 0.6) 100%) !important;
    border-color: rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode #productModal .file-upload-label:hover {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(184, 144, 95, 0.1) 100%) !important;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.25) !important;
}

body.dark-mode #productModal .file-icon {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.9) 0%, rgba(184, 144, 95, 0.85) 100%) !important;
    color: #1a1d29 !important;
    box-shadow: 0 8px 16px rgba(212, 165, 116, 0.4) !important;
}

body.dark-mode #productModal .file-info h4 {
    color: var(--text-primary) !important;
}

body.dark-mode #productModal .file-info p {
    color: var(--text-secondary) !important;
}

/* Depositos Container - Dark Mode */
body.dark-mode #productModal #depositosContainer {
    background: rgba(30, 35, 48, 0.4) !important;
    border-color: rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode #productModal .bg-white {
    background: rgba(30, 35, 48, 0.6) !important;
    border-color: rgba(212, 165, 116, 0.2) !important;
}

body.dark-mode #productModal .bg-white:hover {
    background: rgba(212, 165, 116, 0.1) !important;
    border-color: var(--accent-gold) !important;
}

body.dark-mode #productModal .bg-white strong {
    color: var(--text-primary) !important;
}

body.dark-mode #productModal .bg-white label {
    color: var(--text-secondary) !important;
}

/* Modal Footer - Dark Mode */
body.dark-mode #productModal .modal-footer {
    background: rgba(30, 35, 48, 0.6) !important;
    border-top-color: rgba(212, 165, 116, 0.2) !important;
}

body.dark-mode #productModal .btn-cancel {
    background: rgba(212, 165, 116, 0.1) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode #productModal .btn-cancel:hover {
    background: rgba(212, 165, 116, 0.2) !important;
    border-color: var(--accent-gold) !important;
    color: var(--accent-gold) !important;
}

body.dark-mode #productModal .btn-primary {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.9) 0%, rgba(184, 144, 95, 0.85) 100%) !important;
    color: #1a1d29 !important;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode #productModal .btn-primary:hover {
    box-shadow: 0 6px 16px rgba(212, 165, 116, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* Info Boxes - Dark Mode */
body.dark-mode #productModal .bg-neutral-100,
body.dark-mode #productModal .bg-blue-50 {
    background: rgba(212, 165, 116, 0.1) !important;
    border-color: rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode #productModal .text-blue-800 {
    color: var(--accent-gold) !important;
}

body.dark-mode #productModal .text-purple-600 {
    color: var(--accent-gold) !important;
}

body.dark-mode #productModal .text-amber-500 {
    color: var(--accent-gold) !important;
}

body.dark-mode #productModal .text-gray-400 {
    color: var(--text-secondary) !important;
}

/* Image Preview - Dark Mode */
body.dark-mode #productModal #imagePreview {
    background: rgba(30, 35, 48, 0.4) !important;
    border-radius: 12px !important;
    padding: 16px !important;
}

/* Checkbox - Dark Mode */
body.dark-mode #productModal input[type="checkbox"] {
    accent-color: var(--accent-gold) !important;
}

body.dark-mode #productModal input[type="checkbox"]:checked {
    background-color: var(--accent-gold) !important;
}

/* Badge Styles - Dark Mode */
body.dark-mode #productModal .bg-amber-100 {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.4) !important;
}

/* Grid Layouts - Product Modal */
#productModal .grid {
    display: grid !important;
    gap: 20px !important;
}

#productModal .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

/* Required Field Indicator */
#productModal .text-red-alt {
    color: #ef4444 !important;
}

body.dark-mode #productModal .text-red-alt {
    color: #f87171 !important;
}

/* Small Text Helpers */
#productModal small {
    color: #718096 !important;
    font-size: 12px !important;
}

body.dark-mode #productModal small {
    color: var(--text-secondary) !important;
}

/* Checkbox Label */
#productModal label[for="apilable"] {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    padding: 12px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

#productModal label[for="apilable"]:hover {
    background: #f7fafc !important;
}

#productModal label[for="apilable"] span {
    color: #4a5568 !important;
    font-weight: 500 !important;
    margin-left: 8px !important;
}

#productModal label[for="apilable"] span i {
    margin-right: 6px !important;
    color: #667eea !important;
}

body.dark-mode #productModal label[for="apilable"]:hover {
    background: rgba(212, 165, 116, 0.1) !important;
}

body.dark-mode #productModal label[for="apilable"] span {
    color: var(--text-primary) !important;
}

body.dark-mode #productModal label[for="apilable"] span i {
    color: var(--accent-gold) !important;
}

/* Image Preview Container */
#productModal #imagePreview {
    margin-top: 12px !important;
    text-align: center !important;
}

#productModal #imagePreview img {
    max-width: 100% !important;
    max-height: 300px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

body.dark-mode #productModal #imagePreview img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(212, 165, 116, 0.2) !important;
}

/* Warehouse Icon in Depositos */
#productModal .fa-warehouse {
    color: #667eea !important;
}

body.dark-mode #productModal .fa-warehouse {
    color: var(--accent-gold) !important;
}

/* Empty State in Depositos */
#productModal .fa-warehouse[style*="opacity"] {
    color: #a0aec0 !important;
}

body.dark-mode #productModal .fa-warehouse[style*="opacity"] {
    color: var(--text-secondary) !important;
}

/* Link in Empty State */
#productModal a.text-purple-600 {
    color: #667eea !important;
    text-decoration: underline !important;
    transition: color 0.2s ease !important;
}

#productModal a.text-purple-600:hover {
    color: #764ba2 !important;
}

body.dark-mode #productModal a.text-purple-600 {
    color: var(--accent-gold) !important;
}

body.dark-mode #productModal a.text-purple-600:hover {
    color: #e8c9a0 !important;
}

/* Mobile Optimization for Product Modal */
@media (max-width: 768px) {
    #productModal .modal {
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
    }
    
    #productModal .modal-header {
        border-radius: 0 !important;
    }
    
    #productModal .modal-footer {
        border-radius: 0 !important;
        flex-direction: column !important;
    }
    
    #productModal .modal-footer button {
        width: 100% !important;
    }
    
    #productModal .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    
    .product-type-selector-grid {
        flex-direction: column !important;
    }
    
    #productModal .product-section-header {
        font-size: 14px !important;
    }
    
    /* Prevenir scroll del body cuando el modal está abierto */
    body:has(#productModal.modal-overlay.active) {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* ============================================
   EVENTS VIEWS - MOBILE RESPONSIVE
   ============================================ */

/* Desktop: Ocultar cards, mostrar tabla */
.events-cards-mobile {
    display: none;
}

.events-table-wrapper {
    display: block;
}

/* Events Index - Mobile */
@media (max-width: 768px) {
    /* Events Dashboard Grid - Stack columns */
    /* Top Bar Mobile - Events */
    .top-bar {
        flex-direction: column;
        gap: 12px;
        padding: 16px 12px;
        margin: 0 -12px 16px -12px;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .top-bar .welcome h1 {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .top-bar .welcome p {
        font-size: 12px;
        color: var(--text-secondary);
    }
    
    .top-bar .top-actions {
        display: flex;
        gap: 8px;
        align-items: center;
        width: 100%;
        justify-content: flex-end;
    }
    
    .top-bar .icon-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .top-bar .create-btn-desktop {
        display: none !important;
    }
    
    .events-dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 0 12px;
    }
    
    /* Metrics Dashboard - Horizontal scroll or stack */
    .metrics-dashboard-vertical {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 0 8px 0;
        margin: 0 0 16px 0;
    }
    
    .metrics-dashboard-vertical::-webkit-scrollbar {
        height: 4px;
    }
    
    .metrics-dashboard-vertical::-webkit-scrollbar-thumb {
        background: rgba(212, 165, 116, 0.3);
        border-radius: 2px;
    }
    
    .metric-card {
        min-width: 140px;
        padding: 12px;
    }
    
    .metric-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .metric-value {
        font-size: 20px;
    }
    
    .metric-label {
        font-size: 11px;
    }
    
    /* Calendar Card - Mobile */
    .calendar-card-container {
        margin: 0 0 16px 0;
        border-radius: 12px;
    }
    
    .calendar-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .calendar-title {
        font-size: 14px;
        order: 2;
        width: 100%;
        text-align: center;
        margin: 8px 0;
    }
    
    .calendar-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    .calendar-today-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .calendar-grid {
        padding: 12px;
    }
    
    .calendar-weekday {
        font-size: 10px;
        padding: 8px 4px;
    }
    
    .calendar-day {
        min-height: 50px;
        padding: 4px;
        font-size: 10px;
    }
    
    .day-number {
        font-size: 9px;
    }
    
    .today-label {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .event-names {
        max-height: 20px;
    }
    
    .event-name {
        font-size: 6px;
        padding: 1px 2px;
    }
    
    /* Upcoming Events Card - Mobile */
    .upcoming-events-card {
        margin: 0 0 16px 0;
        border-radius: 12px;
    }
    
    .card-header-upcoming {
        padding: 12px 16px;
    }
    
    .card-header-upcoming h3 {
        font-size: 14px;
    }
    
    .upcoming-events-list {
        padding: 12px;
        max-height: 300px;
    }
    
    .upcoming-event-item {
        padding: 10px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .upcoming-event-date {
        width: 45px;
        height: 45px;
    }
    
    .upcoming-date-day {
        font-size: 16px;
    }
    
    .upcoming-date-month {
        font-size: 9px;
    }
    
    .upcoming-event-name {
        font-size: 12px;
    }
    
    .upcoming-event-info {
        font-size: 10px;
    }
    
    .upcoming-event-badge {
        font-size: 9px;
        padding: 3px 8px;
    }
    
    /* Events Table - Show on mobile with scroll */
    .events-table-wrapper {
        display: block !important;
    }
    
    .events-cards-mobile {
        display: none !important;
    }
    
    .event-budget-badge {
        display: none !important;
    }
    
    /* Card wrapper - mantener márgenes laterales (ONLY for events page) */
    .card.calendar-card-container {
        margin: 0 0 16px 0;
        border-radius: 12px;
    }
    
    .card.upcoming-events-card {
        margin: 0 0 16px 0;
        border-radius: 12px;
    }
    
    .card.calendar-card-container:last-child,
    .card.upcoming-events-card:last-child {
        margin-bottom: 0;
    }
    
    /* Event Cards Mobile */
    .event-card-mobile {
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        margin: 0 12px 16px 12px;
        overflow: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .event-card-mobile:last-child {
        margin-bottom: 0;
    }
    
    .event-card-mobile:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }
    
    .event-card-header {
        padding: 16px;
        border-bottom: 1px solid #e2e8f0;
        background: linear-gradient(135deg, #f7fafc 0%, #fff 100%);
    }
    
    .event-card-title {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 8px;
    }
    
    .event-card-title h3 {
        font-size: 16px;
        font-weight: 700;
        color: #2d3748;
        margin: 0;
        flex: 1;
        line-height: 1.4;
    }
    
    .event-budget-badge-mobile {
        background: rgba(139, 92, 246, 0.1);
        color: #8b5cf6;
        padding: 4px 10px;
        border-radius: 6px;
        font-size: 10px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin-top: 8px;
    }
    
    .event-card-body {
        padding: 16px;
    }
    
    .event-card-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 10px 0;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .event-card-row:last-child {
        border-bottom: none;
    }
    
    .event-card-label {
        font-size: 12px;
        font-weight: 600;
        color: #64748b;
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 100px;
    }
    
    .event-card-label i {
        font-size: 11px;
        color: #8b5cf6;
        width: 14px;
    }
    
    .event-card-value {
        font-size: 13px;
        color: #2d3748;
        text-align: right;
        flex: 1;
        font-weight: 500;
    }
    
    .event-card-value small {
        display: block;
        font-size: 11px;
        color: #64748b;
        margin-top: 2px;
    }
    
    .event-card-value .text-muted {
        color: #94a3b8;
        font-style: italic;
    }
    
    .event-card-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px 16px;
        background: #f9fafb;
        border-top: 1px solid #e2e8f0;
    }
    
    /* Ajustar botones cuando hay presupuesto */
    .event-card-actions .btn-action-mobile:nth-child(3) {
        grid-column: 1 / -1;
    }
    
    .event-card-actions .btn-action-delete-event {
        grid-column: 1 / -1;
        margin-top: 4px;
    }
    
    .btn-action-mobile {
        padding: 10px 12px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        border: none;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        text-decoration: none;
    }
    
    .btn-action-balance {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
    }
    
    .btn-action-balance:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
    }
    
    .btn-action-bars {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
    }
    
    .btn-action-bars:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
    }
    
    .btn-action-budget {
        background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
        color: white;
        box-shadow: 0 2px 6px rgba(139, 92, 246, 0.25);
    }
    
    .btn-action-budget:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(139, 92, 246, 0.35);
    }
    
    .btn-action-edit-event {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: white;
        box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
    }
    
    .btn-action-edit-event:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(59, 130, 246, 0.35);
    }
    
    .btn-action-delete-event {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
        grid-column: 1 / -1;
    }
    
    .btn-action-delete-event:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
    }
    
    .btn-action-mobile i {
        font-size: 11px;
    }
    
    /* Dark Mode - Event Cards Mobile */
    body.dark-mode .event-card-mobile {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
        border: 1px solid rgba(212, 165, 116, 0.25);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    body.dark-mode .event-card-mobile:hover {
        border-color: rgba(212, 165, 116, 0.4);
        box-shadow: 0 6px 16px rgba(212, 165, 116, 0.2);
    }
    
    body.dark-mode .event-card-header {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(26, 29, 41, 0.95) 100%);
        border-bottom-color: rgba(212, 165, 116, 0.2);
    }
    
    body.dark-mode .event-card-title h3 {
        color: var(--text-primary);
    }
    
    body.dark-mode .event-card-body {
        background: transparent;
    }
    
    body.dark-mode .event-card-row {
        border-bottom-color: rgba(212, 165, 116, 0.1);
    }
    
    body.dark-mode .event-card-label {
        color: var(--text-secondary);
    }
    
    body.dark-mode .event-card-label i {
        color: var(--accent-gold);
    }
    
    body.dark-mode .event-card-value {
        color: var(--text-primary);
    }
    
    body.dark-mode .event-card-value small {
        color: var(--text-secondary);
    }
    
    body.dark-mode .event-card-value .text-muted {
        color: var(--text-secondary);
    }
    
    body.dark-mode .event-card-actions {
        background: rgba(212, 165, 116, 0.05);
        border-top-color: rgba(212, 165, 116, 0.2);
    }
    
    /* Event Modal - Full Screen Mobile */
    #eventModal.modal-overlay {
        padding: 0 !important;
        align-items: stretch !important;
        background: var(--bg-primary) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9999 !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        animation: none !important;
    }
    
    #eventModal.modal-overlay.active {
        display: flex !important;
        align-items: stretch !important;
        justify-content: stretch !important;
    }
    
    #eventModal .modal {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        min-height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        box-shadow: none !important;
        border: none !important;
        transform: none !important;
        animation: none !important;
        position: relative !important;
    }
    
    #eventModal .modal-header {
        border-radius: 0 !important;
        padding: 16px !important;
        flex-shrink: 0 !important;
        border-bottom: 1px solid var(--border-color) !important;
        margin: 0 !important;
        box-shadow: none !important;
    }
    
    #eventModal .modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 16px !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 !important;
    }
    
    #eventModal .modal-footer {
        border-radius: 0 !important;
        padding: 16px !important;
        flex-shrink: 0 !important;
        border-top: 1px solid var(--border-color) !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin: 0 !important;
        box-shadow: none !important;
    }
    
    #eventModal .modal-footer button {
        width: 100% !important;
        padding: 14px !important;
        font-size: 15px !important;
    }
    
    /* Form rows en mobile */
    #eventModal .form-row {
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    #eventModal .form-group {
        width: 100% !important;
    }
    
    /* Dark Mode - Event Modal */
    body.dark-mode #eventModal.modal-overlay {
        background: var(--bg-primary) !important;
        backdrop-filter: none !important;
    }
    
    body.dark-mode #eventModal .modal {
        background: var(--bg-primary) !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    body.dark-mode #eventModal .modal-header {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(184, 144, 95, 0.1) 100%) !important;
        border-bottom-color: rgba(212, 165, 116, 0.2) !important;
    }
    
    body.dark-mode #eventModal .modal-body {
        background: var(--bg-primary) !important;
    }
    
    body.dark-mode #eventModal .modal-footer {
        background: rgba(212, 165, 116, 0.05) !important;
        border-top-color: rgba(212, 165, 116, 0.2) !important;
    }
    
    /* FAB Events Mobile */
    .fab-events {
        display: flex !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
        border-radius: 50% !important;
        background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
        box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5) !important;
        z-index: 999 !important;
        border: none !important;
        color: white !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 24px !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    body.dark-mode .fab-events {
        background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%) !important;
        box-shadow: 0 4px 16px rgba(212, 165, 116, 0.6) !important;
    }
    
    .fab-events:hover {
        transform: scale(1.1) !important;
        box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6) !important;
    }
    
    body.dark-mode .fab-events:hover {
        box-shadow: 0 6px 20px rgba(212, 165, 116, 0.8) !important;
    }
    
    /* Prevenir scroll del body cuando el modal está abierto */
    body:has(#eventModal.modal-overlay.active) {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    body.dark-mode .event-budget-badge-mobile {
        background: rgba(212, 165, 116, 0.1);
        color: var(--accent-gold);
        border: 1px solid rgba(212, 165, 116, 0.3);
    }
    
    /* Dark Mode - Metrics Mobile */
    body.dark-mode .metric-card {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%) !important;
        border: 1px solid rgba(212, 165, 116, 0.25) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }
    
    body.dark-mode .metric-card:hover {
        border-color: rgba(212, 165, 116, 0.4) !important;
        box-shadow: 0 6px 16px rgba(212, 165, 116, 0.2) !important;
    }
    
    body.dark-mode .metric-icon {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.2) 0%, rgba(184, 144, 95, 0.15) 100%) !important;
        border: 1px solid rgba(212, 165, 116, 0.3) !important;
    }
    
    body.dark-mode .metric-icon i {
        color: var(--accent-gold) !important;
    }
    
    body.dark-mode .metric-value {
        color: var(--text-primary) !important;
    }
    
    body.dark-mode .metric-label {
        color: var(--text-secondary) !important;
    }
    
    /* Dark Mode - Calendar Card Mobile */
    body.dark-mode .calendar-card-container {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%) !important;
        border: 1px solid rgba(212, 165, 116, 0.25) !important;
    }
    
    body.dark-mode .calendar-header {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(26, 29, 41, 0.95) 100%) !important;
        border-bottom-color: rgba(212, 165, 116, 0.2) !important;
    }
    
    body.dark-mode .calendar-title {
        color: var(--text-primary) !important;
    }
    
    body.dark-mode .calendar-title i.fa-calendar-alt {
        color: var(--accent-gold) !important;
    }
    
    body.dark-mode .calendar-nav-btn {
        background: rgba(212, 165, 116, 0.1) !important;
        border-color: rgba(212, 165, 116, 0.3) !important;
        color: var(--accent-gold) !important;
    }
    
    body.dark-mode .calendar-nav-btn:hover {
        background: rgba(212, 165, 116, 0.2) !important;
        border-color: var(--accent-gold) !important;
    }
    
    body.dark-mode .calendar-today-btn {
        background: rgba(212, 165, 116, 0.15) !important;
        border-color: rgba(212, 165, 116, 0.3) !important;
        color: var(--accent-gold) !important;
    }
    
    body.dark-mode .calendar-today-btn:hover {
        background: rgba(212, 165, 116, 0.25) !important;
        border-color: var(--accent-gold) !important;
    }
    
    body.dark-mode .calendar-weekday {
        color: var(--text-secondary) !important;
    }
    
    body.dark-mode .calendar-day {
        background: rgba(30, 35, 48, 0.5) !important;
        border-color: rgba(212, 165, 116, 0.1) !important;
    }
    
    body.dark-mode .calendar-day:hover {
        background: rgba(212, 165, 116, 0.1) !important;
        border-color: rgba(212, 165, 116, 0.3) !important;
    }
    
    body.dark-mode .calendar-day.has-events {
        background: rgba(212, 165, 116, 0.15) !important;
        border-color: rgba(212, 165, 116, 0.3) !important;
    }
    
    body.dark-mode .calendar-day.today {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.25) 0%, rgba(184, 144, 95, 0.2) 100%) !important;
        border-color: var(--accent-gold) !important;
    }
    
    body.dark-mode .calendar-day.today .day-number {
        color: var(--accent-gold) !important;
        font-weight: 700 !important;
    }
    
    body.dark-mode .calendar-day .day-number {
        color: var(--text-primary) !important;
    }
    
    body.dark-mode .calendar-day .event-names {
        color: var(--text-primary) !important;
    }
    
    body.dark-mode .calendar-day.today .event-names {
        color: var(--text-primary) !important;
    }
    
    /* Dark Mode - Upcoming Events Card Mobile */
    body.dark-mode .upcoming-events-card {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
        border: 1px solid rgba(212, 165, 116, 0.3);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1);
    }
    
    body.dark-mode .card-header-upcoming {
        background: linear-gradient(135deg, rgba(35, 40, 55, 0.8) 0%, rgba(26, 29, 41, 0.8) 100%);
        border-bottom: 2px solid rgba(212, 165, 116, 0.25);
    }
    
    body.dark-mode .card-header-upcoming h3 {
        color: var(--text-primary);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
    
    body.dark-mode .card-header-upcoming i {
        color: var(--accent-gold);
        filter: drop-shadow(0 0 8px rgba(212, 165, 116, 0.5));
    }
    
    body.dark-mode .upcoming-event-item {
        background: linear-gradient(135deg, rgba(35, 40, 55, 0.6) 0%, rgba(30, 35, 48, 0.6) 100%);
        border: 1px solid rgba(212, 165, 116, 0.2);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
    }
    
    body.dark-mode .upcoming-event-item:hover {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(212, 165, 116, 0.08) 100%);
        border-color: var(--accent-gold);
        box-shadow: 0 4px 16px rgba(212, 165, 116, 0.25);
        transform: translateX(4px);
    }
    
    body.dark-mode .upcoming-event-date {
        background: linear-gradient(135deg, var(--accent-gold) 0%, #c9975e 100%);
        box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    }
    
    body.dark-mode .upcoming-date-day {
        color: #1a1d29;
        font-weight: 800;
    }
    
    body.dark-mode .upcoming-date-month {
        color: rgba(26, 29, 41, 0.9);
    }
    
    body.dark-mode .upcoming-event-name {
        color: var(--text-primary);
        font-weight: 700;
    }
    
    body.dark-mode .upcoming-event-time,
    body.dark-mode .upcoming-event-customer {
        color: var(--text-secondary);
    }
    
    body.dark-mode .upcoming-event-time i,
    body.dark-mode .upcoming-event-customer i {
        color: var(--accent-gold);
    }
    
    body.dark-mode .upcoming-event-badge.estado-confirmado {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
        color: #34d399;
        border: 1px solid rgba(16, 185, 129, 0.3);
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
    }
    
    body.dark-mode .upcoming-event-badge.estado-pendiente {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
        color: #fbbf24;
        border: 1px solid rgba(245, 158, 11, 0.3);
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
    }
    
    body.dark-mode .upcoming-event-badge.estado-cancelado {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
        color: #f87171;
        border: 1px solid rgba(239, 68, 68, 0.3);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
    }
    
    body.dark-mode .no-upcoming-events {
        color: var(--text-secondary);
    }
    
    body.dark-mode .no-upcoming-events i {
        color: rgba(212, 165, 116, 0.3);
    }
    
    /* Dark Mode - Top Bar Mobile */
    body.dark-mode .top-bar {
        border-bottom-color: rgba(212, 165, 116, 0.2) !important;
    }
    
    body.dark-mode .top-bar .welcome h1 {
        color: var(--text-primary) !important;
    }
    
    body.dark-mode .top-bar .welcome p {
        color: var(--text-secondary) !important;
    }
    
    body.dark-mode .top-bar .icon-btn {
        border-color: rgba(212, 165, 116, 0.3) !important;
        color: var(--accent-gold) !important;
    }
    
    body.dark-mode .top-bar .icon-btn:hover {
        border-color: var(--accent-gold) !important;
    }
    
    /* Dark Mode - Success Message Mobile */
    body.dark-mode .success-message {
        background: rgba(16, 185, 129, 0.15) !important;
        border-color: rgba(16, 185, 129, 0.3) !important;
        color: #34d399 !important;
    }
    
    /* Dark Mode - Empty State Mobile */
    body.dark-mode .empty-state {
        color: var(--text-secondary) !important;
    }
    
    body.dark-mode .empty-state-icon {
        color: var(--text-secondary) !important;
    }
    
    body.dark-mode .empty-state-title {
        color: var(--text-primary) !important;
    }
    
    body.dark-mode .empty-state-description {
        color: var(--text-secondary) !important;
    }
    
    /* Dark Mode - Table Header Mobile */
    body.dark-mode .table-header {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(26, 29, 41, 0.95) 100%) !important;
        border-bottom-color: rgba(212, 165, 116, 0.2) !important;
    }
    
    body.dark-mode .table-title {
        color: var(--text-primary) !important;
    }
    
    body.dark-mode .table-subtitle {
        color: var(--text-secondary) !important;
    }
    
    /* Dark Mode - No Upcoming Events Mobile */
    body.dark-mode .no-upcoming-events {
        color: var(--text-secondary) !important;
    }
    
    body.dark-mode .no-upcoming-events i {
        color: var(--text-secondary) !important;
    }
    
    body.dark-mode .no-upcoming-events p {
        color: var(--text-secondary) !important;
    }
    
    body.dark-mode .btn-action-balance,
    body.dark-mode .btn-action-bars,
    body.dark-mode .btn-action-staff {
        background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
        color: #0f1419;
        box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
    }
    
    body.dark-mode .btn-action-balance:hover,
    body.dark-mode .btn-action-bars:hover,
    body.dark-mode .btn-action-staff:hover {
        box-shadow: 0 4px 12px rgba(212, 165, 116, 0.5);
    }
    
    body.dark-mode .btn-action-budget {
        background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
        color: #0f1419;
        box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
    }
    
    body.dark-mode .btn-action-budget:hover {
        box-shadow: 0 4px 12px rgba(212, 165, 116, 0.5);
    }
    
    body.dark-mode .btn-action-edit-event {
        background: rgba(212, 165, 116, 0.15);
        color: var(--accent-gold);
        border: 1px solid rgba(212, 165, 116, 0.3);
        box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
    }
    
    body.dark-mode .btn-action-edit-event:hover {
        background: rgba(212, 165, 116, 0.25);
        border-color: var(--accent-gold);
        box-shadow: 0 4px 12px rgba(212, 165, 116, 0.5);
    }
    
    body.dark-mode .btn-action-delete-event {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
        color: white !important;
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
    }
    
    body.dark-mode .btn-action-delete-event:hover {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5) !important;
    }
    
    /* Dark Mode - Event Customer Link Mobile */
    body.dark-mode .event-card-value .event-customer-link {
        color: var(--accent-gold) !important;
        text-decoration: none !important;
        font-weight: 600 !important;
    }
    
    body.dark-mode .event-card-value .event-customer-link:hover {
        color: #e8c9a0 !important;
        text-decoration: underline !important;
    }
    
    /* Dark Mode - Status Badges Mobile */
    body.dark-mode .status-badge {
        background: rgba(212, 165, 116, 0.15) !important;
        color: var(--accent-gold) !important;
        border: 1px solid rgba(212, 165, 116, 0.3) !important;
    }
    
    body.dark-mode .status-badge.pendiente {
        background: rgba(251, 191, 36, 0.15) !important;
        color: #fbbf24 !important;
        border-color: rgba(251, 191, 36, 0.3) !important;
    }
    
    body.dark-mode .status-badge.confirmado {
        background: rgba(16, 185, 129, 0.15) !important;
        color: #34d399 !important;
        border-color: rgba(16, 185, 129, 0.3) !important;
    }
    
    body.dark-mode .status-badge.en_curso {
        background: rgba(59, 130, 246, 0.15) !important;
        color: #60a5fa !important;
        border-color: rgba(59, 130, 246, 0.3) !important;
    }
    
    body.dark-mode .status-badge.finalizado {
        background: rgba(16, 185, 129, 0.15) !important;
        color: #34d399 !important;
        border-color: rgba(16, 185, 129, 0.3) !important;
    }
    
    body.dark-mode .status-badge.cancelado {
        background: rgba(239, 68, 68, 0.15) !important;
        color: #f87171 !important;
        border-color: rgba(239, 68, 68, 0.3) !important;
    }
    
    /* Dark Mode - Scrollbar Mobile */
    body.dark-mode .upcoming-events-list::-webkit-scrollbar {
        width: 6px !important;
    }
    
    body.dark-mode .upcoming-events-list::-webkit-scrollbar-track {
        background: rgba(30, 35, 48, 0.5) !important;
    }
    
    body.dark-mode .upcoming-events-list::-webkit-scrollbar-thumb {
        background: rgba(212, 165, 116, 0.4) !important;
        border-radius: 3px !important;
    }
    
    body.dark-mode .upcoming-events-list::-webkit-scrollbar-thumb:hover {
        background: rgba(212, 165, 116, 0.6) !important;
    }
    
    body.dark-mode .metrics-dashboard-vertical::-webkit-scrollbar-thumb {
        background: rgba(212, 165, 116, 0.4) !important;
    }
    
    body.dark-mode .metrics-dashboard-vertical::-webkit-scrollbar-thumb:hover {
        background: rgba(212, 165, 116, 0.6) !important;
    }
    
    /* Dark Mode - Calendar Tooltip Mobile */
    body.dark-mode .calendar-tooltip {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(26, 29, 41, 0.95) 100%) !important;
        border: 1px solid rgba(212, 165, 116, 0.3) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    }
    
    body.dark-mode .calendar-tooltip-header {
        color: var(--text-primary) !important;
        border-bottom-color: rgba(212, 165, 116, 0.2) !important;
    }
    
    body.dark-mode .tooltip-event {
        border-bottom-color: rgba(212, 165, 116, 0.1) !important;
    }
    
    body.dark-mode .tooltip-event-time {
        color: var(--accent-gold) !important;
    }
    
    body.dark-mode .tooltip-event-name {
        color: var(--text-primary) !important;
    }
    
    body.dark-mode .tooltip-event-details {
        color: var(--text-secondary) !important;
    }
    
    body.dark-mode .tooltip-estado {
        color: var(--accent-gold) !important;
    }
    
    /* Dark Mode - Calendar Day Event Names Mobile */
    body.dark-mode .event-name {
        color: var(--text-primary) !important;
        background: rgba(212, 165, 116, 0.15) !important;
    }
    
    body.dark-mode .event-name i {
        color: var(--accent-gold) !important;
    }
    
    /* Dark Mode - Card Background Mobile (ONLY for events page) */
    body.dark-mode .card.calendar-card-container,
    body.dark-mode .card.upcoming-events-card {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%) !important;
        border: 1px solid rgba(212, 165, 116, 0.25) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Dark Mode - Better Contrast for Mobile Text */
    body.dark-mode .event-card-value {
        color: var(--text-primary) !important;
        font-weight: 500 !important;
    }
    
    body.dark-mode .event-card-label {
        color: rgba(203, 213, 225, 0.8) !important;
        font-weight: 600 !important;
    }
    
    /* Dark Mode - Metrics Dashboard Background Mobile */
    body.dark-mode .metrics-dashboard-vertical {
        background: transparent !important;
    }
    
    /* Dark Mode - Calendar Grid Background Mobile */
    body.dark-mode .calendar-grid {
        background: transparent !important;
    }
    
    /* Dark Mode - Upcoming Events List Background Mobile */
    body.dark-mode .upcoming-events-list {
        background: transparent !important;
    }
    
    /* Dark Mode - No Upcoming Events Icon Mobile */
    body.dark-mode .no-upcoming-events i {
        font-size: 48px !important;
        opacity: 0.5 !important;
    }
    
    /* Dark Mode - Better Spacing Mobile */
    body.dark-mode .event-card-mobile {
        margin-bottom: 16px !important;
    }
    
    body.dark-mode .metric-card {
        margin-bottom: 0 !important;
    }
    
    /* Dark Mode - Improved Visibility for Small Text Mobile */
    body.dark-mode .upcoming-event-info span {
        color: var(--text-secondary) !important;
    }
    
    body.dark-mode .upcoming-event-info i {
        color: var(--accent-gold) !important;
        opacity: 0.8 !important;
    }
    
    /* Dark Mode - Calendar Empty Days Mobile */
    body.dark-mode .calendar-day.empty {
        background: rgba(30, 35, 48, 0.3) !important;
        border-color: rgba(212, 165, 116, 0.05) !important;
    }
    
    /* Dark Mode - Today Label Mobile */
    body.dark-mode .today-label {
        background: var(--accent-gold) !important;
        color: #0f1419 !important;
        font-weight: 700 !important;
    }
    
    /* Dark Mode - Calendar Weekday Mobile */
    body.dark-mode .calendar-weekday {
        font-weight: 600 !important;
        color: rgba(203, 213, 225, 0.7) !important;
    }
    
    /* Dark Mode - Event Card Actions Better Visibility Mobile */
    body.dark-mode .event-card-actions .btn-action-mobile {
        font-weight: 600 !important;
        letter-spacing: 0.3px !important;
    }
    
    /* Dark Mode - Metric Content Mobile */
    body.dark-mode .metric-content {
        color: var(--text-primary) !important;
    }
    
    /* Dark Mode - Calendar Navigation Better Visibility Mobile */
    body.dark-mode .calendar-nav-btn i,
    body.dark-mode .calendar-today-btn i {
        color: var(--accent-gold) !important;
    }
    
    
    
    /* Dark Mode - Events Dashboard Grid Mobile */
    body.dark-mode .events-dashboard-grid {
        background: transparent !important;
    }
    
    /* Dark Mode - Card Header Upcoming Better Contrast Mobile */
    body.dark-mode .card-header-upcoming {
        padding: 14px 16px !important;
    }
    
    /* Dark Mode - Upcoming Event Details Mobile */
    body.dark-mode .upcoming-event-details {
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    /* Dark Mode - Event Card Title Badge Mobile */
    body.dark-mode .event-card-title .status-badge {
        font-size: 10px !important;
        padding: 4px 8px !important;
        white-space: nowrap !important;
    }
    
    /* Top Bar - Mobile */
    .top-bar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 16px;
    }
    
    .top-bar .welcome h1 {
        font-size: 20px;
    }
    
    .top-bar .welcome p {
        font-size: 13px;
    }
    
    .top-bar .top-actions {
        width: 100%;
        display: flex;
        gap: 8px;
        justify-content: flex-end;
    }
    
    .top-bar .create-btn-desktop {
        display: none;
    }
    
    .top-bar .icon-btn {
        width: 40px;
        height: 40px;
    }
    
    /* FAB for Events */
    .fab-events {
        position: fixed;
        bottom: 24px;
        right: 24px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
        color: white;
        border: none;
        box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        z-index: 1000;
        transition: all 0.3s ease;
    }
    
    .fab-events:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    }
    
    .fab-events:active {
        transform: scale(0.95);
    }
    
    body.dark-mode .fab-events {
        background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
        color: #0f1419;
        box-shadow: 0 4px 16px rgba(212, 165, 116, 0.4);
    }
    
    body.dark-mode .fab-events:hover {
        box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
    }
}

/* Desktop: Hide FAB */
@media (min-width: 769px) {
    .fab-events,
    .fab-bars-container {
        display: none !important;
    }
    
    .create-btn-desktop {
        display: inline-flex !important;
    }
}

/* Events Balance - Mobile */
@media (max-width: 768px) {
    /* Balance Top Bar */
    .events-balance-top-bar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .events-balance-top-bar .welcome h1 {
        font-size: 18px;
        line-height: 1.3;
    }
    
    .events-balance-top-bar .welcome p {
        font-size: 12px;
    }
    
    .events-balance-top-bar > div:last-child {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .events-balance-top-bar .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Stat Cards Grid - Stack */
    .grid.grid-auto-fit {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .stat-card-green,
    .stat-card-red,
    .stat-card-purple,
    .stat-card-orange,
    .stat-card-blue {
        padding: 14px;
        min-height: auto;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-icon-box {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    /* Charts Grid - Stack */
    .grid.grid-auto-fit {
        grid-template-columns: 1fr !important;
    }
    
    .chart-container {
        padding: 16px;
    }
    
    .chart-canvas-wrapper {
        height: 250px !important;
    }
    
    .card-title {
        font-size: 14px;
    }
    
    /* Summary Items */
    .summary-item {
        padding: 10px;
        font-size: 13px;
    }
    
    /* Balance Table - Mobile */
    .events-balance-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .events-balance-table .events-table {
        min-width: 800px;
        font-size: 11px;
    }
    
    .events-balance-table .events-table th {
        font-size: 9px;
        padding: 10px 6px;
    }
    
    .events-balance-table .events-table td {
        font-size: 11px;
        padding: 10px 6px;
    }
    
    /* Hide less important columns */
    .events-balance-table .events-table th:nth-child(2),
    .events-balance-table .events-table td:nth-child(2) {
        display: none !important; /* Tipo */
    }
    
    .events-balance-table .events-table th:nth-child(6),
    .events-balance-table .events-table td:nth-child(6) {
        display: none !important; /* Transacciones */
    }
    
    /* Income/Expense Tables - Mobile */
    .events-balance-table .events-table {
        min-width: 700px;
        font-size: 11px;
    }
    
    .events-balance-table .events-table th {
        font-size: 9px;
        padding: 10px 6px;
    }
    
    .events-balance-table .events-table td {
        font-size: 11px;
        padding: 10px 6px;
    }
    
    /* Hide less important columns */
    .events-balance-table .events-table th:nth-child(3),
    .events-balance-table .events-table td:nth-child(3) {
        display: none !important; /* Categoría */
    }
    
    .events-balance-table .events-table th:nth-child(6),
    .events-balance-table .events-table td:nth-child(6) {
        display: none !important; /* Comprobante/Estado */
    }
    
    /* Comments Section - Mobile */
    .events-comments-card {
        margin: 0 12px 16px 12px;
        border-radius: 12px;
    }
    
    .events-comments-card .card-header {
        padding: 12px 16px;
    }
    
    .events-comments-card .card-body {
        padding: 12px 16px;
    }
    
    .comment-item {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .comment-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .comment-form textarea {
        font-size: 14px;
    }
}

/* Events Bars - Mobile */
@media (max-width: 768px) {
    /* Bars Top Bar */
    .top-bar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 12px 16px;
    }
    
    .top-bar .welcome {
        width: 100%;
        padding-right: 12px;
        padding-left: 12px;
    }
    
    .top-bar .welcome h1 {
        font-size: 18px;
        line-height: 1.3;
        margin-bottom: 4px;
    }
    
    .top-bar .welcome p {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .top-bar > div:last-child {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .top-bar .create-btn-desktop {
        display: none !important;
    }
    
    .top-bar .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* FAB Container for Bars */
    .fab-bars-container {
        position: fixed;
        bottom: 24px;
        right: 24px;
        z-index: 1000;
    }
    
    .fab-main-button-bars {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
        color: white;
        border: none;
        box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .fab-main-button-bars:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    }
    
    .fab-main-button-bars.active {
        transform: rotate(45deg);
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    }
    
    .fab-main-button-bars i {
        transition: transform 0.3s ease;
    }
    
    body.dark-mode .fab-main-button-bars {
        background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
        color: #0f1419;
        box-shadow: 0 4px 16px rgba(212, 165, 116, 0.4);
    }
    
    body.dark-mode .fab-main-button-bars:hover {
        box-shadow: 0 6px 20px rgba(212, 165, 116, 0.5);
    }
    
    body.dark-mode .fab-main-button-bars.active {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
    }
    
    /* FAB Menu */
    .fab-menu-bars {
        position: absolute;
        bottom: 70px;
        right: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.3s ease;
        pointer-events: none;
    }
    
    .fab-menu-bars.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: all;
    }
    
    .fab-menu-item-bars {
        display: flex;
        align-items: center;
        gap: 12px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 12px 16px;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        min-width: 200px;
    }
    
    .fab-menu-item-bars:hover {
        transform: translateX(-4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .fab-menu-item-icon-bars {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
        color: white;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .fab-menu-item-icon-bars.product {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    }
    
    .fab-menu-item-text-bars {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    body.dark-mode .fab-menu-item-bars {
        background: rgba(30, 35, 48, 0.95);
        border-color: rgba(212, 165, 116, 0.2);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    body.dark-mode .fab-menu-item-bars:hover {
        background: rgba(40, 45, 60, 0.95);
        border-color: var(--accent-gold);
        box-shadow: 0 4px 12px rgba(212, 165, 116, 0.2);
    }
    
    body.dark-mode .fab-menu-item-icon-bars {
        background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a574 100%);
        color: #0f1419;
    }
    
    body.dark-mode .fab-menu-item-icon-bars.product {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
    }
    
    body.dark-mode .fab-menu-item-text-bars {
        color: var(--text-primary);
    }
    
    /* FAB Overlay */
    .fab-overlay-bars {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0);
        z-index: 999;
        transition: background 0.3s ease;
    }
    
    .fab-overlay-bars.active {
        display: block;
        background: rgba(0, 0, 0, 0.5);
    }
    
    body.dark-mode .fab-overlay-bars.active {
        background: rgba(0, 0, 0, 0.7);
    }
    
    /* Bar Card - Mobile */
    .card {
        margin: 0 12px 16px 12px;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .card .table-header {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .card .table-title {
        font-size: 15px;
    }
    
    .card .table-subtitle {
        font-size: 12px;
        line-height: 1.6;
        word-break: break-word;
        display: flex;
        flex-wrap: wrap;
        gap: 2px 6px;
        align-items: center;
    }
    
    .bar-subtitle-separator {
        display: none;
    }
    
    .card .table-subtitle > * {
        display: inline-block;
    }
    
    /* Break subtitle into lines on mobile */
    .card .table-subtitle::before {
        content: '';
    }
    
    .card .table-header > div:last-child {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .card .btn-secondary,
    .card .btn-add-product-bar,
    .card .btn-success,
    .card .btn-delete-icon {
        width: 100%;
        justify-content: center;
        font-size: 12px;
        padding: 10px 12px;
        white-space: nowrap;
    }
    
    /* Full width buttons for important actions */
    .card .btn-add-product-bar,
    .card .btn-success {
        grid-column: 1 / -1;
    }
    
    /* Icon-only buttons */
    .card .btn-delete-icon {
        min-width: 44px;
        padding: 10px;
    }
    
    /* Text for closed bars */
    .card .table-header > div:last-child > span {
        grid-column: 1 / -1;
        text-align: center;
        padding: 8px;
        font-size: 11px;
    }
    
    /* Bar Products Table - Mobile: Show table with scroll */
    .table-wrapper:has(+ .bar-products-mobile) {
        overflow-x: auto !important;
    }
    
    .table-wrapper:has(+ .bar-products-mobile) .events-table {
        display: table !important;
    }
    
    /* Product Cards for Mobile - Hidden */
    .bar-products-mobile {
        display: none !important;
    }
    
    .bar-product-card {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 14px;
        margin-bottom: 12px;
        transition: all 0.2s ease;
    }
    
    .bar-product-card:last-child {
        margin-bottom: 0;
    }
    
    .bar-product-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
        gap: 12px;
    }
    
    .bar-product-info {
        flex: 1;
        min-width: 0;
    }
    
    .bar-product-name {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 4px;
        word-break: break-word;
    }
    
    .bar-product-sku {
        font-size: 11px;
        color: var(--text-secondary);
        margin-bottom: 8px;
    }
    
    .bar-product-quantity {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(16, 185, 129, 0.1);
        color: #10b981;
        padding: 4px 10px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
    }
    
    body.dark-mode .bar-product-quantity {
        background: rgba(16, 185, 129, 0.2);
        color: #34d399;
    }
    
    .bar-product-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }
    
    .bar-product-detail-item {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .bar-product-detail-label {
        font-size: 10px;
        color: var(--text-secondary);
        text-transform: uppercase;
        font-weight: 600;
        letter-spacing: 0.5px;
    }
    
    .bar-product-detail-value {
        font-size: 13px;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .bar-product-detail-value.text-success {
        color: #10b981;
    }
    
    body.dark-mode .bar-product-detail-value.text-success {
        color: #34d399;
    }
    
    .bar-product-actions {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }
    
    .bar-product-actions .btn-action {
        flex: 1;
        min-width: 60px;
        padding: 8px 12px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: 1px solid transparent;
        transition: all 0.2s ease;
    }
    
    .bar-product-actions .btn-action i {
        font-size: 12px;
    }
    
    /* Dark Mode - Product Action Buttons */
    body.dark-mode .bar-product-actions .btn-action {
        background: rgba(30, 35, 48, 0.8);
        border: 1px solid rgba(212, 165, 116, 0.3);
        color: var(--accent-gold);
        transition: all 0.3s ease;
    }
    
    body.dark-mode .bar-product-actions .btn-action:hover {
        background: rgba(212, 165, 116, 0.2);
        border-color: var(--accent-gold);
        color: var(--accent-gold);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
    }
    
    body.dark-mode .bar-product-actions .btn-edit {
        background: rgba(16, 185, 129, 0.2);
        border-color: rgba(16, 185, 129, 0.4);
        color: #34d399;
    }
    
    body.dark-mode .bar-product-actions .btn-edit:hover {
        background: rgba(16, 185, 129, 0.35);
        border-color: #10b981;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    }
    
    body.dark-mode .bar-product-actions .btn-action[style*="background: #e9d5ff"] {
        background: rgba(139, 92, 246, 0.2) !important;
        border-color: rgba(139, 92, 246, 0.4) !important;
        color: #a78bfa !important;
    }
    
    body.dark-mode .bar-product-actions .btn-action[style*="background: #e9d5ff"]:hover {
        background: rgba(139, 92, 246, 0.35) !important;
        border-color: #8b5cf6 !important;
        color: #c4b5fd !important;
    }
    
    body.dark-mode .bar-product-actions .btn-return {
        background: rgba(59, 130, 246, 0.2);
        border-color: rgba(59, 130, 246, 0.4);
        color: #60a5fa;
    }
    
    body.dark-mode .bar-product-actions .btn-return:hover {
        background: rgba(59, 130, 246, 0.35);
        border-color: #3b82f6;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }
    
    body.dark-mode .bar-product-actions .btn-delete {
        background: rgba(239, 68, 68, 0.2);
        border-color: rgba(239, 68, 68, 0.4);
        color: #f87171;
    }
    
    body.dark-mode .bar-product-actions .btn-delete:hover {
        background: rgba(239, 68, 68, 0.35);
        border-color: #ef4444;
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }
    
    /* Dark Mode - Product Action Buttons */
    body.dark-mode .bar-product-actions .btn-action {
        background: rgba(30, 35, 48, 0.8) !important;
        border-color: rgba(212, 165, 116, 0.2) !important;
        color: var(--accent-gold) !important;
    }
    
    body.dark-mode .bar-product-actions .btn-action:hover {
        background: rgba(212, 165, 116, 0.15) !important;
        border-color: var(--accent-gold) !important;
        color: var(--accent-gold-light) !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
    }
    
    body.dark-mode .bar-product-actions .btn-action.btn-edit {
        background: rgba(16, 185, 129, 0.15) !important;
        border-color: rgba(16, 185, 129, 0.3) !important;
        color: #34d399 !important;
    }
    
    body.dark-mode .bar-product-actions .btn-action.btn-edit:hover {
        background: rgba(16, 185, 129, 0.25) !important;
        border-color: #34d399 !important;
        color: #6ee7b7 !important;
    }
    
    body.dark-mode .bar-product-actions .btn-action.btn-return {
        background: rgba(59, 130, 246, 0.15) !important;
        border-color: rgba(59, 130, 246, 0.3) !important;
        color: #60a5fa !important;
    }
    
    body.dark-mode .bar-product-actions .btn-action.btn-return:hover {
        background: rgba(59, 130, 246, 0.25) !important;
        border-color: #60a5fa !important;
        color: #93c5fd !important;
    }
    
    body.dark-mode .bar-product-actions .btn-action.btn-delete {
        background: rgba(239, 68, 68, 0.15) !important;
        border-color: rgba(239, 68, 68, 0.3) !important;
        color: #f87171 !important;
    }
    
    body.dark-mode .bar-product-actions .btn-action.btn-delete:hover {
        background: rgba(239, 68, 68, 0.25) !important;
        border-color: #f87171 !important;
        color: #fca5a5 !important;
    }
    
    /* Transfer button (purple) in dark mode */
    body.dark-mode .bar-product-actions .btn-action[style*="background: #e9d5ff"],
    body.dark-mode .bar-product-actions .btn-action[style*="color: #7c3aed"] {
        background: rgba(139, 92, 246, 0.15) !important;
        border-color: rgba(139, 92, 246, 0.3) !important;
        color: #a78bfa !important;
    }
    
    body.dark-mode .bar-product-actions .btn-action[style*="background: #e9d5ff"]:hover,
    body.dark-mode .bar-product-actions .btn-action[style*="color: #7c3aed"]:hover {
        background: rgba(139, 92, 246, 0.25) !important;
        border-color: #a78bfa !important;
        color: #c4b5fd !important;
    }
    
    /* Table Footer - Mobile */
    .table-footer-total {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        padding: 16px;
        background: rgba(212, 165, 116, 0.05);
        border-radius: 8px;
        margin-top: 16px;
    }
    
    .table-footer-total td {
        padding: 0 !important;
        border: none !important;
        text-align: left !important;
    }
    
    .table-footer-label {
        font-size: 12px;
        color: var(--text-secondary);
        margin-bottom: 4px;
    }
    
    .table-footer-amount {
        font-size: 20px;
        font-weight: 700;
        color: var(--accent-gold);
    }
    
    /* Table footer ya tiene estilos en la sección principal de dark mode */
    
    /* Hide desktop table on mobile, show mobile cards */
    .bar-products-table {
        display: block !important;
        overflow-x: auto;
    }
    
    .bar-products-mobile {
        display: none !important;
    }
    
    /* Empty State - Mobile */
    .empty-state {
        padding: 40px 20px;
        text-align: center;
    }
    
    .empty-state i {
        font-size: 48px;
        margin-bottom: 16px;
        opacity: 0.6;
    }
    
    .empty-state h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .empty-state p {
        font-size: 13px;
        margin-bottom: 20px;
        color: var(--text-secondary);
    }
    
    .create-btn-empty-state {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        padding: 12px 24px;
        font-size: 14px;
    }
    
    /* Modals - Mobile */
    .modal-overlay {
        padding: 10px;
    }
    
    .modal {
        width: 95% !important;
        max-width: 95% !important;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 12px;
    }
    
    .modal .modal-header {
        padding: 14px 16px;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .modal .modal-title {
        font-size: 16px;
    }
    
    .modal .modal-body {
        padding: 14px 16px;
        max-height: calc(90vh - 150px);
        overflow-y: auto;
    }
    
    .modal .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
        border-top: 1px solid #e2e8f0;
    }
    
    .modal .modal-footer button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    /* Search Results - Mobile */
    .bar-search-results {
        max-height: 200px;
    }
    
    .bar-search-result-item {
        padding: 10px;
        font-size: 12px;
    }
    
    /* Product Info Box - Mobile */
    .product-info-box {
        padding: 12px;
    }
    
    .product-info-header {
        flex-direction: column;
        gap: 8px;
    }
}

/* Desktop: Show table, hide mobile cards */
@media (min-width: 769px) {
    .bar-products-table {
        display: block !important;
    }
    
    .bar-products-mobile {
        display: none !important;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    /* Events Index */
    .metric-card {
        min-width: 120px;
        padding: 10px;
    }
    
    .metric-value {
        font-size: 18px;
    }
}

/* ============================================
   CRITICAL FIX: Profit Chart Dark Mode Desktop
   ============================================
   These styles MUST be at the end to override everything
*/
@media (min-width: 769px) {
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-layout {
        display: grid !important;
        grid-template-columns: 2fr 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        min-height: 400px !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .mt-3 {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        min-height: 400px !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        position: relative !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-wrapper {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        min-height: 400px !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%) !important;
        border: 1px solid rgba(212, 165, 116, 0.25) !important;
        padding: 24px !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-canvas {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        width: 100% !important;
        height: 350px !important;
        min-height: 350px !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-canvas canvas {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        background: transparent !important;
        position: relative !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-title {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: var(--text-primary) !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .chart-legend {
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-metrics-container {
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
    }
    
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-metric-card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Force all children to be visible */
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-container *,
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-wrapper *,
    body.dark-mode .card[data-card-id="margen-ganancia"] .profit-chart-canvas * {
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .calendar-day {
        min-height: 45px;
    }
    
    .upcoming-event-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .upcoming-event-date {
        width: 100%;
        height: auto;
        padding: 8px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    /* Events Balance */
    .stat-number {
        font-size: 20px;
    }
    
    .chart-canvas-wrapper {
        height: 200px !important;
    }
    
    /* Events Bars */
    .bar-card .table-header > div:last-child {
        flex-direction: column;
    }
    
    .bar-card .btn-secondary,
    .bar-card .create-btn {
        font-size: 12px;
        padding: 10px 12px;
    }
    
    /* ============================================
       DARK MODE - MOBILE OPTIMIZATIONS (EVENTS)
       ============================================ */
    
    /* Improved readability for event cards in dark mode */
    body.dark-mode .event-card-mobile {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(20, 25, 38, 0.96) 100%) !important;
        border: 1px solid rgba(212, 165, 116, 0.3) !important;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
    }
    
    body.dark-mode .event-card-mobile:active {
        transform: translateY(0) scale(0.98) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Better contrast for card headers */
    body.dark-mode .event-card-header {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.12) 0%, rgba(184, 144, 95, 0.08) 100%) !important;
        border-bottom: 1px solid rgba(212, 165, 116, 0.25) !important;
    }
    
    /* Enhanced title visibility */
    body.dark-mode .event-card-title h3 {
        color: #f1f5f9 !important;
        font-weight: 700 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Better budget badge visibility */
    body.dark-mode .event-budget-badge-mobile {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.2) 0%, rgba(184, 144, 95, 0.15) 100%) !important;
        color: #f3d5a6 !important;
        border: 1px solid rgba(212, 165, 116, 0.4) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Improved row separators */
    body.dark-mode .event-card-row {
        border-bottom: 1px solid rgba(212, 165, 116, 0.15) !important;
        padding: 12px 0 !important;
    }
    
    body.dark-mode .event-card-row:last-child {
        border-bottom: none !important;
    }
    
    /* Better label contrast */
    body.dark-mode .event-card-label {
        color: rgba(226, 232, 240, 0.9) !important;
        font-weight: 600 !important;
    }
    
    /* Enhanced value visibility */
    body.dark-mode .event-card-value {
        color: #f8fafc !important;
        font-weight: 500 !important;
    }
    
    body.dark-mode .event-card-value small {
        color: rgba(203, 213, 225, 0.8) !important;
    }
    
    /* Better action buttons in dark mode */
    body.dark-mode .event-card-actions {
        background: rgba(212, 165, 116, 0.08) !important;
        border-top: 1px solid rgba(212, 165, 116, 0.25) !important;
        padding: 14px 16px !important;
    }
    
    body.dark-mode .btn-action-mobile {
        font-weight: 600 !important;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    body.dark-mode .btn-action-mobile:active {
        transform: scale(0.96) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
    }
    
    /* Enhanced balance button */
    body.dark-mode .btn-action-balance {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        box-shadow: 0 3px 8px rgba(16, 185, 129, 0.4) !important;
    }
    
    /* Enhanced bars button */
    body.dark-mode .btn-action-bars {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        box-shadow: 0 3px 8px rgba(16, 185, 129, 0.4) !important;
    }
    
    /* Enhanced budget button */
    body.dark-mode .btn-action-budget {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.9) 0%, rgba(184, 144, 95, 0.85) 100%) !important;
        color: #1a1d29 !important;
        box-shadow: 0 3px 8px rgba(212, 165, 116, 0.4) !important;
        font-weight: 700 !important;
    }
    
    /* Enhanced edit button */
    body.dark-mode .btn-action-edit-event {
        background: rgba(212, 165, 116, 0.15) !important;
        color: var(--accent-gold) !important;
        border: 1px solid rgba(212, 165, 116, 0.3) !important;
        box-shadow: 0 3px 8px rgba(212, 165, 116, 0.4) !important;
    }
    
    /* Enhanced delete button */
    body.dark-mode .btn-action-delete-event {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
        box-shadow: 0 3px 8px rgba(239, 68, 68, 0.4) !important;
    }
    
    /* Better metrics cards in mobile dark mode */
    body.dark-mode .metric-card {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(20, 25, 38, 0.96) 100%) !important;
        border: 1px solid rgba(212, 165, 116, 0.3) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    }
    
    body.dark-mode .metric-card:active {
        transform: scale(0.98) !important;
    }
    
    /* Enhanced metric values */
    body.dark-mode .metric-value {
        color: #f8fafc !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }
    
    body.dark-mode .metric-label {
        color: rgba(226, 232, 240, 0.85) !important;
    }
    
    /* Better top bar in mobile dark mode */
    body.dark-mode .top-bar {
        border-bottom: 1px solid rgba(212, 165, 116, 0.25) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }
    
    body.dark-mode .top-bar .welcome h1 {
        color: #f8fafc !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }
    
    body.dark-mode .top-bar .welcome p {
        color: rgba(203, 213, 225, 0.85) !important;
    }
    
    /* Better icon buttons in dark mode */
    body.dark-mode .top-bar .icon-btn {
        border: 1px solid rgba(212, 165, 116, 0.3) !important;
        color: var(--accent-gold) !important;
    }
    
    body.dark-mode .top-bar .icon-btn:active {
        transform: scale(0.95) !important;
    }
    
    /* Enhanced FAB in dark mode */
    body.dark-mode .fab-events {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.95) 0%, rgba(184, 144, 95, 0.9) 100%) !important;
        color: #1a1d29 !important;
        border: 2px solid rgba(212, 165, 116, 0.5) !important;
        box-shadow: 0 8px 20px rgba(212, 165, 116, 0.4), 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    }
    
    body.dark-mode .fab-events:active {
        transform: scale(0.92) !important;
        box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    }
    
    /* Better calendar card in mobile dark mode */
    body.dark-mode .calendar-card-container {
        background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(20, 25, 38, 0.96) 100%) !important;
        border: 1px solid rgba(212, 165, 116, 0.3) !important;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
    }
    
    /* Better status badges contrast */
    body.dark-mode .status-badge {
        font-weight: 600 !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    }
    
    body.dark-mode .status-badge.pendiente {
        background: rgba(251, 191, 36, 0.2) !important;
        color: #fcd34d !important;
        border: 1px solid rgba(251, 191, 36, 0.4) !important;
    }
    
    body.dark-mode .status-badge.confirmado {
        background: rgba(16, 185, 129, 0.2) !important;
        color: #6ee7b7 !important;
        border: 1px solid rgba(16, 185, 129, 0.4) !important;
    }
    
    body.dark-mode .status-badge.en_curso {
        background: rgba(59, 130, 246, 0.2) !important;
        color: #93c5fd !important;
        border: 1px solid rgba(59, 130, 246, 0.4) !important;
    }
    
    body.dark-mode .status-badge.finalizado {
        background: rgba(16, 185, 129, 0.2) !important;
        color: #6ee7b7 !important;
        border: 1px solid rgba(16, 185, 129, 0.4) !important;
    }
    
    body.dark-mode .status-badge.cancelado {
        background: rgba(239, 68, 68, 0.2) !important;
        color: #fca5a5 !important;
        border: 1px solid rgba(239, 68, 68, 0.4) !important;
    }
    
    /* Improve customer link visibility */
    body.dark-mode .event-card-value .event-customer-link {
        color: #f3d5a6 !important;
        font-weight: 700 !important;
        text-decoration: none !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    }
    
    body.dark-mode .event-card-value .event-customer-link:active {
        color: #e8c9a0 !important;
    }
    
    /* Better empty state in dark mode */
    body.dark-mode .empty-state {
        background: transparent !important;
    }
    
    body.dark-mode .empty-state-icon {
        background: rgba(212, 165, 116, 0.1) !important;
        border: 2px solid rgba(212, 165, 116, 0.3) !important;
    }
    
    body.dark-mode .empty-state-icon i {
        color: var(--accent-gold) !important;
    }
    
    body.dark-mode .empty-state-title {
        color: var(--text-primary) !important;
    }
    
    body.dark-mode .empty-state-description {
        color: var(--text-secondary) !important;
    }
}

/* ============================================
   STOCK MODAL - LIGHT & DARK MODE STYLES
   ============================================ */

/* Stock Modal Overlay */
#stockModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* Stock Modal Content Container */
.stock-modal-content {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Modal Header */
.stock-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Modal Title */
.stock-modal-title {
    margin: 0;
    color: var(--text-primary, #2d3748);
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stock-modal-title i {
    color: var(--accent-gold, #d4a574);
}

/* Close Button */
.stock-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-secondary, #a0aec0);
    transition: all 0.2s ease;
}

.stock-modal-close:hover {
    color: var(--accent-gold, #d4a574);
    transform: rotate(90deg);
}

/* Depot Cards Grid */
.stock-depot-grid {
    display: grid;
    gap: 16px;
}

/* Individual Depot Card */
.stock-depot-card {
    background: var(--input-bg, #f7fafc);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid;
}

.stock-depot-card.stock-ok {
    border-left-color: #10b981;
}

.stock-depot-card.stock-low {
    border-left-color: #ef4444;
}

/* Depot Card Header */
.stock-depot-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

/* Depot Info */
.stock-depot-info strong {
    color: var(--text-primary, #2d3748);
    font-size: 16px;
    display: block;
    margin-bottom: 6px;
}

/* Depot Badges */
.badge-fijo,
.badge-movil {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-fijo {
    background: rgba(212, 165, 116, 0.15);
    color: #b8905f;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

.badge-movil {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Stock Number Display */
.stock-depot-number {
    text-align: right;
}

.stock-depot-quantity {
    font-size: 28px;
    font-weight: 700;
}

.stock-depot-quantity.stock-ok {
    color: #10b981;
}

.stock-depot-quantity.stock-low {
    color: #ef4444;
}

.stock-depot-unit-label {
    font-size: 11px;
    color: var(--text-secondary, #718096);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 2px;
}

/* Depot Address */
.stock-depot-address {
    color: var(--text-secondary, #718096);
    font-size: 13px;
    margin-bottom: 8px;
}

.stock-depot-address i {
    margin-right: 4px;
}

/* Stock Minimum Section */
.stock-depot-minimum {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.stock-depot-minimum-label {
    color: var(--text-secondary, #718096);
    font-size: 13px;
}

.stock-depot-minimum-label i {
    margin-right: 4px;
}

.stock-depot-minimum-value {
    font-weight: 600;
}

.stock-depot-minimum-value.stock-ok {
    color: #10b981;
}

.stock-depot-minimum-value.stock-low {
    color: #ef4444;
}

.stock-depot-minimum-value i {
    margin-left: 4px;
}

/* Total Stock Footer */
.stock-total-footer {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    text-align: center;
}

.stock-total-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stock-total-quantity {
    color: white;
    font-size: 36px;
    font-weight: 700;
}

.stock-total-depots {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-top: 4px;
}

/* ============================================
   STOCK MODAL - DARK MODE OPTIMIZATION
   ============================================ */

/* Stock Modal Overlay - Dark Mode */
body.dark-mode #stockModal {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px);
}

/* Stock Modal Content - Dark Mode */
body.dark-mode #stockModal .stock-modal-content {
    background: linear-gradient(135deg, rgba(30, 35, 48, 0.98) 0%, rgba(20, 25, 38, 0.96) 100%) !important;
    border: 1px solid rgba(212, 165, 116, 0.3) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 10px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Modal Title - Dark Mode */
body.dark-mode #stockModal h3 {
    color: var(--text-primary) !important;
}

body.dark-mode .stock-modal-title {
    color: var(--text-primary) !important;
}

body.dark-mode .stock-modal-title i {
    color: var(--accent-gold) !important;
}

/* Close Button - Dark Mode */
body.dark-mode #stockModal button[onclick*="remove"] {
    color: rgba(212, 165, 116, 0.8) !important;
    transition: all 0.2s ease;
}

body.dark-mode #stockModal button[onclick*="remove"]:hover {
    color: var(--accent-gold) !important;
    transform: rotate(90deg);
}

body.dark-mode .stock-modal-close {
    color: rgba(212, 165, 116, 0.8) !important;
}

body.dark-mode .stock-modal-close:hover {
    color: var(--accent-gold) !important;
}

/* Depot Cards - Dark Mode */
body.dark-mode #stockModal > div > div > div > div[style*="background"] {
    background: rgba(45, 55, 72, 0.6) !important;
    border-left-color: currentColor !important;
}

body.dark-mode .stock-depot-card {
    background: rgba(45, 55, 72, 0.6) !important;
}

/* Depot Name - Dark Mode */
body.dark-mode #stockModal strong {
    color: var(--text-primary) !important;
}

body.dark-mode .stock-depot-info strong {
    color: var(--text-primary) !important;
}

/* Depot Address and Labels - Dark Mode */
body.dark-mode #stockModal div[style*="color: var(--text-secondary"] {
    color: rgba(203, 213, 225, 0.9) !important;
}

body.dark-mode .stock-depot-address,
body.dark-mode .stock-depot-unit-label,
body.dark-mode .stock-depot-minimum-label {
    color: rgba(203, 213, 225, 0.9) !important;
}

/* Stock Numbers - Better Contrast in Dark Mode */
body.dark-mode #stockModal div[style*="font-size: 28px"] {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .stock-depot-quantity {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Badge Styles in Dark Mode */
body.dark-mode #stockModal .badge-movil,
body.dark-mode #stockModal .badge-fijo {
    background: rgba(212, 165, 116, 0.2) !important;
    color: var(--accent-gold) !important;
    border: 1px solid rgba(212, 165, 116, 0.4);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

body.dark-mode .badge-fijo {
    background: rgba(212, 165, 116, 0.2) !important;
    color: var(--accent-gold) !important;
    border-color: rgba(212, 165, 116, 0.4) !important;
}

body.dark-mode #stockModal .badge-movil {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #a5b4fc !important;
    border-color: rgba(99, 102, 241, 0.4);
}

body.dark-mode .badge-movil {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #a5b4fc !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

/* Separator Lines - Dark Mode */
body.dark-mode #stockModal div[style*="border-top"] {
    border-top-color: rgba(212, 165, 116, 0.2) !important;
}

body.dark-mode .stock-depot-minimum {
    border-top-color: rgba(212, 165, 116, 0.2) !important;
}

/* Total Stock Section - Enhanced for Dark Mode */
body.dark-mode #stockModal div[style*="linear-gradient(135deg, #667eea"] {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.95) 0%, rgba(184, 144, 95, 0.9) 100%) !important;
    box-shadow: 0 8px 16px rgba(212, 165, 116, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 165, 116, 0.3);
}

body.dark-mode .stock-total-footer {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.95) 0%, rgba(184, 144, 95, 0.9) 100%) !important;
    box-shadow: 0 8px 16px rgba(212, 165, 116, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(212, 165, 116, 0.3) !important;
}

body.dark-mode .stock-total-label {
    color: rgba(26, 29, 41, 0.95) !important;
    font-weight: 700 !important;
}

body.dark-mode .stock-total-quantity {
    color: #1a1d29 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark-mode .stock-total-depots {
    color: rgba(26, 29, 41, 0.85) !important;
    font-weight: 600 !important;
}

/* Overlay Background - Better Visibility */
body.dark-mode #stockModal {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px);
}

/* Scrollbar in Stock Modal - Light Mode */
.stock-modal-content::-webkit-scrollbar {
    width: 8px;
}

.stock-modal-content::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 4px;
}

.stock-modal-content::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.4);
    border-radius: 4px;
}

.stock-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 165, 116, 0.6);
}

/* Scrollbar in Stock Modal - Dark Mode */
body.dark-mode #stockModal .stock-modal-content::-webkit-scrollbar {
    width: 8px;
}

body.dark-mode #stockModal .stock-modal-content::-webkit-scrollbar-track {
    background: rgba(45, 55, 72, 0.3);
    border-radius: 4px;
}

body.dark-mode #stockModal .stock-modal-content::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.5);
    border-radius: 4px;
}

body.dark-mode #stockModal .stock-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 165, 116, 0.7);
}

/* Icon Colors - Light Mode */
.stock-modal-title i {
    color: var(--accent-gold, #d4a574);
}

.stock-depot-address i {
    color: var(--text-secondary, #718096);
}

.stock-depot-minimum-label i {
    color: #f59e0b;
}

.stock-depot-minimum-value.stock-low i {
    color: #ef4444;
}

.stock-depot-minimum-value.stock-ok i {
    color: #10b981;
}

/* Icons Color - Dark Mode */
body.dark-mode #stockModal .fa-boxes,
body.dark-mode #stockModal .fa-map-marker-alt,
body.dark-mode #stockModal .fa-exclamation-triangle {
    color: var(--accent-gold) !important;
}

body.dark-mode .stock-modal-title i,
body.dark-mode .stock-depot-address i,
body.dark-mode .stock-depot-minimum-label i {
    color: var(--accent-gold) !important;
}

body.dark-mode #stockModal .fa-arrow-down,
body.dark-mode .stock-depot-minimum-value.stock-low i {
    color: #ef4444 !important;
}

body.dark-mode #stockModal .fa-check-circle,
body.dark-mode .stock-depot-minimum-value.stock-ok i {
    color: #10b981 !important;
}

/* Units Label - Dark Mode */
body.dark-mode #stockModal div[style*="text-transform: uppercase"][style*="letter-spacing"] {
    color: rgba(203, 213, 225, 0.7) !important;
}

/* Smooth Transitions */
body.dark-mode #stockModal .stock-modal-content {
    animation: fadeIn 0.2s ease-out;
}

.stock-modal-content {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   PRODUCTS TABLE - SEPARATED COLUMNS BY TYPE
   ============================================ */

/* Products Table - General */
.products-table {
    width: 100%;
    table-layout: fixed;
    min-width: 1400px;
}

/* Table Container with Scroll */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Dark Mode - Table Container Scrollbar */
body.dark-mode .table-container::-webkit-scrollbar-track {
    background: rgba(30, 35, 48, 0.6);
}

body.dark-mode .table-container::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.4);
}

body.dark-mode .table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 165, 116, 0.6);
}

/* Product Spec Items */
.product-spec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4a5568;
}

.product-spec-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.product-spec-text {
    font-size: 13px;
    color: #4a5568;
}

/* Product Badges */
.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.product-badge-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.product-badge-red {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.product-badge-amber {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Column Visibility - All columns always visible to maintain table-layout: fixed alignment */
.products-table thead th.product-col-mobiliario,
.products-table thead th.product-col-bebida,
.products-table tbody td.product-col-mobiliario,
.products-table tbody td.product-col-bebida {
    display: table-cell;
}

/* Dark Mode - Products Table */
body.dark-mode .product-spec-item {
    color: var(--text-primary);
}

body.dark-mode .product-spec-item i {
    color: var(--accent-gold);
}

body.dark-mode .product-spec-text {
    color: var(--text-primary);
}

body.dark-mode .product-badge-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.4);
}

body.dark-mode .product-badge-red {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}

body.dark-mode .product-badge-amber {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.4);
}

body.dark-mode .text-gray-400 {
    color: var(--text-secondary) !important;
}

/* Icon Colors in Dark Mode */
body.dark-mode .icon-purple {
    color: var(--accent-gold) !important;
}

body.dark-mode .icon-green {
    color: #34d399 !important;
}

body.dark-mode .icon-orange {
    color: #fbbf24 !important;
}

body.dark-mode .icon-blue {
    color: #60a5fa !important;
}

/* Responsive - Products Table */
@media (max-width: 1200px) {
    .products-table {
        font-size: 13px;
    }
    
    .product-spec-item {
        font-size: 12px;
    }
    
    .product-spec-item i {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    /* En mobile, ocultar algunas columnas menos importantes */
    .products-table thead th.product-col-mobiliario:nth-child(7),
    .products-table tbody td.product-col-mobiliario:nth-child(7),
    .products-table thead th.product-col-mobiliario:nth-child(10),
    .products-table tbody td.product-col-mobiliario:nth-child(10) {
        display: none;
    }
    
    .products-table thead th.product-col-bebida:nth-child(11),
    .products-table tbody td.product-col-bebida:nth-child(11) {
        display: none;
    }
}

/* ============================================
   VIEW PRODUCT MODAL - Diseño Credencial
   ============================================ */

/* Modal Container */
.view-product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

/* Credencial Content */
.view-product-credential {
    background: var(--card-bg, #fff);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    animation: credentialSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

@keyframes credentialSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Botón Cerrar */
.credential-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.credential-close i {
    color: white;
    font-size: 18px;
}

.credential-close:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: rotate(90deg);
}

/* Foto Principal */
.credential-photo-section {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
}

.credential-photo {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.credential-photo.has-photo {
    background: none;
}

.credential-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.credential-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.credential-photo-placeholder i {
    font-size: 80px;
    color: white;
    opacity: 0.8;
}

/* Badge de Categoría */
.credential-category {
    position: absolute;
    top: 240px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.credential-category span {
    display: inline-block;
    padding: 8px 20px;
    background: var(--accent-purple, #8b5cf6);
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Título */
.credential-title {
    text-align: center;
    padding: 40px 24px 20px;
}

.credential-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    margin-bottom: 4px;
}

.credential-type {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grid de Información - Minimalista */
.credential-info-grid {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 0 24px;
}

.credential-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.credential-info-row.highlight-row {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.credential-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.credential-label i {
    font-size: 11px;
    color: var(--text-secondary, #9ca3af);
    opacity: 0.6;
}

.credential-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    text-align: right;
}

.credential-value.price-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.credential-value.stock-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

/* Especificaciones - Minimalista */
.credential-specs-section {
    padding: 0 24px 20px;
}

.credential-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary, #9ca3af);
    margin: 0 0 12px;
    padding-bottom: 0;
    opacity: 0.7;
}

.credential-section-title i {
    font-size: 10px;
    opacity: 0.5;
}

.credential-specs-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.credential-spec-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
}

.spec-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--section-bg, #f3f4f6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spec-icon i {
    font-size: 14px;
    color: var(--text-secondary, #6b7280);
    opacity: 0.6;
}

.spec-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.spec-content label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary, #9ca3af);
    opacity: 0.7;
}

.spec-content span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

/* Depósitos - Minimalista */
.credential-depots {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.credential-depot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color, #f3f4f6);
    transition: all 0.2s;
}

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

.credential-depot-item:hover {
    opacity: 0.7;
}

.depot-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.depot-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.depot-badge-fixed,
.depot-badge-mobile {
    font-size: 8px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
}

.depot-badge-fixed {
    background: transparent;
    color: var(--text-secondary, #6b7280);
}

.depot-badge-mobile {
    background: transparent;
    color: var(--text-secondary, #6b7280);
}

.depot-stock {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.credential-no-data {
    text-align: center;
    padding: 20px;
    font-size: 14px;
    color: var(--text-secondary, #9ca3af);
    opacity: 0.6;
    font-style: italic;
}

/* Dark Mode */
body.dark-mode .view-product-credential {
    background: var(--bg-primary, #1a1d29);
    border: 1px solid rgba(212, 165, 116, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 165, 116, 0.1);
}

body.dark-mode .credential-close {
    background: rgba(212, 165, 116, 0.2);
}

body.dark-mode .credential-close:hover {
    background: rgba(212, 165, 116, 0.9);
}

body.dark-mode .credential-category span {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.9), rgba(184, 144, 95, 0.9));
    color: #1a1d29;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

body.dark-mode .credential-title h2 {
    color: var(--text-primary, #f9fafb);
}

body.dark-mode .credential-type {
    color: #d4a574;
}

body.dark-mode .credential-label {
    color: var(--text-secondary, #9ca3af);
}

body.dark-mode .credential-label i {
    color: #d4a574;
}

body.dark-mode .credential-value {
    color: var(--text-primary, #f9fafb);
}

body.dark-mode .credential-value.price-value {
    color: #6ee7b7;
}

body.dark-mode .credential-value.stock-value {
    color: #60a5fa;
}

body.dark-mode .credential-section-title {
    color: #d4a574;
    border-bottom-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .credential-section-title i {
    color: #d4a574;
}

body.dark-mode .credential-spec-item {
    background: rgba(212, 165, 116, 0.05);
    border-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .spec-icon {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.8), rgba(184, 144, 95, 0.8));
}

body.dark-mode .spec-content label {
    color: var(--text-secondary, #9ca3af);
}

body.dark-mode .spec-content span {
    color: var(--text-primary, #f9fafb);
}

body.dark-mode .credential-depot-item {
    border-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .credential-depot-item:hover {
    border-color: rgba(212, 165, 116, 0.4);
}

body.dark-mode .depot-name {
    color: var(--text-primary, #f9fafb);
}

body.dark-mode .depot-badge-fixed {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

body.dark-mode .depot-badge-mobile {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

body.dark-mode .depot-stock {
    color: #d4a574;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .view-product-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .view-product-credential {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .credential-photo-section {
        aspect-ratio: 4/3;
    }
    
    .credential-category {
        top: 180px;
    }
    
    .credential-title h2 {
        font-size: 20px;
    }
    
    .credential-info-grid {
        margin: 0 12px 16px;
    }
    
    .credential-specs-section,
    .credential-depots {
        padding: 0 16px 20px;
    }
    
    .credential-section-title {
        margin: 0 16px 12px;
    }
}

/* === ACCOUNT DETAILS MODAL OPTIMIZATION === */
/* Optimización para modal de detalles de cuenta - dark mode friendly */

/* Header del modal con gradiente */
.account-modal-header {
    padding: 24px;
    border-radius: 12px 12px 0 0;
    margin: -16px -16px 20px -16px;
}

body.dark-mode .modal-body .account-modal-header.bg-gradient-gold {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%) !important;
}

/* Secciones del modal */
.account-modal-section {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #f8fafc;
}

body.dark-mode .modal-body .account-modal-section {
    background: rgba(51, 65, 85, 0.3) !important;
}

/* Título de sección */
.account-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .modal-body .account-section-title {
    color: #94a3b8 !important;
}

/* Tarjetas de balance individuales */
.balance-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

body.dark-mode .modal-body .balance-card {
    background: rgba(30, 41, 59, 0.5) !important;
    border-color: rgba(71, 85, 105, 0.5) !important;
}

/* Fila de información dentro de tarjeta */
.balance-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

/* Label de información */
.balance-label {
    font-size: 13px;
    color: #64748b;
}

body.dark-mode .modal-body .balance-label {
    color: #94a3b8 !important;
}

/* Valor de información */
.balance-value {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

body.dark-mode .modal-body .balance-value {
    color: #e2e8f0 !important;
}

body.dark-mode .modal-body .balance-value.font-mono {
    color: #1e293b !important;
    background: #f8fafc !important;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Grid para balances múltiples */
.balances-grid {
    display: grid;
    gap: 12px;
}

/* Grid para información */
.info-grid {
    display: grid;
    gap: 12px;
}

/* Mensaje cuando no hay balances */
.no-balances-message {
    text-align: center;
    color: #64748b;
    padding: 20px;
    font-size: 14px;
}

body.dark-mode .modal-body .no-balances-message {
    color: #94a3b8 !important;
}

/* ============================================
   GOOGLE CALENDAR INTEGRATION STYLES - OPTIMIZED
   ============================================ */

/* Google Header */
.google-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.google-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ea4335 0%, #fbbc05 25%, #34a853 50%, #4285f4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.google-header-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.5px;
}

.google-header-description {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* Connection Card */
.google-connection-card {
    margin-bottom: 1.5rem;
}

.google-status {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 24px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.google-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.google-status.connected {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
}

.google-status.connected::before {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.google-status.disconnected {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
}

.google-status.disconnected::before {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.google-status .status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.google-status.connected .status-icon {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
}

.google-status.disconnected .status-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: white;
}

.google-status .status-info {
    flex: 1;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #92400e;
}

.status-badge i {
    font-size: 8px;
}

.google-status .status-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.google-status.connected .status-info h4 {
    color: #065f46;
}

.google-status.disconnected .status-info h4 {
    color: #92400e;
}

.google-status .status-info p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}

.google-status.connected .status-info p {
    color: #047857;
}

.google-status.disconnected .status-info p {
    color: #b45309;
}

.status-expiry {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #047857;
}

.status-expiry i {
    font-size: 14px;
}

/* Sync Card */
.google-sync-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.google-sync-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sync-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.sync-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
}

.sync-content {
    flex: 1;
}

.sync-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
}

.sync-content p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.sync-toggle {
    flex-shrink: 0;
}

/* Switch Inline */
.switch-container-inline {
    display: inline-block;
    position: relative;
}

.switch-container-inline input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-slider-inline {
    position: relative;
    display: block;
    width: 56px;
    height: 32px;
    background: #cbd5e1;
    border-radius: 16px;
    transition: all 0.3s;
    cursor: pointer;
}

.switch-slider-inline::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-container-inline input[type="checkbox"]:checked + .switch-slider-inline {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

.switch-container-inline input[type="checkbox"]:checked + .switch-slider-inline::before {
    transform: translateX(24px);
}

.switch-container-inline input[type="checkbox"]:disabled + .switch-slider-inline {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sync Status */
.sync-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.sync-status.active {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #86efac;
    color: #047857;
}

.sync-status.inactive {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    color: #92400e;
}

.sync-status i {
    font-size: 16px;
}

/* Features Grid */
.google-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-item {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.feature-item:hover {
    border-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    margin: 0 auto 12px;
}

.feature-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.feature-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.feature-icon.purple {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

.feature-icon.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.feature-item h5 {
    margin: 0 0 0.5rem 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
}

.feature-item p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

/* Disconnect Section */
.google-disconnect-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.disconnect-warning {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.disconnect-warning i {
    font-size: 20px;
    color: #f59e0b;
    margin-top: 2px;
    flex-shrink: 0;
}

.disconnect-warning p {
    margin: 0;
    font-size: 13px;
    color: #92400e;
    line-height: 1.6;
}

.btn-disconnect {
    padding: 13px 26px;
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-disconnect:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Benefits Modern */
.google-benefits-modern {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 1.5rem;
}

.benefits-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem 0;
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
}

.benefits-title i {
    color: #fbbf24;
    font-size: 20px;
}

.benefits-grid {
    display: grid;
    gap: 1rem;
}

.benefit-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.2s;
}

.benefit-card:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.benefit-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.benefit-content h5 {
    margin: 0 0 0.25rem 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
}

.benefit-content p {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.5;
}

/* Connect Section */
.google-connect-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.btn-google-connect {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 16px 32px;
    background: white;
    color: #1a202c;
    border: 2px solid #e5e7eb;
    border-radius: 28px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-google-connect:hover {
    background: #f8f9fa;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.btn-google-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.connect-helper-text {
    margin: 1rem 0 0 0;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.connect-helper-text i {
    color: #10b981;
    margin-right: 0.25rem;
}

/* Privacy Modern */
.google-privacy-modern {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #93c5fd;
    border-radius: 12px;
}

.privacy-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.privacy-content h5 {
    margin: 0 0 0.5rem 0;
    font-size: 15px;
    font-weight: 700;
    color: #1e40af;
}

.privacy-content p {
    margin: 0;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.6;
}

/* Toast Messages */
.success-toast,
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-toast.show,
.error-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.success-toast {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
}

.error-toast {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
}

.success-toast i,
.error-toast i {
    font-size: 20px;
}

/* Dark Mode Support */
body.dark-mode .google-header {
    border-bottom-color: rgba(71, 85, 105, 0.3);
}

body.dark-mode .google-header-content h3 {
    color: #e2e8f0;
}

body.dark-mode .google-header-description {
    color: #94a3b8;
}

body.dark-mode .google-status.connected {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

body.dark-mode .google-status.disconnected {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

body.dark-mode .google-status.connected .status-info h4 {
    color: #6ee7b7;
}

body.dark-mode .google-status.connected .status-info p {
    color: #a7f3d0;
}

body.dark-mode .google-status.disconnected .status-info h4 {
    color: #fcd34d;
}

body.dark-mode .google-status.disconnected .status-info p {
    color: #fde68a;
}

body.dark-mode .status-badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

body.dark-mode .status-badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

body.dark-mode .status-expiry {
    background: rgba(51, 65, 85, 0.5);
    color: #a7f3d0;
}

body.dark-mode .google-sync-card {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(71, 85, 105, 0.5);
}

body.dark-mode .sync-content h4 {
    color: #e2e8f0;
}

body.dark-mode .sync-content p {
    color: #94a3b8;
}

body.dark-mode .sync-status.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

body.dark-mode .sync-status.inactive {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

body.dark-mode .feature-item {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(71, 85, 105, 0.5);
}

body.dark-mode .feature-item h5 {
    color: #e2e8f0;
}

body.dark-mode .feature-item p {
    color: #94a3b8;
}

body.dark-mode .google-disconnect-section {
    border-top-color: rgba(71, 85, 105, 0.3);
}

body.dark-mode .disconnect-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-left-color: rgba(245, 158, 11, 0.5);
}

body.dark-mode .disconnect-warning p {
    color: #fcd34d;
}

body.dark-mode .google-benefits-modern {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(71, 85, 105, 0.5);
}

body.dark-mode .benefits-title {
    color: #e2e8f0;
}

body.dark-mode .benefit-card {
    background: rgba(51, 65, 85, 0.3);
}

body.dark-mode .benefit-card:hover {
    background: rgba(51, 65, 85, 0.5);
}

body.dark-mode .benefit-content h5 {
    color: #e2e8f0;
}

body.dark-mode .benefit-content p {
    color: #94a3b8;
}

body.dark-mode .btn-google-connect {
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    border-color: rgba(71, 85, 105, 0.5);
}

body.dark-mode .btn-google-connect:hover {
    background: rgba(30, 41, 59, 1);
    border-color: rgba(71, 85, 105, 0.7);
}

body.dark-mode .connect-helper-text {
    color: #94a3b8;
}

body.dark-mode .google-privacy-modern {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

body.dark-mode .privacy-content h5 {
    color: #93c5fd;
}

body.dark-mode .privacy-content p {
    color: #bfdbfe;
}

body.dark-mode .switch-slider-inline {
    background: rgba(71, 85, 105, 0.5);
}

/* ============================= */
/* INCOMES MOBILE ADAPTATION     */
/* ============================= */

/* Cheque Alerts - Base styles */
.cheque-alerts-container {
    display: flex;
    gap: 8px;
}

.cheque-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 6px;
    flex: 1;
}

.cheque-alert-danger {
    background: #fee2e2;
    border-left: 3px solid #dc2626;
}

.cheque-alert-danger > i {
    color: #991b1b;
    font-size: 16px;
}

.cheque-alert-info {
    background: #dbeafe;
    border-left: 3px solid #2563eb;
}

.cheque-alert-info > i {
    color: #1e40af;
    font-size: 16px;
}

.cheque-alert-info-text,
.cheque-alert-info > div:nth-child(2) {
    flex: 1;
}

.cheque-alert-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cheque-alert-danger .cheque-alert-title {
    color: #991b1b;
}

.cheque-alert-info .cheque-alert-title,
.cheque-alert-info-text .cheque-alert-title {
    color: #1e40af;
}

.cheque-alert-desc {
    font-size: 10px;
    margin-top: 1px;
}

.cheque-alert-danger .cheque-alert-desc {
    color: #7f1d1d;
}

.cheque-alert-info .cheque-alert-desc,
.cheque-alert-info-text .cheque-alert-desc {
    color: #1e3a8a;
}

.cheque-alert-badge {
    color: white;
    font-weight: 700;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 4px;
}

.cheque-alert-badge-danger {
    background: #991b1b;
}

.cheque-alert-badge-info {
    background: #2563eb;
}

/* Filters - Base styles */
.incomes-filters-card {
    padding: 16px;
}

.incomes-filters-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.incomes-filters-title i {
    color: var(--primary-color);
}

.incomes-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    align-items: end;
}

.incomes-filter-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 12px;
}

.incomes-filter-actions {
    display: flex;
    gap: 6px;
    align-items: flex-end;
}

.incomes-filter-btn {
    flex: 1;
    height: 42px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.incomes-active-filters {
    padding: 8px;
    background: #dbeafe;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
    margin-top: 10px;
}

.incomes-active-filters-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.incomes-active-filters-label {
    font-weight: 600;
    color: #1e40af;
    font-size: 13px;
}

.incomes-results-count {
    color: #1e40af;
    font-size: 12px;
    margin-left: auto;
}

/* Mobile Cards - Hidden on desktop */
.incomes-cards-mobile {
    display: none;
    flex-direction: column;
    gap: 12px;
}

/* Desktop table visible by default */
.desktop-only-table {
    display: block;
}

/* Dark mode for cheque alerts */
body.dark-mode .cheque-alert-danger {
    background: rgba(220, 38, 38, 0.15);
    border-left-color: #f87171;
}

body.dark-mode .cheque-alert-danger > i { color: #fca5a5; }
body.dark-mode .cheque-alert-danger .cheque-alert-title { color: #fca5a5; }
body.dark-mode .cheque-alert-danger .cheque-alert-desc { color: #fecaca; }

body.dark-mode .cheque-alert-info {
    background: rgba(37, 99, 235, 0.15);
    border-left-color: #60a5fa;
}

body.dark-mode .cheque-alert-info > i { color: #93c5fd; }
body.dark-mode .cheque-alert-info .cheque-alert-title,
body.dark-mode .cheque-alert-info-text .cheque-alert-title { color: #93c5fd; }
body.dark-mode .cheque-alert-info .cheque-alert-desc,
body.dark-mode .cheque-alert-info-text .cheque-alert-desc { color: #bfdbfe; }

body.dark-mode .incomes-active-filters {
    background: rgba(59, 130, 246, 0.15);
    border-left-color: #60a5fa;
}

body.dark-mode .incomes-active-filters-label {
    color: #93c5fd;
}

body.dark-mode .incomes-results-count {
    color: #93c5fd;
}

/* ============================= */
/* INCOMES MOBILE @media         */
/* ============================= */
@media (max-width: 768px) {
    /* Keep table on mobile with horizontal scroll */
    .desktop-only-table {
        display: block !important;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-left: 12px;
        padding-right: 12px;
    }

    .desktop-only-table .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .incomes-cards-mobile {
        display: none !important;
    }

    .taxes-table-wrapper {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Cheque alerts stack vertically */
    .cheque-alerts-container {
        flex-direction: column;
        gap: 8px;
        margin-left: 12px;
        margin-right: 12px;
    }

    .cheque-alert {
        padding: 12px 16px;
    }

    .cheque-alert-danger {
        background: #fee2e2;
    }

    .cheque-alert-info {
        background: transparent;
    }

    /* Filters - full width stacked */
    .incomes-filters-card {
        padding: 12px !important;
    }

    .incomes-filters-title {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .incomes-filters-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    .incomes-filter-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        gap: 8px;
    }

    .incomes-filter-btn {
        height: 44px;
        font-size: 14px;
        border-radius: 10px;
    }

    .incomes-filter-label {
        font-size: 11px;
    }

    .incomes-filters-grid .form-control {
        font-size: 14px !important;
        height: 42px;
    }

    .incomes-active-filters {
        margin-top: 8px;
        padding: 8px 10px;
    }

    .incomes-active-filters-inner {
        gap: 6px;
    }

    .incomes-active-filters-label {
        font-size: 12px;
        width: 100%;
    }

    .incomes-results-count {
        width: 100%;
        margin-left: 0;
        text-align: right;
    }

    /* Stats grid in incomes */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    /* Income Mobile Card */
    .income-card-mobile {
        background: var(--card-background, white);
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        border: 1px solid var(--border-color, #e2e8f0);
    }

    .income-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color, #f1f5f9);
        gap: 12px;
    }

    .income-card-title-section {
        flex: 1;
        min-width: 0;
    }

    .income-card-concepto {
        margin: 0 0 4px 0;
        font-size: 15px;
        font-weight: 700;
        color: var(--text-dark, #1e293b);
        line-height: 1.3;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .income-card-date {
        font-size: 12px;
        color: var(--text-muted, #94a3b8);
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .income-card-date i {
        font-size: 11px;
    }

    .income-card-amount {
        text-align: right;
        flex-shrink: 0;
    }

    .income-card-neto {
        display: block;
        font-size: 18px;
        font-weight: 800;
        color: #059669;
        line-height: 1.2;
    }

    .income-card-bruto {
        display: block;
        font-size: 11px;
        color: var(--text-muted, #94a3b8);
        margin-top: 2px;
    }

    .income-card-details {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }

    .income-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
    }

    .income-card-label {
        font-size: 12px;
        color: var(--text-muted, #64748b);
        display: flex;
        align-items: center;
        gap: 6px;
        font-weight: 500;
    }

    .income-card-label i {
        font-size: 12px;
        color: #d4a574;
        width: 16px;
        text-align: center;
    }

    .income-card-value {
        font-size: 13px;
        font-weight: 500;
        color: var(--text-dark, #1e293b);
        text-align: right;
        max-width: 60%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .income-card-actions {
        display: flex;
        gap: 6px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color, #f1f5f9);
        flex-wrap: wrap;
    }

    .income-card-actions .btn-action-mobile {
        flex: 1;
        min-width: 0;
        padding: 8px 6px;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        font-size: 11px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        transition: all 0.2s;
        text-decoration: none;
    }

    .income-card-actions .btn-action-mobile i {
        font-size: 12px;
    }

    .income-card-actions .btn-action-mobile span {
        font-size: 11px;
    }

    .income-card-actions .btn-primary {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: white;
    }

    .income-card-actions .btn-info {
        background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
        color: white;
    }

    .income-card-actions .btn-warning {
        background: linear-gradient(135deg, #d4a574 0%, #b8935f 100%);
        color: white;
    }

    .income-card-actions .btn-danger {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
    }

    /* Deposito Modal - Full Screen on Mobile */
    #depositoModal.modal-overlay {
        padding: 0 !important;
        align-items: stretch !important;
        background: var(--bg-primary) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9999 !important;
    }

    #depositoModal .modal {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    #depositoModal .modal-header {
        border-radius: 0 !important;
        padding: 16px !important;
        flex-shrink: 0 !important;
        border-bottom: 1px solid var(--border-color) !important;
    }

    #depositoModal .modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 16px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    #depositoModal .modal-footer {
        border-radius: 0 !important;
        padding: 16px !important;
        flex-shrink: 0 !important;
        border-top: 1px solid var(--border-color) !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    #depositoModal .modal-footer button {
        width: 100% !important;
        padding: 14px !important;
        font-size: 15px !important;
    }

    #depositoModal .form-control {
        font-size: 16px !important;
    }

    /* Dark mode mobile cards */
    body.dark-mode .income-card-mobile {
        background: rgba(30, 35, 48, 0.8);
        border-color: rgba(212, 165, 116, 0.15);
    }

    body.dark-mode .income-card-header {
        border-bottom-color: rgba(212, 165, 116, 0.1);
    }

    body.dark-mode .income-card-actions {
        border-top-color: rgba(212, 165, 116, 0.1);
    }

    body.dark-mode .income-card-neto {
        color: #34d399;
    }

    /* Dark mode deposito modal mobile */
    body.dark-mode #depositoModal.modal-overlay {
        background: var(--bg-primary) !important;
    }

    body.dark-mode #depositoModal .modal {
        background: var(--bg-primary) !important;
        border: none !important;
    }

    body.dark-mode #depositoModal .modal-header {
        background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(184, 144, 95, 0.1) 100%) !important;
        border-bottom-color: rgba(212, 165, 116, 0.2) !important;
    }

    body.dark-mode #depositoModal .modal-footer {
        background: rgba(212, 165, 116, 0.05) !important;
        border-top-color: rgba(212, 165, 116, 0.2) !important;
    }

    /* Pagination mobile */
    .pagination-wrapper {
        padding: 12px 0;
    }

    .pagination-wrapper nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
