A unanimous three-judge panel of the N.C. Court of Appeals has affirmed a trial-court ruling in favor of the N.C. Department of Insurance and against a group of coastal towns and counties that challenged homeowners’ insurance rate increases of up to 30 percent.