v3.26.3
INCOME TAXES - Schedule of Reconciliation of Unrecognized Tax Benefits (Details) - USD ($)
$ in Thousands
12 Months Ended
Aug. 31, 2026
Aug. 31, 2025
Aug. 31, 2024
Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns [Roll Forward]      
Beginning balance $ 39,434 $ 35,290 $ 21,053
Additions based on tax positions related to the current year 3,318 5,344 6,068
Additions for tax positions related to prior years 176 2,368 11,726
Release for tax positions of prior years (21,675) (3,568) (3,557)
Ending balance $ 21,253 $ 39,434 $ 35,290