See attached pictures from datasheet. One picture shows Standard identifier (IDE=0) mapping (which ID bit in which Tx/Rx buffer register/register_bit). Another picture shows the same for Extended identifier (IDE=1, SRR=1).
Acceptance filters, both IDARx and IDMRx have exactly the same ID mappings.
IDMRx bit set to '1' makes corresponding IDRx bit don't care (bit is passed). IDMRx bit set to '0' makes filter passing only if corresponding IDRx bit matches corresponding IDARx bit.
If 8 bit mode, acceptance filters analyse only IDR0 register. In standard mode, thats ID bits ID10 to ID3. In extended - ID28 to ID21. All other ID bits are don't care.
In 16bit mode, IDR0 and IDR1 registers are analysed.
Is it now more clear?
Let's analyse what's your setup would accept. You didn't setup CANIDMR1 and CANIDMR2. As docs say, by default IDMRx are reset to 0. So CANIDMR0-CANIDMR2 = 0, CANIDMR=0xFF. IDR3 bits are don't care, IDR0-IDR2 bits have to match IDAR0-IDAR1 bits.
CANIDAR1 = 0xFF, so IDE=1 and SRR = 1, so only eExtended identifier messages are accepted.
CANIDAR0= 0x18, so ID25=1, ID24=1.
CANIDAR1=0xFF, so ID20..ID15=1
CANIDMR3 = 0xFF, so all combinations of ID6..ID0 are accepted.
So IDs accepted are from (1<<25)|(1<<24)|(0x3F <<15) = 0x31F8000 to 0x31F807F, both RTR=1 and RTR=0.
Try using search at bottom of this page. It should reveal some more answers.