you say it runs ok so that rules out the cdi, if fuses are definitely ok and the contacts are clean and bright then there must be a break or short somewhere in the wiring, follow the wiring from fuse box to inside headlight and handlebar switchgear, a break inside the wiring is less obvious but if you used a multimeter to test the fuses then use that to test continuity, just a case of looking carefully and checking that all connections are clean and tight.
Grizwold
June 2016