Thickness-derived optical-electrical management in Sn-based perovskite solar cells