Gems

Description
Shards are an item dropped when defeating any kind of Pokémon once the player has the Shard Case unlocked. These typed shards can be invested into the Shards tab to increase type effectivity, and your damage output.

Helpful tips
The shards you get from defeating a Pokémon depend on the type(s) that Pokémon has. Wild Pokémon on routes give 1 shard per type, dungeon encounters give 3, most gym/trainer Pokémon give 5, and dungeon bosses give 20.

Note: Most gyms yield 5 shards per pokémon (excepting Goldenrod, Blackthorn, and Pokémon League Sinnoh (Aaron)), and the most efficient gyms yield the most shards per gym clear. (e.g. Violet City Gym is less efficient than the Petalburg City Gym because it takes twice as many clears of the Violet City Gym to obtain the same number of shards)

Type effectiveness chart
Type and shard effectiveness