:root {
	color-scheme: light;
	--mvg-bg: #f7f7f8;
	--mvg-surface: #ffffff;
	--mvg-surface-2: #f1f2f4;
	--mvg-text: #121316;
	--mvg-muted: #737780;
	--mvg-border: #dedfe3;
	--mvg-danger: #d93025;
	--mvg-success: #168a4a;
	--mvg-warning: #b86b00;
	--mvg-info: #2563eb;
	--mvg-primary: #7638fa;
	--mvg-primary-strong: #5b21b6;
	--mvg-focus: #7638fa;
	--mvg-ring: rgba(118, 56, 250, .24);
	--mvg-radius-sm: 10px;
	--mvg-radius-md: 16px;
	--mvg-radius-lg: 22px;
	--mvg-radius-pill: 999px;
	--mvg-space-1: 4px;
	--mvg-space-2: 8px;
	--mvg-space-3: 12px;
	--mvg-space-4: 16px;
	--mvg-space-5: 24px;
	--mvg-space-6: 32px;
	--mvg-space-7: 40px;
	--mvg-space-8: 48px;
	--mvg-text-xs: 11px;
	--mvg-text-sm: 12px;
	--mvg-text-md: 14px;
	--mvg-text-lg: 18px;
	--mvg-control-sm: 38px;
	--mvg-control-height: 44px;
	--mvg-card-padding: 22px;
	--mvg-input-padding: 9px 13px;
	--mvg-shadow-sm: 0 1px 2px rgba(18, 19, 22, .04), 0 6px 20px rgba(18, 19, 22, .04);
	--mvg-shadow: 0 10px 32px rgba(18, 19, 22, .08);
	--mvg-shadow-lg: 0 24px 64px rgba(18, 19, 22, .14);
	--mvg-transition-fast: 160ms ease;
	--mvg-gradient: linear-gradient(135deg, #7638fa 0%, #d300c5 35%, #ff3040 68%, #ff8a00 100%);
	--mvg-font: "Vazirmatn", "Vazir", Tahoma, Arial, sans-serif;
}

.mvg-wrap {
	margin: 20px 0 0 20px;
	color: var(--mvg-text);
}

.mvg-app {
	min-height: calc(100dvh - 52px);
	display: grid;
	grid-template-columns: 216px minmax(0, 1fr);
	color: var(--mvg-text);
	background: var(--mvg-bg);
	border: 1px solid var(--mvg-border);
	border-radius: var(--mvg-radius-lg) var(--mvg-radius-lg) 0 0;
	overflow: visible;
	font-family: var(--mvg-font);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.75;
}

.mvg-app,
.mvg-app * {
	box-sizing: border-box;
}

/*
 * WordPress provides this utility in wp-admin, but the front-end portal cannot
 * rely on the active theme defining it. Keep accessible labels in the DOM
 * without letting them consume space inside compact controls such as switches.
 */
.mvg-app .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.mvg-app .screen-reader-text:focus {
	z-index: 100000;
	top: 8px;
	inset-inline-start: 8px;
	width: auto !important;
	height: auto !important;
	padding: 10px 14px !important;
	margin: 0 !important;
	overflow: visible !important;
	clip: auto !important;
	clip-path: none !important;
	color: var(--mvg-text);
	background: var(--mvg-surface);
	border: 1px solid var(--mvg-focus) !important;
	border-radius: var(--mvg-radius-sm);
	box-shadow: var(--mvg-shadow);
}

.mvg-app button,
.mvg-app input,
.mvg-app select,
.mvg-app textarea,
.mvg-app table {
	font-family: inherit;
}

.mvg-app h1,
.mvg-app h2,
.mvg-app h3,
.mvg-app h4,
.mvg-app h5,
.mvg-app h6 {
	color: var(--mvg-text);
	font-family: inherit;
	font-weight: 700;
}

.mvg-sidebar {
	position: sticky;
	top: 32px;
	height: calc(100dvh - 32px);
	overflow-y: auto;
	background: var(--mvg-surface);
	border-inline-end: 1px solid var(--mvg-border);
	border-start-start-radius: var(--mvg-radius-lg);
	padding: 22px 13px;
}

.mvg-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 8px 28px;
	color: var(--mvg-text);
	font-size: 18px;
	font-weight: 800;
	text-decoration: none;
}

.mvg-brand:focus {
	box-shadow: none;
}

.mvg-brand-mark {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	flex: 0 0 34px;
	border-radius: var(--mvg-radius-sm);
	color: #fff;
	background: var(--mvg-gradient);
	font-family: Arial, sans-serif;
}

