Unfair treatment is legal, discrimination is based on being targeted because of your age, race, gender, religion, or national original, and is illegal. It's also illegal to be punished for exercising a legal right, like labor union organizing or "whistle-blowing."
Generally, though, without a written employment contract or a labor untion to protect you, you're an "at will" employee and can be fired, demoted, etc. without notice and for any reason (and you can quit on the same basis), and bosses are allowed to be unfair jerks.
However, a company does have to follow it's own stated policies. You should consult an employment litigator who can evaluate the specific details of your experience.
Disclaimer: Please note that this answer does not constitute legal advice, and should not be relied on, since each state has different laws, each situation is fact specific, and it is impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue. This answer does not create an attorney-client relationship.
Discrimination cases can be very hard to win. The plaintiff has the burden of proof to show that plaintiff was a member of a protected class, the adverse employment action occurred as a result of plaintiff being a member of the class. The adverse employment action was serious and there was no legitimate, non-discriminatory explanation for the employer’s behavior.
Getting fired, not hired, demoted, passed over, given poor assignments, not given good assignments, paid less for the same work all these things happen in the workplace. To be the basis for a discrimination suit the employer’s actions must be related to the employee’s status in a protected class (race or gender for example), the adverse treatment must be substantial and detrimental and “reasonably likely to impair an employee’s job performance or prospects for advancement.” This means that minor things, while unfair, are generally not enough for suit. If your boss criticizes your work, plays favorites, or has unreasonable demands these factors will not usually support a discrimination lawsuit.
Both federal and state laws prohibit an employer from discriminating against individuals based on: Race, Religion, Color, National Origin, Disability, Marital Status, Gender, Sexual Orientation, Age, and Pregnancy.
Direct evidence is the easiest way to show that discrimination occurred. Direct evidence of discrimination includes statements by supervisors, managers or other witnesses that directly go to the heart of the issue. For example, if the boss tells a co-worker that Employee Smith won’t be getting the promotion because she is a woman, or Employee Green is being fired because he is gay, then plaintiff has a straight forward case. Most discrimination cases are circumstantial in which case the likelihood of success can only be determined on a case by case basis after consultation with an attorney.
For example, a terminated employee might be able to initiate a lawsuit alleging discrimination if he or she can show 1) membership in a protected class 2) that the employee was qualified for the position 3) the employer took an adverse action against the employee by firing him or her, and 4) the employee was replaced by a person who is not in the protected class.
The employer would have the opportunity to offer a legitimate, non-discriminatory reason for its actions. The employee must then show the proffered reasons are a pretext; just a cover for unlawful discrimination. This is difficult. Sometimes the plaintiff can show that the legitimate reasons offered by the employer are factually defective. For example the employer states that the employee was constantly late but time sheets show that the employee was punctual. The law requires plaintiff to show not only that the stated reason is false but also that adverse action was due at least in part to discrimination.