Synthesis of carbazole-derived ligands and their metal complexes: characterization, thermal, catalytic, and electrochemical features