.mvg-nav {
	display: grid;
	gap: 5px;
}

.mvg-nav-item {
	min-height: 44px;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: var(--mvg-radius-sm);
	color: var(--mvg-muted);
	font-weight: 600;
	text-decoration: none;
	transition: background-color .16s ease, color .16s ease;
}

.mvg-nav-item:hover,
.mvg-nav-item:focus,
.mvg-nav-item.is-active {
	color: var(--mvg-text);
	background: var(--mvg-surface-2);
}

.mvg-nav-item:focus {
	box-shadow: 0 0 0 2px var(--mvg-focus);
	outline: 0;
}

.mvg-nav-item svg {
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mvg-main {
	min-width: 0;
	direction: rtl;
}

.mvg-header {
	min-height: 86px;
	position: sticky;
	top: 32px;
	z-index: 20;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px 24px;
	padding: 16px 28px;
	background: rgba(247, 247, 248, .94);
	border-bottom: 1px solid var(--mvg-border);
	backdrop-filter: blur(12px);
}


.mvg-header > div:first-child {
	min-width: 180px;
}

.mvg-header h1 {
	margin: 2px 0 0;
	color: var(--mvg-text);
	font-size: clamp(20px, 2vw, 24px);
	line-height: 1.35;
}

.mvg-eyebrow {
	margin: 0;
	color: var(--mvg-muted);
	font-size: 12px;
	text-transform: none;
	letter-spacing: normal;
}

.mvg-sync-status {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--mvg-muted);
	white-space: nowrap;
}

.mvg-header-tools {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px 14px;
	min-width: 0;
}

.mvg-switcher-label {
	width: min(260px, 42vw);
	min-width: 190px;
}

.mvg-switcher-label .mvg-input {
	min-height: 38px;
}

.mvg-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--mvg-success);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--mvg-success) 13%, transparent);
}

.mvg-content {
	min-width: 0;
	padding: 28px;
}

.mvg-content > :not(.mvg-modal) {
	width: min(100%, 1440px);
	margin-inline: auto;
}

.mvg-content h2,
.mvg-content h3 {
	color: var(--mvg-text);
}

.mvg-content h2 {
	margin: 0 0 6px;
	font-size: 19px;
}

.mvg-content h3 {
	margin: 0 0 4px;
	font-size: 16px;
}

.mvg-content p {
	color: var(--mvg-muted);
}

.mvg-page-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px 24px;
	margin-bottom: 22px;
	padding: 2px 0;
}

.mvg-page-actions p {
	margin: 0;
}

.mvg-button-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.mvg-app .button {
	min-height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-color: var(--mvg-border);
	border-radius: 9px;
	font-weight: 600;
	line-height: 1.4;
}

.mvg-app .button:focus,
.mvg-app button:focus-visible,
.mvg-app input:focus,
.mvg-app select:focus,
.mvg-app textarea:focus {
	outline: 2px solid var(--mvg-focus);
	outline-offset: 2px;
	box-shadow: none;
}

.mvg-button-gradient {
	color: #fff !important;
	border: 0 !important;
	background: var(--mvg-gradient) !important;
	text-shadow: none !important;
}

.mvg-button-danger {
	color: var(--mvg-danger) !important;
	border-color: color-mix(in srgb, var(--mvg-danger) 35%, var(--mvg-border)) !important;
}

.mvg-input {
	width: 100%;
	max-width: none;
	min-height: 42px;
	padding: 8px 11px !important;
	color: var(--mvg-text) !important;
	background: var(--mvg-surface) !important;
	border: 1px solid var(--mvg-border) !important;
	border-radius: var(--mvg-radius-sm) !important;
}

textarea.mvg-input {
	min-height: 96px;
	line-height: 1.75;
}

.mvg-input[readonly] {
	color: var(--mvg-muted) !important;
	background: var(--mvg-surface-2) !important;
	cursor: default;
}

.mvg-muted,
.mvg-app .description {
	color: var(--mvg-muted);
}

.mvg-app {
	color-scheme: light;
}

@media (prefers-reduced-motion: no-preference) {
	.mvg-toast {
		animation: mvg-toast-in .18s ease-out;
	}
}

@keyframes mvg-toast-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Keep WordPress submenu routes registered for reliable access while the
 * in-app sidebar remains the primary navigation. */
#toplevel_page_mavaragram .wp-submenu a {
	font-family: var(--mvg-font);
}
