import React from 'react'; import { Navigate, Outlet } from 'react-router-dom'; import useAuthStore from '../../store/authStore'; /** * MasterAdminProtectedRoute * Restricts access to /master-admin/* routes exclusively to * users with role === 'master_admin'. All other users (including * regular admins) are redirected back to the hidden login page. */ const MasterAdminProtectedRoute = () => { const { user, profile, loading } = useAuthStore(); if (loading) { return (