/* ============================================
   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 */
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-y: auto;
    border-radius: 0 24px 24px 0;
    border-right: 1px solid var(--border-color);
}

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

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

.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;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.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: 200px;
}

.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;
}

.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;
    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;
    overflow: hidden;
}

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

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

.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);
}

/* === 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 */
@media (min-width: 769px) {
    .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: 24px;
    height: 100vh;
    overflow-y: auto;
    padding: 30px;
}

.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* === 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-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: center;
}

/* === 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;
}

.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(4, 1fr);
    gap: 20px;
}

.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;
    }
    
    .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;
    }
    
    .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-y: visible;
    }
    
    .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;
    }
    
    .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: 14px;
        border-radius: 12px;
    }
    
    .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 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;
    }
    
    /* Alert Cards Mobile */
    .alerts-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .alert-card-amber,
    .alert-card-red,
    .alert-card-blue {
        padding: 14px !important;
    }
    
    .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 {
        min-width: 800px;
    }
    
    .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 {
        background: rgba(30, 35, 48, 0.8);
        border: 1px solid rgba(212, 165, 116, 0.15);
    }
    
    .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;
        gap: 12px !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: 16px;
    }
    
    .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(2, 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: 20px;
    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: 20px;
    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: 20px;
    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: 20px;
    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: 20px;
    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-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 20px;
    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: 20px;
    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 {
    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: 52px;
    height: 52px;
    min-width: 52px;
    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: 24px;
}

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

.stat-label {
    margin: 0;
    font-size: 12px;
    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;
}

.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 0.8fr 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;
}

.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;
}

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

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

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

.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;
}

.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: hidden;
    min-width: 0;
}

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

.calendar-day:hover {
    z-index: 9999;
    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.2);
    z-index: 99999;
    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: 99999;
}

.calendar-day:hover .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;
}

.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;
}

.table-wrapper::-webkit-scrollbar,
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 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;
}

.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;
}

/* 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;
}

.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;
}

.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: 15px;
}

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

.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: 0px 0px;
}

.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-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);budgets
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-label {
    display: block;
}

/* 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-11 { width: 11%; }
.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: 16px;
    border-radius: 12px;
    text-decoration: none;
    display: block;
    border-left-width: 4px;
    border-left-style: solid;
}

.alert-card-red {
    background: #fee2e2;
    border-left-color: #ef4444;
}

.alert-card-amber {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.alert-card-blue {
    background: #dbeafe;
    border-left-color: #3b82f6;
}

.alert-card:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    transition: all 0.2s;
}

/* 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 {
    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.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    color: #e2e8f0; /* Texto blanco suave */
}

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);
}

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 {
    color: #cbd5e1; /* Texto más claro para labels */
    opacity: 1;
}

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 {
    color: #ffffff; /* Números en blanco puro */
}

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 {
    border-color: rgba(212, 165, 116, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(212, 165, 116, 0.15);
}

/* Gold Gradient for Premium Elements */
body.dark-mode .bg-gradient-gold {
    background: linear-gradient(135deg, #d4a574 0%, #b8905f 100%);
}

/* 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.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);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.25);
}

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 - 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 {
    color: var(--text-secondary);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

body.dark-mode .sidebar-collapse-btn:hover {
    background: rgba(212, 165, 116, 0.15);
    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 */
body.dark-mode .alert-card-red {
    background: rgba(127, 29, 29, 0.3);
    border-left-color: #ef4444;
}

body.dark-mode .alert-card-amber {
    background: rgba(120, 53, 15, 0.3);
    border-left-color: #f59e0b;
}

body.dark-mode .alert-card-blue {
    background: rgba(30, 64, 175, 0.3);
    border-left-color: #3b82f6;
}

/* 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.1);
    border-color: rgba(212, 165, 116, 0.3);
}

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 {
    background: var(--accent-gold);
    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); }

/* ==========================
   PROFIT SECTION LAYOUT
   ========================== */
/* Desktop: Chart (2/3) + Metrics (1/3) */
.profit-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    width: 100%;
}

.profit-chart-container {
    min-width: 0; /* Prevent overflow */
}

.profit-metrics-container {
    display: flex;
    flex-direction: column;
    gap: 0; /* No gap, margin-bottom on each child */
}

/* 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 Filters Adjustments */
.profit-filters .create-btn {
    padding: 10px 16px !important;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profit-filters .form-control,
.profit-filters .form-select {
    height: 42px;
}

/* 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 */
body.dark-mode .alert-card-amber {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
    border-left-color: var(--gold-primary);
}

body.dark-mode .alert-card-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
    border-left-color: #ef4444;
}

body.dark-mode .alert-card-blue {
    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 .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: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.6);
    border-color: rgba(212, 165, 116, 0.1);
}

body.dark-mode .table-wrapper {
    background: transparent;
}

body.dark-mode .events-table {
    background: transparent;
}

body.dark-mode .events-table thead {
    background: rgba(30, 35, 48, 0.8);
    border-bottom-color: rgba(212, 165, 116, 0.2);
}

body.dark-mode .events-table th {
    color: var(--gold-primary);
    border-bottom-color: rgba(212, 165, 116, 0.2);
}

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

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);
}

body.dark-mode .events-table td small {
    color: var(--text-secondary);
}

body.dark-mode .events-table td strong {
    color: var(--text-primary);
}

/* ==========================
   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);
}

/* ==========================
   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);
}

/* 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);
}


