        /* ==================== SIDEBAR ==================== */
        body { margin: 0; padding: 0; }
        .app-layout { display: flex; min-height: 100vh; }
        .app-sidebar { width: 140px; background: #fff; border-right: 1px solid #e5e7eb; position: fixed; left: 0; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 40; }
        .app-content { margin-left: 140px; flex: 1; min-height: 100vh; overflow-y: auto; overflow-x: hidden; background: #fafafa; }
        
        .sb-header { padding: 24px 20px; border-bottom: 1px solid #f3f4f6; }
        .sb-logo { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 20px; font-weight: 700; color: #111827; }
        .sb-logo-icon { width: 36px; height: 36px; background: linear-gradient(135deg, #2AA048, #2AA048); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; }
        .sb-tagline { font-size: 12px; color: #6b7280; margin-top: 4px;  text-align: center;}
        
        .sb-nav { flex: 1; padding: 12px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
        .sb-nav-title { font-size: 10px; font-weight: 600; color: #9ca3af; text-transform: uppercase; padding: 12px; letter-spacing: 0.5px; }
        .sb-nav-item { padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #6b7280; cursor: pointer; border-radius: 10px; margin: 3px 0; font-size: 11px; font-weight: 500; transition: all 0.2s; text-decoration: none; text-align: center; line-height: 1.2; position: relative; }
        .sb-nav-item:hover { background: #f9fafb; color: #111827; }
        .sb-nav-item.active { background: rgba(42, 160, 72, 0.1); color: #2AA048; font-weight: 600; }
        .sb-nav-icon { width: 36px; height: 36px; border-radius: 50%; object-fit: contain; transition: all 0.2s; flex-shrink: 0; }
        .sb-badge { background: #fef3c7; color: #78350f; font-size: 7px; padding: 2px 6px; border-radius: 6px; font-weight: 700; text-transform: uppercase; }
        
        .sb-footer { padding: 16px 20px; border-top: 1px solid #f3f4f6; display: flex; align-items: center; gap: 10px; }
        .sb-avatar { width: 36px; height: 36px; border-radius: 8px; background: linear-gradient(135deg, #2AA048, #2AA048); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 13px; }
        .sb-user { flex: 1; }
        .sb-user-name { font-size: 13px; font-weight: 600; color: #111827; }
        .sb-user-status { font-size: 11px; color: #6b7280; }
        
        .page-section { display: none; min-height: 100vh; padding-bottom: 60px; }
        .page-section.active { display: block; }
        
        .coming-soon-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; text-align: center; padding: 40px; }
        .coming-soon-page h2 { font-size: 28px; font-weight: 700; color: #111827; margin: 20px 0 12px; }
        .coming-soon-page p { font-size: 16px; color: #6b7280; margin-bottom: 24px; }
        .coming-soon-badge { display: inline-block; padding: 10px 20px; background: linear-gradient(135deg, #2AA048, #2AA048); color: white; border-radius: 8px; font-weight: 600; }

    
        /* Tabs de Pagos y Recaudos */
        .tab-pagos:hover { color: #111827; }
        .tab-pagos.active { border-bottom-color: #2AA048 !important; color: #2AA048 !important; }
        .tab-content-pagos { display: none; }
        .tab-content-pagos.active { display: block; }

    
        /* Imagine - Estilos */
        .filtro-imagine:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .filtro-imagine.active {
            background: #374151 !important;
            color: white !important;
        }
        
        .idea-card {
            background: white;
            border-radius: 16px;
            padding: 24px;
            border: 2px solid #f3f4f6;
            transition: all 0.3s;
            cursor: pointer;
        }
        
        .idea-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 32px rgba(0,0,0,0.12);
            border-color: #f59e0b;
        }

    
        /* Footer corporativo */
        body {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }
        
        .app-layout {
            flex: 1;
            display: flex;
        }
        
        .app-content {
            /* NO usar flex-direction: column aqui - causa que page-sections se estiren verticalmente */
        }
        
        .page-section {
            /* NO usar flex: 1 - causa distribucion vertical incorrecta */
        }

    
        /* Header Fixed - Siempre visible */
        .header {
            position: fixed;
            top: 0;
            left: 140px;
            right: 0;
            z-index: 100;
            height: 116px; /* Altura exacta igual a área logo sidebar */
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(8px);
            border-bottom: 1px solid var(--gray-200);
            padding: 24px; /* Mismo padding que logo area */
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }
        
        /* El header fijo tiene 116px de alto - compensar en TODAS las secciones */
        #page-onboarding,
        #page-aliados,
        #page-helpdesk,
        #page-banking,
        #page-imagine {
            padding-top: 130px;
        }

    
/* === SIDEBAR COLAPSABLE === */
.app-sidebar {
    transition: width 0.3s ease;
}

.app-sidebar.collapsed {
    width: 64px;
    overflow: hidden;
}

.app-content {
    transition: margin-left 0.3s ease;
}

.app-content.expanded {
    margin-left: 64px !important;
}

/* Header se ajusta cuando sidebar está colapsado */
.app-sidebar.collapsed ~ .app-content .header {
    left: 64px !important;
}

.sidebar-toggle {
    position: relative;
    margin: 8px auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid #2AA048;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: rgba(42, 160, 72, 0.1);
    transform: scale(1.05);
}

.app-sidebar.collapsed .sidebar-toggle {
    margin: 12px auto;
}

/* Ocultar texto y ajustar elementos cuando sidebar colapsado */
.app-sidebar.collapsed .sb-nav-item span,
.app-sidebar.collapsed .sb-user-name,
.app-sidebar.collapsed .sb-user-status,
.app-sidebar.collapsed .sb-tagline,
.app-sidebar.collapsed .sb-badge {
    display: none;
}

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

.app-sidebar.collapsed .sb-logo img {
    width: 32px;
    height: auto;
}

.app-sidebar.collapsed .sb-nav-item {
    justify-content: center;
    padding: 8px 4px;
}
.app-sidebar.collapsed .sb-nav-icon {
    width: 28px;
    height: 28px;
}

.app-sidebar.collapsed .sb-footer {
    justify-content: center;
    padding: 16px 8px;
}

.app-sidebar.collapsed .sb-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.app-sidebar.collapsed .sb-header {
    padding: 20px 8px;
}


/* Ocultar botón toggle cuando hay CUALQUIER modal activo */
.modal.active ~ .sidebar-toggle,
body:has(.modal.active) .sidebar-toggle,
body:has(#modal-idea-conversacional) .sidebar-toggle,
body:has(#modal-registrar-pago) .sidebar-toggle {
    opacity: 0;
    pointer-events: none;
}


/* Animación pulse para iconos */
    writing-mode: vertical-rl;
}

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


