:root {
	--mg-ink: #0f172a;
	--mg-muted: #64748b;
	--mg-line: rgba(15, 23, 42, 0.1);
	--mg-surface: #f8fafc;
	--mg-panel: #ffffff;
	--mg-teal: #2563eb;
	--mg-teal-deep: #1d4ed8;
	--mg-teal-soft: #eff6ff;
	--mg-sand: #f1f5f9;
	--mg-amber: #d97706;
	--mg-rose: #b42318;
	--mg-ok: #059669;
	--mg-warn: #b45309;
	--mg-bad: #b42318;
	--mg-radius: 18px;
	--mg-shadow: 0 18px 50px rgba(18, 32, 28, 0.08);
	--mg-sidebar: 260px;
	--mg-font: "Outfit", "Segoe UI", sans-serif;
	--mg-display: "Fraunces", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	min-height: 100%;
	background: var(--mg-surface);
	color: var(--mg-ink);
	font-family: var(--mg-font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--mg-teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

/* Let Tabler webfont paint the glyph; don't box or re-align :before (that offsets icons). */
.ti {
	speak: none;
	font-style: normal !important;
	font-weight: normal !important;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	vertical-align: middle;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.mg-container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

/* Public top */
.mg-public-top {
	position: sticky;
	top: 0;
	z-index: 40;
	backdrop-filter: blur(14px);
	background: rgba(247, 250, 248, 0.86);
	border-bottom: 1px solid transparent;
}
.mg-public-top__inner {
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.mg-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--mg-ink);
	text-decoration: none;
	font-weight: 700;
	letter-spacing: -0.03em;
}
.mg-brand:hover { text-decoration: none; }
.mg-brand__mark {
	width: 36px;
	height: 36px;
	border-radius: 12px;
	background: linear-gradient(145deg, #3b82f6, #1d4ed8);
	color: #fff;
	display: grid;
	place-items: center;
	font-size: 18px;
	box-shadow: none;
}
.mg-brand__name { font-size: 1.25rem; font-family: var(--mg-display); }
.mg-public-nav { display: flex; align-items: center; gap: 10px; }
.mg-public-link {
	color: var(--mg-muted);
	font-weight: 600;
	font-size: .95rem;
	padding: 8px 6px;
	text-decoration: none !important;
}
.mg-public-link:hover { color: var(--mg-ink); }

.mg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 600;
	cursor: pointer;
	transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
	text-decoration: none !important;
}
.mg-btn:active { transform: translateY(1px); }
.mg-btn--primary {
	background: var(--mg-teal);
	color: #fff;
	box-shadow: none;
}
.mg-btn--primary:hover { background: var(--mg-teal-deep); }
.mg-btn--ghost {
	background: transparent;
	color: var(--mg-ink);
	border-color: var(--mg-line);
}
.mg-btn--ghost:hover { background: #fff; }
.mg-btn--soft {
	background: var(--mg-teal-soft);
	color: var(--mg-teal-deep);
}
.mg-btn--block { width: 100%; }
.mg-btn--sm { min-height: 36px; padding: 0 12px; font-size: 0.92rem; }

/* Landing */
.mg-hero {
	position: relative;
	min-height: calc(100vh - 72px);
	overflow: hidden;
	display: flex;
	align-items: center;
}
.mg-hero__bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 55% at 12% 18%, rgba(15, 118, 110, 0.28), transparent 55%),
		radial-gradient(ellipse 50% 40% at 88% 12%, rgba(194, 120, 3, 0.16), transparent 50%),
		radial-gradient(ellipse 60% 50% at 70% 88%, rgba(15, 118, 110, 0.1), transparent 55%),
		linear-gradient(165deg, #e6f4f0 0%, #f4f8f6 42%, #ebe8e0 100%);
}
.mg-hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(18, 32, 28, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(18, 32, 28, 0.035) 1px, transparent 1px);
	background-size: 52px 52px;
	mask-image: linear-gradient(180deg, #000 25%, transparent 90%);
	opacity: 0.7;
	animation: mgGridDrift 22s linear infinite;
}
@keyframes mgGridDrift {
	from { transform: translateY(0); }
	to { transform: translateY(52px); }
}
.mg-hero__stage {
	position: relative;
	z-index: 1;
	width: min(1120px, calc(100% - 40px));
	margin: 0 auto;
	padding: 48px 0 64px;
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	align-items: center;
	gap: 48px;
}
.mg-hero__copy { max-width: 560px; }
.mg-hero__brand {
	font-family: var(--mg-display);
	font-size: clamp(3.6rem, 9vw, 5.8rem);
	line-height: 0.92;
	letter-spacing: -0.045em;
	margin: 0 0 20px;
	color: var(--mg-ink);
	animation: mgRise 0.8s ease both;
}
.mg-hero__title {
	margin: 0 0 14px;
	font-size: clamp(1.35rem, 2.8vw, 1.85rem);
	line-height: 1.25;
	letter-spacing: -0.025em;
	font-weight: 600;
	color: var(--mg-ink);
	animation: mgRise 0.9s ease 0.08s both;
}
.mg-hero__lede {
	margin: 0 0 28px;
	color: var(--mg-muted);
	font-size: 1.05rem;
	max-width: 32rem;
	animation: mgRise 1s ease 0.14s both;
}
.mg-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	animation: mgRise 1.05s ease 0.2s both;
}
@keyframes mgRise {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}

.mg-hero__visual {
	position: relative;
	animation: mgRise 1.1s ease 0.16s both;
}
.mg-hero-shot {
	position: relative;
	border-radius: 28px;
	padding: 22px;
	background:
		linear-gradient(160deg, rgba(18, 32, 28, 0.94), rgba(11, 90, 84, 0.92));
	box-shadow:
		0 40px 80px rgba(6, 22, 18, 0.28),
		0 0 0 1px rgba(255, 255, 255, 0.08) inset;
	color: #fff;
	overflow: hidden;
	min-height: 360px;
}
.mg-hero-shot__pulse {
	position: absolute;
	width: 280px;
	height: 280px;
	right: -80px;
	top: -100px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 68%);
	animation: mgPulse 4.5s ease-in-out infinite;
	pointer-events: none;
}
@keyframes mgPulse {
	0%, 100% { transform: scale(1); opacity: 0.75; }
	50% { transform: scale(1.15); opacity: 1; }
}
.mg-hero-shot__bar {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 22px;
	position: relative;
	z-index: 1;
}
.mg-hero-shot__bar span {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255,255,255,0.28);
}
.mg-hero-shot__bar span:nth-child(1) { background: #f87171; }
.mg-hero-shot__bar span:nth-child(2) { background: #fbbf24; }
.mg-hero-shot__bar span:nth-child(3) { background: #34d399; }
.mg-hero-shot__bar em {
	margin-left: auto;
	font-style: normal;
	font-size: .82rem;
	opacity: 0.7;
}
.mg-hero-shot__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	position: relative;
	z-index: 1;
}
.mg-hero-shot__tile {
	padding: 18px 16px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(6px);
	display: flex;
	flex-direction: column;
	gap: 4px;
	animation: mgTileFloat 5.5s ease-in-out infinite;
}
.mg-hero-shot__tile:nth-child(2) { animation-delay: .4s; }
.mg-hero-shot__tile:nth-child(3) { animation-delay: .8s; }
@keyframes mgTileFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-5px); }
}
.mg-hero-shot__tile--wide { grid-column: 1 / -1; }
.mg-hero-shot__tile .ti {
	font-size: 1.35rem;
	opacity: 0.9;
	margin-bottom: 6px;
}
.mg-hero-shot__tile strong {
	font-size: 1.45rem;
	letter-spacing: -0.02em;
	line-height: 1.2;
}
.mg-hero-shot__tile small {
	opacity: 0.72;
	font-size: .88rem;
}

.mg-section { padding: 80px 0; }
.mg-section--alt {
	background:
		radial-gradient(ellipse 80% 60% at 50% 0%, rgba(15, 118, 110, 0.06), transparent 60%),
		linear-gradient(180deg, #eef5f2, #f7faf8);
}
.mg-section-head { max-width: 620px; margin-bottom: 36px; }
.mg-section-head--center {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}
.mg-section-head h2 {
	margin: 0 0 10px;
	font-family: var(--mg-display);
	font-size: clamp(1.8rem, 3vw, 2.45rem);
	letter-spacing: -0.03em;
}
.mg-section-head p { margin: 0; color: var(--mg-muted); }

/* Role feature tabs */
.mg-role-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 0 auto 28px;
	padding: 6px;
	max-width: 720px;
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid var(--mg-line);
	border-radius: 999px;
}
.mg-role-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--mg-muted);
	font-weight: 600;
	font-size: .92rem;
	cursor: pointer;
	transition: background .18s ease, color .18s ease;
}
.mg-role-tab:hover { color: var(--mg-ink); background: rgba(18, 32, 28, 0.04); }
.mg-role-tab.is-active {
	background: var(--mg-ink);
	color: #fff;
}
.mg-role-pane {
	max-width: 920px;
	margin: 0 auto;
	padding: 28px 8px 0;
}
.mg-role-pane__intro {
	margin-bottom: 22px;
	text-align: center;
}
.mg-role-pane__intro h3 {
	margin: 0 0 6px;
	font-family: var(--mg-display);
	font-size: 1.55rem;
	letter-spacing: -0.02em;
}
.mg-role-pane__intro p {
	margin: 0 auto;
	max-width: 480px;
	color: var(--mg-muted);
}
.mg-role-features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 18px;
}
.mg-role-features li {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 18px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--mg-line);
}
.mg-role-features li > .ti {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	background: var(--mg-teal-soft);
	color: var(--mg-teal-deep);
	font-size: 1.15rem;
}
.mg-role-features strong {
	display: block;
	font-size: .98rem;
	margin-bottom: 2px;
	letter-spacing: -0.01em;
}
.mg-role-features span {
	display: block;
	color: var(--mg-muted);
	font-size: .88rem;
	line-height: 1.45;
}

.mg-cover-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
}
.mg-cover {
	padding: 8px 4px;
}
.mg-cover__icon {
	width: 48px;
	height: 48px;
	border-radius: 14px;
	display: grid;
	place-items: center;
	background: var(--mg-teal-soft);
	color: var(--mg-teal-deep);
	font-size: 1.35rem;
	margin-bottom: 14px;
}
.mg-cover h3 {
	margin: 0 0 8px;
	font-size: 1.12rem;
	letter-spacing: -0.02em;
}
.mg-cover p { margin: 0; color: var(--mg-muted); font-size: 0.96rem; }

.mg-steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	counter-reset: step;
}
.mg-step { position: relative; padding-top: 8px; }
.mg-step::before {
	counter-increment: step;
	content: counter(step);
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--mg-ink);
	color: #fff;
	font-weight: 700;
	margin-bottom: 14px;
}
.mg-step h3 { margin: 0 0 8px; font-size: 1.1rem; }
.mg-step p { margin: 0; color: var(--mg-muted); }

.mg-cta-band {
	margin: 0 0 72px;
	padding: 40px;
	border-radius: 28px;
	background: linear-gradient(135deg, #12201c, #1d3a33);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	box-shadow: var(--mg-shadow);
}
.mg-cta-band__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.mg-cta-band h2 {
	margin: 0 0 8px;
	font-family: var(--mg-display);
	font-size: clamp(1.6rem, 3vw, 2.1rem);
}
.mg-cta-band p { margin: 0; opacity: 0.82; }
.mg-cta-band .mg-btn--primary { background: #fff; color: var(--mg-ink); }
.mg-cta-band .mg-btn--ghost { color: #fff; border-color: rgba(255,255,255,0.28); }

.mg-pricing-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	max-width: 760px;
}
.mg-pricing-grid--public { max-width: 720px; margin: 0 auto; }
.mg-pricing-card {
	position: relative;
	padding: 28px 26px;
	border: 1px solid var(--mg-line);
	border-radius: 22px;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 18px;
	box-shadow: 0 8px 28px rgba(6, 22, 18, 0.04);
}
.mg-pricing-card--featured {
	border-color: rgba(15, 118, 110, 0.35);
	background: linear-gradient(180deg, #f4fbf9 0%, #fff 55%);
	box-shadow: 0 16px 40px rgba(15, 118, 110, 0.12);
}
.mg-pricing-card__badge {
	position: absolute;
	top: 18px;
	right: 18px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--mg-teal);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
}
.mg-pricing-card__head h2 {
	margin: 0 0 6px;
	font-family: var(--mg-display);
	font-size: 1.35rem;
}
.mg-pricing-card__price {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.1;
}
.mg-pricing-card__price small {
	font-size: .95rem;
	font-weight: 500;
	color: var(--mg-muted);
}
.mg-pricing-card__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
	flex: 1;
}
.mg-pricing-card__list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--mg-muted);
	font-size: .95rem;
}
.mg-pricing-card__list .ti {
	color: var(--mg-teal);
	margin-top: 2px;
}
.mg-pricing-card__foot { margin-top: auto; }
.mg-plan-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 18px 22px;
}
.mg-plan-banner--pro {
	background: linear-gradient(135deg, #ecfdf8, #f7faf8);
	border-color: rgba(15, 118, 110, 0.2);
}
.mg-plan-banner--warn {
	border-color: rgba(220, 38, 38, 0.25);
	background: #fff7f7;
}
.mg-upi-box {
	display: grid;
	gap: 14px;
	padding: 18px 20px;
	border: 1px dashed var(--mg-line);
	border-radius: 16px;
	background: var(--mg-sand);
}
.mg-upi-box span {
	display: block;
	font-size: .82rem;
	color: var(--mg-muted);
	margin-bottom: 4px;
}
.mg-upi-box strong {
	font-size: 1.1rem;
	word-break: break-all;
}
.mg-upi-box__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.mg-public-footer {
	padding: 28px 0 40px;
	border-top: 1px solid var(--mg-line);
	color: var(--mg-muted);
	font-size: 0.92rem;
}
.mg-public-footer__inner {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

/* Auth */
.mg-auth {
	min-height: calc(100vh - 160px);
	display: grid;
	place-items: center;
	padding: 40px 0 64px;
}
.mg-auth__panel {
	width: min(460px, 100%);
	background: var(--mg-panel);
	border: 1px solid var(--mg-line);
	border-radius: 24px;
	padding: 32px;
	box-shadow: var(--mg-shadow);
}
.mg-auth__panel h1 {
	margin: 0 0 8px;
	font-family: var(--mg-display);
	font-size: 2rem;
	letter-spacing: -0.03em;
}
.mg-auth__panel > p { margin: 0 0 24px; color: var(--mg-muted); }
.mg-form-group { margin-bottom: 16px; }
.mg-form-group label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.92rem;
	font-weight: 600;
}
.mg-input, .mg-select, .mg-textarea {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--mg-line);
	border-radius: 12px;
	background: #fff;
	color: var(--mg-ink);
}
.mg-textarea { min-height: 110px; resize: vertical; }
.mg-input:focus, .mg-select:focus, .mg-textarea:focus {
	outline: 2px solid rgba(37, 99, 235, 0.25);
	border-color: var(--mg-teal);
}
.mg-pin-row {
	display: flex;
	gap: 8px;
}
.mg-pin-row input {
	width: 46px;
	height: 52px;
	text-align: center;
	font-size: 1.25rem;
	font-weight: 700;
	border: 1px solid var(--mg-line);
	border-radius: 12px;
}
.mg-auth__foot { margin-top: 18px; color: var(--mg-muted); font-size: 0.95rem; }
.mg-demo {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px dashed var(--mg-line);
}
.mg-demo h4 { margin: 0 0 10px; font-size: 0.92rem; }
.mg-demo__list { display: grid; gap: 8px; }
.mg-demo__item {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--mg-sand);
	font-size: 0.88rem;
}
.mg-error {
	display: none;
	margin-bottom: 12px;
	padding: 10px 12px;
	border-radius: 12px;
	background: #fdecea;
	color: var(--mg-rose);
	font-size: 0.92rem;
}
.mg-error.is-on { display: block; }
.mg-recaptcha {
	display: flex;
	justify-content: flex-start;
}
.mg-recaptcha .g-recaptcha {
	transform-origin: left top;
}

/* App shell */
.mg-app { min-height: 100vh; display: flex; background: var(--mg-surface); }
.mg-sidebar {
	width: var(--mg-sidebar);
	flex-shrink: 0;
	background: #10231f;
	color: #e7f3ef;
	padding: 22px 16px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	position: sticky;
	top: 0;
	align-self: flex-start;
	height: 100vh;
	max-height: 100vh;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.mg-sidebar .mg-brand { color: #fff; }
.mg-sidebar .mg-brand__mark { box-shadow: none; }
.mg-side-nav { display: grid; gap: 4px; }
.mg-side-nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 12px;
	border-radius: 12px;
	color: rgba(231, 243, 239, 0.78);
	text-decoration: none;
}
.mg-side-nav a:hover { background: rgba(255,255,255,0.06); text-decoration: none; color: #fff; }
.mg-side-nav a.is-active {
	background: rgba(20, 143, 133, 0.28);
	color: #fff;
}
.mg-side-nav i { font-size: 1.2rem; line-height: 1; flex: none; }
.mg-sidebar__foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.mg-userchip {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 12px;
}
.mg-userchip strong { font-size: 0.95rem; }
.mg-userchip span { font-size: 0.82rem; opacity: 0.7; }

.mg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mg-topbar {
	height: 68px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 28px;
	border-bottom: 1px solid var(--mg-line);
	background: rgba(247, 250, 248, 0.92);
	backdrop-filter: blur(10px);
	position: sticky;
	top: 0;
	z-index: 20;
}
.mg-topbar h1 {
	margin: 0;
	font-size: 1.15rem;
	letter-spacing: -0.02em;
}
.mg-topbar__tools {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: 1;
	justify-content: flex-end;
	min-width: 0;
}
.mg-topbar__create {
	flex-shrink: 0;
	gap: 6px;
}
.mg-topbar__date {
	color: var(--mg-muted);
	font-size: .9rem;
	white-space: nowrap;
}

.mg-gsearch {
	position: relative;
	width: min(360px, 100%);
}
.mg-gsearch > .ti-search {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--mg-muted);
	pointer-events: none;
}
.mg-gsearch input {
	width: 100%;
	padding: 9px 12px 9px 34px;
	border: 1px solid var(--mg-line);
	border-radius: 12px;
	background: var(--mg-panel);
	font: inherit;
	font-size: .92rem;
	color: var(--mg-text);
}
.mg-gsearch input:focus {
	outline: none;
	border-color: var(--mg-brand);
	box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.mg-gsearch__results {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: min(420px, calc(100vw - 32px));
	max-height: 440px;
	overflow: auto;
	background: var(--mg-panel);
	border: 1px solid var(--mg-line);
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(18, 32, 28, 0.16);
	z-index: 60;
}
.mg-gsearch__group {
	padding: 12px 14px 4px;
	font-size: .72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--mg-muted);
}
.mg-gsearch__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 14px;
	color: var(--mg-text);
	text-decoration: none;
}
.mg-gsearch__item:hover {
	background: rgba(15, 118, 110, 0.07);
}
.mg-gsearch__item > .ti {
	color: var(--mg-brand);
	font-size: 1.05rem;
	flex: none;
}
.mg-gsearch__item span {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.mg-gsearch__item strong {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mg-gsearch__item small {
	color: var(--mg-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mg-gsearch__empty {
	padding: 18px;
	text-align: center;
	color: var(--mg-muted);
	font-size: .9rem;
}
.mg-content { padding: 28px; }

.mg-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-bottom: 22px;
}
.mg-stat {
	background: var(--mg-panel);
	border: 1px solid var(--mg-line);
	border-radius: 18px;
	padding: 18px;
}
.mg-stat__label { color: var(--mg-muted); font-size: 0.88rem; }
.mg-stat__value {
	margin-top: 6px;
	font-size: 1.8rem;
	font-weight: 700;
	letter-spacing: -0.03em;
}
.mg-stat__icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	background: var(--mg-teal-soft);
	color: var(--mg-teal-deep);
	margin-bottom: 10px;
	line-height: 1;
	font-size: 1.15rem;
}
.mg-stat__icon .ti { line-height: 1; }

.mg-grid-2 {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 16px;
}
.mg-panel {
	background: var(--mg-panel);
	border: 1px solid var(--mg-line);
	border-radius: 18px;
	padding: 18px;
}
.mg-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}
.mg-panel__head h2 {
	margin: 0;
	font-size: 1.05rem;
	letter-spacing: -0.02em;
}

/* ——— Tabs ——— */
.mg-tabs {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 20px;
	padding: 6px;
	background: var(--mg-panel);
	border: 1px solid var(--mg-line);
	border-radius: 16px;
	box-shadow: var(--mg-shadow);
}
.mg-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 0;
	background: transparent;
	color: var(--mg-muted);
	font: inherit;
	font-weight: 600;
	font-size: 0.92rem;
	border-radius: 11px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.mg-tab:hover { color: var(--mg-ink); background: var(--mg-sand); text-decoration: none; }
a.mg-tab { text-decoration: none; color: inherit; }
.mg-tab i { font-size: 1.1rem; line-height: 1; flex: none; }
.mg-tab span { line-height: 1.2; }
.mg-tab .mg-collapse__count {
	margin-left: 2px;
	opacity: 0.85;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 1.35em;
	line-height: 1;
	padding: 0 8px;
}
.mg-tab.is-active {
	background: var(--mg-teal);
	color: #fff;
	box-shadow: none;
}
.mg-tab.is-active:hover { color: #fff; background: var(--mg-teal); text-decoration: none; }
.mg-tab.is-active .mg-collapse__count {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}
.mg-tabpane { display: none; animation: mgFadeIn 0.25s ease-out; }
.mg-tabpane.is-active { display: block; }
@media (max-width: 640px) {
	.mg-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.mg-tab { white-space: nowrap; }
	.mg-tab span { display: inline; }
}

.mg-table { width: 100%; border-collapse: collapse; }
.mg-table th, .mg-table td {
	padding: 12px 10px;
	text-align: left;
	border-bottom: 1px solid var(--mg-line);
	vertical-align: middle;
	font-size: 0.94rem;
}
.mg-table th { color: var(--mg-muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.mg-th-sort {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: inherit;
	text-decoration: none;
	font: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	cursor: pointer;
}
.mg-th-sort:hover { color: var(--mg-ink); text-decoration: none; }
.mg-th-sort i { font-size: 0.95em; opacity: 0.45; }
.mg-th-sort:hover i { opacity: 0.8; }
.mg-th-sort.is-active { color: var(--mg-teal-deep); }
.mg-th-sort.is-active i { opacity: 1; color: var(--mg-teal); }
.mg-clients-sort { display: none; }
.mg-sort-mobile { display: none; }
@media (max-width: 980px) {
	.mg-clients-sort,
	.mg-sort-mobile { display: flex; }
}
.mg-table tr:last-child td { border-bottom: 0; }
.mg-table__total td {
	border-top: 2px solid var(--mg-ink);
	border-bottom: 0;
	background: var(--mg-sand);
}

.mg-pager {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 14px 4px 4px;
	border-top: 1px solid var(--mg-line);
	margin-top: 4px;
}
.mg-pager__meta { color: var(--mg-muted); font-size: 0.88rem; }
.mg-pager__links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mg-pager__current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	border-radius: 10px;
	background: var(--mg-ink);
	color: #fff;
	font-weight: 700;
	font-size: 0.88rem;
}

.mg-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	background: #eef2f0;
	color: var(--mg-muted);
}
.mg-badge--ok { background: #d1fae5; color: #047857; }
.mg-badge--warn { background: #fff1d6; color: #92400e; }
.mg-badge--bad { background: #fdecea; color: #912018; }
.mg-badge--muted { background: #eef2f0; color: #475467; }

.mg-list { display: grid; gap: 10px; }
.mg-list a, .mg-list .mg-list__item {
	display: block;
	padding: 12px;
	border-radius: 14px;
	background: var(--mg-sand);
	color: inherit;
	text-decoration: none;
}
.mg-list a:hover { background: var(--mg-teal-soft); text-decoration: none; }
.mg-list strong { display: block; margin-bottom: 2px; }
.mg-list span { color: var(--mg-muted); font-size: 0.88rem; }

.mg-progress {
	height: 8px;
	border-radius: 999px;
	background: #e5eeea;
	overflow: hidden;
}
.mg-progress > i {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #3b82f6, var(--mg-teal));
	border-radius: inherit;
}

.mg-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}
.mg-inline-form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: end;
}
.mg-inline-form .mg-form-group { margin: 0; min-width: 140px; }

.mg-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.48);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 28px 20px;
	z-index: 100;
	overflow: auto;
}
.mg-modal-backdrop.is-open {
	display: flex;
	animation: mgFadeIn .18s ease-out;
}
@keyframes mgFadeIn { from { opacity: 0; } }
@keyframes mgModalIn {
	from { opacity: 0; transform: translateY(14px) scale(0.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes mgSheetUp {
	from { opacity: 0; transform: translateY(28px); }
	to { opacity: 1; transform: translateY(0); }
}
.mg-modal {
	width: min(520px, 100%);
	max-height: min(88vh, 820px);
	margin: auto;
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.06);
	border-radius: 22px;
	padding: 0;
	overflow: hidden;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 24px 64px rgba(15, 23, 42, 0.22);
	animation: mgModalIn .26s cubic-bezier(.2, .85, .25, 1);
	scrollbar-width: thin;
	scrollbar-color: rgba(37, 99, 235, 0.28) transparent;
}
.mg-modal::-webkit-scrollbar { width: 8px; }
.mg-modal::-webkit-scrollbar-track { background: transparent; }
.mg-modal::-webkit-scrollbar-thumb { background: rgba(37, 99, 235, 0.22); border-radius: 999px; }
.mg-modal::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	border-radius: 22px 22px 0 0;
	background: linear-gradient(90deg, var(--mg-teal) 0%, #60a5fa 55%, var(--mg-amber) 100%);
	pointer-events: none;
	z-index: 3;
}
.mg-modal > h3,
.mg-modal .mg-quicksheet__head {
	flex: none;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 20px 22px 16px;
	border-bottom: 1px solid var(--mg-line);
	background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
	font-family: var(--mg-display);
	font-size: 1.22rem;
	letter-spacing: -0.02em;
	position: relative;
	z-index: 2;
}
.mg-modal > h3 .ti:first-child,
.mg-modal .mg-quicksheet__head h3 .ti {
	flex: none;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border-radius: 12px;
	background: var(--mg-teal-soft);
	color: var(--mg-teal-deep);
	font-size: 1.15rem;
}
.mg-modal > h3 .mg-icon-btn,
.mg-modal .mg-quicksheet__head .mg-icon-btn {
	margin-left: auto;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	color: var(--mg-muted);
}
.mg-modal > h3 .mg-icon-btn:hover,
.mg-modal .mg-quicksheet__head .mg-icon-btn:hover {
	color: var(--mg-ink);
	background: var(--mg-sand);
}
.mg-modal .mg-error { margin-bottom: 0; }
.mg-modal > .mg-error {
	margin: 16px 22px 0;
}
.mg-modal > .mg-modal__hint,
.mg-modal > .mg-quicksheet__hint {
	margin: 0;
	padding: 12px 22px 0;
	color: var(--mg-muted);
	font-size: .9rem;
	line-height: 1.5;
}
.mg-modal > form {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 18px 22px 22px;
	margin: 0;
}
.mg-modal form > p { margin: 0; }
.mg-modal form > label.mg-check-row,
.mg-modal form > .mg-check-row { margin: 0; }
.mg-modal .mg-form-group { margin-bottom: 0; }
.mg-modal .mg-form-group label {
	margin-bottom: 7px;
	line-height: 1.4;
	font-weight: 600;
	font-size: .9rem;
}
.mg-modal .mg-form-group label small {
	display: block;
	margin-top: 3px;
	font-size: .8rem;
	font-weight: 400;
	color: var(--mg-muted);
}
.mg-modal .mg-input,
.mg-modal .mg-select,
.mg-modal .mg-textarea {
	min-height: 46px;
	padding: 11px 14px;
	border-radius: 12px;
	border-color: rgba(15, 23, 42, 0.12);
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.mg-modal .mg-input:focus,
.mg-modal .mg-select:focus,
.mg-modal .mg-textarea:focus {
	border-color: rgba(37, 99, 235, 0.55);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
	outline: none;
}
.mg-modal .mg-textarea { min-height: 104px; padding-top: 12px; }
.mg-modal .mg-inline-form {
	gap: 14px;
	align-items: flex-end;
}
.mg-modal .mg-inline-form .mg-form-group {
	flex: 1 1 160px;
	min-width: 0;
}
.mg-modal-section {
	padding: 16px 18px;
	margin-bottom: 0;
	border: 1px solid var(--mg-line);
	border-radius: 14px;
	background: var(--mg-sand);
	display: grid;
	gap: 14px;
}
.mg-modal-section:last-of-type { margin-bottom: 0; }
.mg-modal-section__title {
	margin: 0;
	font-size: .72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--mg-muted);
}
.mg-modal-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 16px;
}
.mg-modal-grid-3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px 16px;
}
.mg-modal__foot {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	align-items: center;
	flex-wrap: wrap;
	margin: 4px -22px -22px;
	padding: 16px 22px;
	border-top: 1px solid var(--mg-line);
	background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
	position: sticky;
	bottom: -22px;
	z-index: 2;
}
.mg-modal__hint {
	margin: 0;
	color: var(--mg-muted);
	font-size: .9rem;
	line-height: 1.5;
}
.mg-modal .mg-check-row {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 46px;
	padding: 0 14px;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 12px;
	background: #fff;
	font-weight: 600;
	font-size: .9rem;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}
.mg-modal .mg-check-row:hover { border-color: rgba(37, 99, 235, 0.35); background: var(--mg-teal-soft); }
.mg-modal .mg-check-row input { width: 17px; height: 17px; margin: 0; accent-color: var(--mg-teal); }
.mg-modal details {
	margin: 0;
	padding: 14px 16px;
	border: 1px solid var(--mg-line);
	border-radius: 14px;
	background: var(--mg-sand);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.mg-modal details summary {
	cursor: pointer;
	font-weight: 700;
	font-size: .95rem;
	margin: 0;
	list-style: none;
}
.mg-modal details summary::-webkit-details-marker { display: none; }
.mg-modal details summary::after {
	content: "+";
	float: right;
	color: var(--mg-muted);
	font-weight: 600;
}
.mg-modal details[open] summary::after { content: "–"; }
.mg-modal details[open] summary { margin-bottom: 0; }
.mg-modal details .mg-inline-form { margin-top: 0; }
.mg-modal details .mg-check-row { margin-top: 0; }
.mg-modal details > .mg-form-group { margin-top: 0; }
.mg-modal .mg-btn--primary { box-shadow: none; min-width: 120px; }
.mg-modal .mg-btn--primary:hover { box-shadow: none; }
.mg-modal .mg-btn--ghost { min-width: 96px; }
.mg-modal .mg-panel__head h3 { border-bottom: 0; padding-bottom: 0; margin: 0; font-size: 1.2rem; background: transparent; }
.mg-modal > .mg-panel__head {
	flex: none;
	margin: 0 !important;
	padding: 18px 22px 14px;
	border-bottom: 1px solid var(--mg-line);
	background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
	align-items: flex-start;
}
.mg-modal > .mg-day-split {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	padding: 16px 22px 22px;
}
.mg-modal > .mg-upi-box {
	flex: none;
	margin: 14px 22px 0;
}
.mg-modal--day,
.mg-modal--wide {
	width: min(720px, 100%);
	max-width: min(720px, 100%);
}
body.mg-modal-open { overflow: hidden; }
.mg-doc-editor {
	width: min(1180px, 100%);
	margin: 0 auto;
}
.mg-doc-editor__form {
	display: grid;
	gap: 18px;
}
.mg-doc-editor__foot {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	flex-wrap: wrap;
	padding-top: 8px;
}

/* Phones: bottom sheet */
@media (max-width: 640px) {
	.mg-modal-backdrop {
		align-items: flex-end;
		justify-content: stretch;
		padding: 0;
	}
	.mg-modal {
		width: 100%;
		max-width: 100%;
		max-height: min(92vh, 100%);
		margin: 0;
		border-radius: 20px 20px 0 0;
		border-left: 0;
		border-right: 0;
		border-bottom: 0;
		animation: mgSheetUp .28s cubic-bezier(.2, .85, .25, 1);
	}
	.mg-modal::before {
		border-radius: 20px 20px 0 0;
	}
	.mg-modal > h3,
	.mg-modal .mg-quicksheet__head {
		padding: 18px 18px 14px;
	}
	.mg-modal > form {
		padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));
	}
	.mg-modal__foot {
		margin-left: -18px;
		margin-right: -18px;
		margin-bottom: calc(-18px - env(safe-area-inset-bottom, 0px));
		padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
		bottom: calc(-18px - env(safe-area-inset-bottom, 0px));
	}
	.mg-modal-section { padding: 14px 16px; }
	.mg-modal--day,
	.mg-modal--wide {
		width: 100%;
		max-width: 100%;
	}
}
.mg-check-grid { display: grid; gap: 8px; max-height: 160px; overflow: auto; }
.mg-check-grid label { display: flex; gap: 8px; align-items: center; font-weight: 500; }

.mg-timeline { display: grid; gap: 12px; }
.mg-timeline__item {
	padding: 14px;
	border-radius: 14px;
	background: var(--mg-sand);
}
.mg-timeline__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 6px;
	font-size: 0.86rem;
	color: var(--mg-muted);
}
.mg-timeline__actions {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}
.mg-timeline__actions form { display: inline; margin: 0; }

.mg-rich { word-break: break-word; }
.mg-rich .mg-ext-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--mg-teal-deep);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	word-break: break-all;
}
.mg-rich .mg-ext-link .ti {
	font-size: .85em;
	opacity: 0.75;
	flex: none;
}
.mg-rich .mg-code {
	display: inline;
	padding: 1px 7px;
	border-radius: 6px;
	background: #eef2f0;
	border: 1px solid var(--mg-line);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .88em;
	color: #0b5a54;
}
.mg-rich .mg-codeblock {
	margin: 10px 0;
	padding: 12px 14px;
	border-radius: 12px;
	background: #12201c;
	color: #e8f0ec;
	overflow-x: auto;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .86rem;
	line-height: 1.5;
}
.mg-rich .mg-codeblock code {
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	font: inherit;
}

.mg-empty {
	padding: 28px;
	text-align: center;
	color: var(--mg-muted);
}

/* Mobile bottom bar — hidden on desktop */
.mg-bottombar { display: none; }
.mg-quicksheet {
	width: min(560px, 100%);
	max-width: min(560px, 100%);
}
.mg-quicksheet h3 { margin: 0; border: 0; padding: 0; background: transparent; font-size: 1.22rem; }
.mg-quicksheet__head {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 20px 22px 14px;
	border-bottom: 1px solid var(--mg-line);
	background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}
.mg-quicksheet__hint {
	margin: 0;
	padding: 12px 22px 0;
	color: var(--mg-muted);
	font-size: .88rem;
}
.mg-quicksheet__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	padding: 16px 22px 22px;
	overflow: auto;
	flex: 1 1 auto;
	min-height: 0;
}
.mg-quicksheet__grid a {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 14px 14px 13px;
	border-radius: 14px;
	border: 1px solid rgba(15, 23, 42, 0.06);
	background: var(--mg-sand);
	color: var(--mg-ink);
	text-decoration: none;
	transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.mg-quicksheet__grid a:hover {
	background: var(--mg-teal-soft);
	border-color: rgba(37, 99, 235, 0.22);
	text-decoration: none;
	transform: translateY(-1px);
}
.mg-quicksheet__grid i {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: #fff;
	font-size: 1.15rem;
	color: var(--mg-teal-deep);
	margin-bottom: 4px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.mg-quicksheet__grid strong { font-size: .92rem; letter-spacing: -0.01em; }
.mg-quicksheet__grid span { color: var(--mg-muted); font-size: .78rem; line-height: 1.35; }
.mg-topbar__create {
	flex-shrink: 0;
	gap: 6px;
}
@media (max-width: 640px) {
	.mg-quicksheet__grid {
		grid-template-columns: 1fr 1fr;
		padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px));
	}
	.mg-quicksheet__head { padding: 18px 16px 12px; }
}

.mg-client-boxes {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-bottom: 16px;
	align-items: start;
}
.mg-bank { display: grid; gap: 8px; }
.mg-bank > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--mg-sand);
}
.mg-bank span { color: var(--mg-muted); font-size: .88rem; }
.mg-bank strong { text-align: right; word-break: break-all; }
.mg-terms {
	max-height: 320px;
	overflow: auto;
	color: var(--mg-muted);
	font-size: .95rem;
	line-height: 1.7;
}

.mg-tasklist {
	display: flex;
	flex-direction: column;
}
.mg-task {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 4px;
	border-bottom: 1px solid var(--mg-line);
}
.mg-task:last-child { border-bottom: 0; }
.mg-task form { display: flex; }
.mg-task__check {
	width: 24px;
	height: 24px;
	flex: none;
	border-radius: 8px;
	border: 2px solid var(--mg-line);
	background: var(--mg-panel);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: .85rem;
	padding: 0;
	transition: border-color .15s ease, background .15s ease;
}
.mg-task__check:hover { border-color: var(--mg-brand); }
.mg-task__check.is-on {
	background: var(--mg-brand);
	border-color: var(--mg-brand);
}
.mg-task__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.mg-task__body small { color: var(--mg-muted); }
.mg-task.is-done .mg-task__body strong {
	text-decoration: line-through;
	color: var(--mg-muted);
	font-weight: 500;
}

.mg-collapse {
	margin-top: 16px;
	background: var(--mg-panel);
	border: 1px solid var(--mg-line);
	border-radius: 18px;
	overflow: hidden;
}
.mg-collapse > summary {
	list-style: none;
	cursor: pointer;
	padding: 14px 18px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	color: var(--mg-muted);
	user-select: none;
}
.mg-collapse > summary::-webkit-details-marker { display: none; }
.mg-collapse > summary:hover { color: var(--mg-text); }
.mg-collapse__chev { transition: transform .18s ease; }
.mg-collapse[open] .mg-collapse__chev { transform: rotate(90deg); }
.mg-collapse__count {
	background: var(--mg-line);
	color: var(--mg-text);
	border-radius: 999px;
	padding: 1px 10px;
	font-size: .82rem;
}
.mg-collapse__body { padding: 0 18px 18px; }

.mg-project-hero {
	display: grid;
	grid-template-columns: 1.4fr 0.8fr;
	gap: 16px;
	margin-bottom: 16px;
}
.mg-meta-grid {
	display: grid;
	gap: 10px;
}
.mg-meta-grid div {
	padding: 12px;
	border-radius: 12px;
	background: var(--mg-sand);
}
.mg-meta-grid span { display: block; color: var(--mg-muted); font-size: 0.82rem; }
.mg-meta-grid strong { font-size: 1rem; }

.mg-team-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 12px;
}
.mg-team-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--mg-line);
	border-radius: 14px;
	background: #fff;
}
.mg-team-card__avatar {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--mg-brand);
	background: var(--mg-sand);
}
.mg-team-card__body { min-width: 0; flex: 1; }
.mg-team-card__body strong {
	display: block;
	font-size: 1rem;
	line-height: 1.3;
}
.mg-team-card__role {
	display: block;
	margin-top: 2px;
	color: var(--mg-muted);
	font-size: .88rem;
}
.mg-team-card__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 8px;
	font-size: .84rem;
}
.mg-team-card__meta a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--mg-ink);
	text-decoration: none;
	word-break: break-word;
}
.mg-team-card__meta a:hover { color: var(--mg-brand); }
.mg-team-card__meta .ti { font-size: .95rem; color: var(--mg-muted); }

.mg-files { display: grid; gap: 8px; }
.mg-files a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--mg-line);
}

/* Billing compact actions */
.mg-doc-actions {
	display: flex;
	gap: 6px;
	align-items: center;
	justify-content: flex-end;
	white-space: nowrap;
}
.mg-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	border: 1px solid var(--mg-line);
	background: #fff;
	color: var(--mg-ink);
	cursor: pointer;
	font-size: 1.05rem;
	line-height: 1;
	text-decoration: none !important;
	transition: background .15s ease, border-color .15s ease;
}
.mg-icon-btn .ti { line-height: 1; }
.mg-icon-btn:hover { background: var(--mg-teal-soft); border-color: rgba(15, 118, 110, 0.3); }
.mg-select--compact {
	min-height: 34px;
	padding: 4px 8px;
	font-size: 0.86rem;
	border-radius: 10px;
	width: auto;
}

/* Searchable combobox (clients / projects / assignees) */
.mg-combo {
	position: relative;
	width: 100%;
}
.mg-combo__native {
	position: absolute !important;
	opacity: 0 !important;
	pointer-events: none !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	clip: rect(0, 0, 0, 0);
}
.mg-combo__control {
	display: flex;
	align-items: center;
	gap: 4px;
	min-height: 46px;
	padding: 0 6px 0 12px;
	border: 1px solid var(--mg-line);
	border-radius: 12px;
	background: #fff;
	transition: border-color .15s ease;
}
.mg-combo.is-open .mg-combo__control,
.mg-combo__control:focus-within {
	border-color: var(--mg-teal);
	outline: 2px solid rgba(37, 99, 235, 0.18);
	outline-offset: 0;
}
.mg-combo__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 10px 0;
	font: inherit;
	color: var(--mg-ink);
	outline: none;
}
.mg-combo__toggle {
	flex: none;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--mg-muted);
	cursor: pointer;
	display: grid;
	place-items: center;
}
.mg-combo__toggle:hover { background: var(--mg-teal-soft); color: var(--mg-teal-deep); }
.mg-combo.is-open .mg-combo__toggle i { transform: rotate(180deg); }
.mg-combo__list {
	position: absolute;
	z-index: 80;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	max-height: 280px;
	overflow: auto;
	padding: 6px;
	border: 1px solid var(--mg-line);
	border-radius: 12px;
	background: #fff;
}
.mg-combo__opt {
	display: block;
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	padding: 10px 12px;
	border-radius: 8px;
	font: inherit;
	font-size: 0.92rem;
	color: var(--mg-ink);
	cursor: pointer;
}
.mg-combo__opt:hover,
.mg-combo__opt.is-active {
	background: var(--mg-teal-soft);
	color: var(--mg-teal-deep);
}
.mg-combo__opt.is-selected {
	font-weight: 600;
}
.mg-combo__empty {
	padding: 14px 12px;
	color: var(--mg-muted);
	font-size: 0.88rem;
	text-align: center;
}
.mg-modal .mg-combo { z-index: 1; }
.mg-modal .mg-combo.is-open { z-index: 5; }

.mg-select--status {
	min-height: 34px;
	padding: 4px 28px 4px 10px;
	font-size: 0.86rem;
	border-radius: 10px;
	width: auto;
	min-width: 8.5rem;
	max-width: 11rem;
}
.mg-status-form { margin: 0; }

/* Attendance day history */
.mg-day-list { display: grid; gap: 8px; }
.mg-day-row {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	border: 1px solid var(--mg-line);
	border-radius: 14px;
	background: var(--mg-sand);
	cursor: pointer;
	text-align: left;
	color: inherit;
	transition: background .15s ease, border-color .15s ease;
}
.mg-day-row:hover {
	background: var(--mg-teal-soft);
	border-color: rgba(15, 118, 110, 0.28);
}
.mg-day-row__date { display: flex; flex-direction: column; min-width: 120px; }
.mg-day-row__date strong { font-size: 1rem; }
.mg-day-row__date small { color: var(--mg-muted); font-size: 0.84rem; }
.mg-day-row__stats { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.mg-day-row__chev { color: var(--mg-muted); margin-left: auto; }
.mg-modal--day,
.mg-modal--wide {
	width: min(720px, 100%);
	max-width: min(720px, 100%);
}

/* Attendance month calendar */
.mg-cal {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
}
.mg-cal__dow {
	text-align: center;
	font-size: .78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--mg-muted);
	padding: 4px 0;
}
.mg-cal__dow.is-sun { color: #9aa5a0; }
.mg-cal__cell {
	min-height: 68px;
	border: 1px solid var(--mg-line);
	border-radius: 12px;
	background: #fff;
	padding: 8px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	font: inherit;
	text-align: left;
	color: inherit;
}
.mg-cal__cell.is-blank { border: 0; background: transparent; min-height: 0; }
.mg-cal__cell.has-data { cursor: pointer; }
.mg-cal__cell.has-data:hover { border-color: var(--mg-teal); box-shadow: 0 4px 14px rgba(15, 118, 110, .12); }
.mg-cal__cell.is-sun { background: #eceff0; border-color: #dde2e3; color: #6b7672; }
.mg-cal__cell.is-future { opacity: .45; }
.mg-cal__cell.is-today { border: 2px solid var(--mg-teal); }
.mg-cal__cell.is-selected { outline: 2px dashed rgba(15, 118, 110, .5); outline-offset: 2px; }
.mg-cal__num { font-weight: 700; font-size: .92rem; }
.mg-cal__off {
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #9aa5a0;
}
.mg-cal__stats { display: flex; flex-wrap: wrap; gap: 4px; }
.mg-cal__stats em {
	font-style: normal;
	font-size: .74rem;
	font-weight: 600;
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--mg-sand);
	white-space: nowrap;
}
.mg-cal__stats em.ok { color: var(--mg-teal-deep); background: var(--mg-teal-soft); }
.mg-cal__stats em.bad { color: #b91c1c; background: #fde8e8; }
.mg-cal__stats em.mut { color: var(--mg-muted); }

.mg-item-search { position: relative; }
.mg-item-search__list {
	position: absolute;
	z-index: 40;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	max-height: 260px;
	overflow: auto;
	padding: 6px;
	border: 1px solid var(--mg-line);
	border-radius: 12px;
	background: var(--mg-panel);
	box-shadow: none;
	display: grid;
	gap: 2px;
}
.mg-item-search__list[hidden] {
	display: none !important;
}
.mg-item-search__opt {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--mg-ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.mg-item-search__opt:hover,
.mg-item-search__opt.is-active {
	background: var(--mg-teal-soft);
}
.mg-item-search__opt strong {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mg-item-search__opt span {
	flex: none;
	color: var(--mg-muted);
	font-variant-numeric: tabular-nums;
	font-size: 0.9rem;
}

.mg-lineitems { display: grid; gap: 12px; }
.mg-lineitems:empty { display: none; }
.mg-lineitem {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 90px 140px 110px 38px;
	gap: 10px;
	align-items: start;
	padding: 12px 14px;
	border: 1px solid var(--mg-line);
	border-radius: 14px;
	background: #fff;
}
.mg-lineitem__main {
	display: grid;
	gap: 8px;
}
.mg-lineitem__main .mg-textarea {
	min-height: 94px;
}
.mg-lineitem__amt {
	text-align: right;
	font-weight: 600;
	font-size: .92rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mg-day-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.mg-day-col {
	border-radius: 14px;
	padding: 14px;
	min-height: 160px;
}
.mg-day-col h4 {
	margin: 0 0 12px;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.mg-day-col h4 em {
	font-style: normal;
	font-size: 0.82rem;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(18, 32, 28, 0.08);
}
.mg-day-col--ok { background: #e7f7f3; }
.mg-day-col--bad { background: #fdecea; }
.mg-day-col--muted { background: #eef2f0; grid-column: 1 / -1; }
.mg-day-people {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}
.mg-day-people li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 10px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.72);
}
.mg-day-people span { color: var(--mg-muted); font-size: 0.82rem; }

@media (max-width: 980px) {
	.mg-cover-grid, .mg-steps, .mg-grid-2, .mg-project-hero, .mg-day-split, .mg-pricing-grid { grid-template-columns: 1fr; }
	.mg-role-features { grid-template-columns: 1fr; }
	.mg-hero__stage { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; padding-bottom: 48px; }
	.mg-hero-shot { min-height: 0; }
	.mg-role-tabs {
		border-radius: 18px;
		justify-content: stretch;
	}
	.mg-role-tab { flex: 1 1 calc(50% - 8px); justify-content: center; }
	/* !important beats per-page inline column counts (3-up / 4-up) */
	.mg-stats { grid-template-columns: repeat(2, 1fr) !important; }
	.mg-client-boxes { grid-template-columns: 1fr; }
	.mg-cal { gap: 3px; }
	.mg-cal__cell { min-height: 52px; padding: 5px; border-radius: 8px; }
	.mg-cal__num { font-size: .8rem; }
	.mg-cal__stats em { font-size: .62rem; padding: 1px 4px; }
	.mg-cal__off { display: none; }
	.mg-modal-grid-2,
	.mg-modal-grid-3 { grid-template-columns: 1fr; }
	.mg-lineitem { grid-template-columns: minmax(0, 1fr) 64px 96px 34px; }
	.mg-lineitem__main { grid-column: 1 / -1; }
	.mg-lineitem__amt { display: none; }
	.mg-hero__stage { padding-top: 28px; }
	.mg-cta-band { flex-direction: column; align-items: flex-start; }
	.mg-cover-grid { grid-template-columns: repeat(2, 1fr); }
	.mg-public-link { display: none; }
	.mg-sidebar {
		position: fixed;
		inset: 0 auto 0 0;
		transform: translateX(-105%);
		transition: transform .2s ease;
		z-index: 50;
		overflow-y: auto;
	}
	.mg-app.nav-open .mg-sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.35); }
	.mg-app.nav-open::after {
		content: "";
		position: fixed;
		inset: 0;
		background: rgba(18, 32, 28, 0.45);
		z-index: 45;
	}
	.mg-menu-btn { display: inline-flex !important; }
}

/* ——— Mobile: tables become stacked cards ——— */
@media (max-width: 760px) {
	.mg-content { padding: 14px 12px calc(88px + env(safe-area-inset-bottom, 0px)); }

	.mg-bottombar {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		background: rgba(255, 255, 255, 0.97);
		backdrop-filter: blur(12px);
		border-top: 1px solid var(--mg-line);
		padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
		align-items: center;
	}
	.mg-bottombar__tab {
		flex: 1;
		min-width: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2px;
		padding: 4px 2px;
		color: var(--mg-muted);
		text-decoration: none !important;
		font-size: 0.66rem;
		font-weight: 600;
	}
	.mg-bottombar__tab i { font-size: 1.3rem; }
	.mg-bottombar__tab.is-active { color: var(--mg-teal-deep); }
	.mg-bottombar__tab span {
		max-width: 100%;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.mg-bottombar__fab {
		flex: none;
		width: 54px;
		height: 54px;
		margin: -26px 6px 0;
		border: none;
		border-radius: 50%;
		background: linear-gradient(145deg, #3b82f6, #1d4ed8);
		color: #fff;
		font-size: 1.5rem;
		display: grid;
		place-items: center;
		box-shadow: none;
		cursor: pointer;
	}
	.mg-bottombar__fab:active { transform: scale(0.96); }
	.mg-topbar { padding: 0 12px; gap: 8px; }
	.mg-topbar h1 {
		font-size: 1rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		min-width: 0;
	}
	.mg-topbar > div:first-child { min-width: 0; flex: 1; }
	.mg-topbar__tools { flex: none; }
	.mg-topbar__date { display: none; }
	.mg-topbar__create span { display: none; }
	.mg-topbar__create { padding-left: 10px; padding-right: 10px; }
	.mg-gsearch { width: 44px; }
	.mg-gsearch input {
		padding: 9px 0 9px 34px;
		border-color: transparent;
		background: transparent;
	}
	.mg-gsearch input:focus { border-color: var(--mg-teal); background: var(--mg-panel); }
	.mg-gsearch:focus-within {
		position: absolute;
		left: 56px;
		right: 12px;
		width: auto;
		z-index: 30;
		background: var(--mg-surface);
	}
	.mg-gsearch__results { position: fixed; top: 62px; left: 12px; right: 12px; width: auto; max-height: 60vh; }

	.mg-panel { padding: 14px; border-radius: 14px; }
	.mg-panel__head { flex-wrap: wrap; }
	.mg-stats { gap: 10px; }
	.mg-stat { padding: 14px; border-radius: 14px; }
	.mg-stat__value { font-size: 1.4rem; }
	.mg-stat__icon { width: 30px; height: 30px; margin-bottom: 8px; }

	.mg-toolbar { align-items: stretch; }
	.mg-toolbar > * { width: 100%; }
	.mg-toolbar .mg-btn { justify-content: center; }
	.mg-inline-form { gap: 8px; }
	.mg-inline-form .mg-form-group {
		flex: 1 1 calc(50% - 8px);
		min-width: calc(50% - 8px);
	}
	.mg-inline-form .mg-form-group:has(input[type="search"]),
	.mg-inline-form .mg-form-group:has(textarea) { flex-basis: 100%; min-width: 100%; }
	.mg-inline-form > .mg-btn { width: 100%; }

	.mg-table thead { display: none; }
	.mg-table, .mg-table tbody, .mg-table tfoot, .mg-table tr, .mg-table td { display: block; width: 100%; }
	.mg-table__total td { border-top: 0; background: transparent; }
	.mg-table tr.mg-table__total { background: var(--mg-sand); }
	.mg-table tr {
		border: 1px solid var(--mg-line);
		border-radius: 12px;
		padding: 8px 12px;
		margin-bottom: 8px;
		background: #fff;
	}
	.mg-table tr:last-child { margin-bottom: 0; }
	.mg-table td {
		border-bottom: 0;
		padding: 4px 0;
		font-size: 0.9rem;
	}
	/* Compact rows: label on the left, value on the right */
	.mg-table td[data-label] {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		text-align: right;
		min-width: 0;
	}
	.mg-table td[data-label]::before {
		content: attr(data-label);
		flex: none;
		font-size: 0.66rem;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.05em;
		color: var(--mg-muted);
		text-align: left;
	}
	.mg-table td[data-label] .mg-progress { flex: 1; max-width: 55%; }
	.mg-table td[data-label] small { white-space: normal; }
	.mg-table td > div[style] { justify-content: flex-start !important; }
	.mg-table td[data-label=""] { display: none; }
	.mg-doc-actions { justify-content: flex-start !important; flex-wrap: wrap; white-space: normal; }
	.mg-day-row { flex-wrap: wrap; padding: 12px; }
	.mg-day-row__date { min-width: 100%; }
	.mg-day-row__chev { display: none; }

	.mg-modal-grid-2,
	.mg-modal-grid-3 { grid-template-columns: 1fr; }

	.mg-grid-2 { gap: 12px; }
	.mg-meta-grid { grid-template-columns: repeat(2, 1fr) !important; }
	.mg-timeline__meta form { margin-left: 0 !important; }
	.mg-collapse > summary { padding: 12px 14px; }
	.mg-collapse__body { padding: 0 12px 12px; }
	.mg-check-grid { max-height: 200px; }
	.mg-hero-shot { padding: 18px; border-radius: 22px; }
	.mg-role-tabs { gap: 6px; padding: 5px; }
	.mg-role-tab { font-size: .84rem; padding: 0 10px; min-height: 38px; gap: 5px; }
	.mg-cover-grid { grid-template-columns: 1fr; }
	.mg-auth__panel { padding: 22px 18px; }
	.mg-pin-row { justify-content: space-between; }
	.mg-pin-row input { width: 15%; min-width: 40px; }
}
.mg-menu-btn { display: none; }
@media (min-width: 900px) {
	.mg-hero__stage { grid-template-columns: 1.1fr 0.9fr; }
}

/* Landing page — professional SaaS layout */
body.mg-landing {
	--mg-ink: #0f172a;
	--mg-muted: #64748b;
	--mg-line: #e2e8f0;
	--mg-surface: #ffffff;
	--mg-panel: #ffffff;
	--mg-teal: #2563eb;
	--mg-teal-deep: #1d4ed8;
	--mg-teal-soft: #eff6ff;
	--mg-amber: #d97706;
	--mg-yellow: #f59e0b;
	--mg-yellow-soft: #fffbeb;
	--mg-navy: #0f172a;
	--mg-font: "Plus Jakarta Sans", system-ui, sans-serif;
	--mg-display: "Plus Jakarta Sans", system-ui, sans-serif;
	--mg-shadow: none;
	--mg-shadow-lg: none;
	background: #ffffff;
	color: var(--mg-ink);
	font-size: 15px;
	line-height: 1.6;
}
body.mg-landing *,
body.mg-landing *::before,
body.mg-landing *::after {
	box-shadow: none !important;
	text-shadow: none !important;
}
body.mg-landing a { color: var(--mg-teal); text-decoration: none; }
body.mg-landing a:hover { color: var(--mg-teal-deep); }

/* Header */
body.mg-landing .mg-public-top {
	background: rgba(255, 255, 255, 0.92);
	border-bottom: 1px solid var(--mg-line);
	backdrop-filter: blur(8px);
	position: sticky;
	top: 0;
	z-index: 50;
}
body.mg-landing .mg-public-top__inner {
	height: 64px;
}
body.mg-landing .mg-brand__mark {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	font-size: 15px;
	background: var(--mg-navy);
	color: #fff;
}
body.mg-landing .mg-brand__name {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--mg-ink);
}
body.mg-landing .mg-public-link {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--mg-muted);
	padding: 8px 10px;
}
body.mg-landing .mg-public-link:hover {
	color: var(--mg-ink);
}
body.mg-landing .mg-btn {
	min-height: 40px;
	padding: 0 16px;
	font-size: 0.875rem;
	border-radius: 8px;
	font-weight: 600;
	letter-spacing: -0.01em;
}
body.mg-landing .mg-btn--primary {
	background: var(--mg-teal);
	color: #fff;
	border: 1px solid var(--mg-teal);
}
body.mg-landing .mg-btn--primary:hover {
	background: var(--mg-teal-deep);
	border-color: var(--mg-teal-deep);
}
body.mg-landing .mg-btn--ghost {
	border: 1px solid var(--mg-line);
	color: var(--mg-ink);
	background: #fff;
}
body.mg-landing .mg-btn--ghost:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
}
body.mg-landing .mg-btn--ghost-light {
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff;
	background: transparent;
}
body.mg-landing .mg-btn--ghost-light:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.5);
	color: #fff;
}

/* Layout */
body.mg-landing .mg-landing-main { background: #fff; }
body.mg-landing .mg-container { width: min(1080px, calc(100% - 48px)); }

body.mg-landing .mg-lp-kicker {
	margin: 0 0 10px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--mg-teal);
}

/* Hero */
body.mg-landing .mg-lp-hero {
	padding: 56px 0 48px;
	border-bottom: 1px solid var(--mg-line);
}
body.mg-landing .mg-lp-hero__grid {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 48px;
	align-items: center;
}
body.mg-landing .mg-lp-hero__grid > * {
	min-width: 0;
}
body.mg-landing .mg-lp-hero__title {
	margin: 0 0 16px;
	font-size: clamp(2rem, 4.2vw, 2.75rem);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--mg-ink);
}
body.mg-landing .mg-lp-hero__lede {
	margin: 0 0 28px;
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--mg-muted);
	max-width: 34rem;
}
body.mg-landing .mg-lp-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 24px;
}
body.mg-landing .mg-lp-trust {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	font-size: 0.84rem;
	color: var(--mg-muted);
}
body.mg-landing .mg-lp-trust li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
body.mg-landing .mg-lp-trust i {
	color: var(--mg-teal);
	font-size: 1rem;
}

/* Preview panel */
body.mg-landing .mg-lp-preview {
	border: 1px solid var(--mg-line);
	border-radius: 12px;
	background: #ffffff;
	overflow: visible;
	filter: none;
}
body.mg-landing .mg-lp-preview__head {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--mg-line);
	background: #fff;
	font-size: 0.8rem;
	color: var(--mg-muted);
}
body.mg-landing .mg-lp-preview__head strong {
	margin-left: 6px;
	font-weight: 600;
	color: var(--mg-ink);
}
body.mg-landing .mg-lp-preview__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #cbd5e1;
	flex: none;
}
body.mg-landing .mg-lp-preview__dot--amber { background: #fbbf24; }
body.mg-landing .mg-lp-preview__dot--blue { background: #60a5fa; }
body.mg-landing .mg-lp-preview__list {
	list-style: none;
	margin: 0;
	padding: 0;
	background: #fff;
}
body.mg-landing .mg-lp-preview__list li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--mg-line);
}
body.mg-landing .mg-lp-preview__list li:last-child {
	border-bottom: 0;
}
body.mg-landing .mg-lp-preview__icon {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid var(--mg-line);
	color: var(--mg-teal);
	font-size: 1.05rem;
	flex: none;
	line-height: 1;
}
body.mg-landing .mg-lp-preview__icon .ti {
	display: block;
	line-height: 1;
	vertical-align: 0;
	margin: 0;
	padding: 0;
	width: 1em;
	height: 1em;
	text-align: center;
}
body.mg-landing .mg-lp-preview__icon .ti::before {
	display: block;
	line-height: 1;
	vertical-align: 0;
}
body.mg-landing .mg-lp-preview__body {
	flex: 1;
	min-width: 0;
}
body.mg-landing .mg-lp-preview__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 2px;
}
body.mg-landing .mg-lp-preview__list strong {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--mg-ink);
}
body.mg-landing .mg-lp-preview__list span {
	display: block;
	font-size: 0.8125rem;
	color: var(--mg-muted);
	line-height: 1.45;
	word-break: normal;
	overflow-wrap: anywhere;
}
body.mg-landing .mg-lp-preview__list em {
	font-style: normal;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--mg-teal);
	white-space: nowrap;
	flex: none;
}

/* Audience strip */
body.mg-landing .mg-lp-strip {
	padding: 18px 0;
	background: #f8fafc;
	border-bottom: 1px solid var(--mg-line);
}
body.mg-landing .mg-lp-strip__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
}
body.mg-landing .mg-lp-strip__inner > p {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--mg-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
body.mg-landing .mg-lp-strip ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
body.mg-landing .mg-lp-strip li {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--mg-ink);
	padding: 6px 12px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--mg-line);
}

/* Sections */
body.mg-landing .mg-lp-section {
	padding: 72px 0;
}
body.mg-landing .mg-lp-section--muted {
	background: #f8fafc;
	border-top: 1px solid var(--mg-line);
	border-bottom: 1px solid var(--mg-line);
}
body.mg-landing .mg-lp-section__head {
	max-width: 560px;
	margin: 0 auto 40px;
	text-align: center;
}
body.mg-landing .mg-lp-section__head--narrow {
	margin-bottom: 32px;
}
body.mg-landing .mg-lp-section__head h2 {
	margin: 0 0 10px;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--mg-ink);
}
body.mg-landing .mg-lp-section__head p {
	margin: 0;
	font-size: 1rem;
	color: var(--mg-muted);
	line-height: 1.6;
}

/* Feature modules */
body.mg-landing .mg-lp-modules {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}
body.mg-landing .mg-lp-module {
	padding: 24px;
	border-radius: 12px;
	border: 1px solid var(--mg-line);
	background: #fff;
}
body.mg-landing .mg-lp-section--muted .mg-lp-module {
	background: #fff;
}
body.mg-landing .mg-lp-module h3 {
	margin: 0 0 14px;
	font-size: 1rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--mg-ink);
}
body.mg-landing .mg-lp-module h3 i {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	background: var(--mg-teal-soft);
	color: var(--mg-teal);
	font-size: 1.1rem;
	flex: none;
}
body.mg-landing .mg-lp-module ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
body.mg-landing .mg-lp-module li {
	position: relative;
	padding: 0 0 0 18px;
	margin-bottom: 10px;
	font-size: 0.875rem;
	color: var(--mg-muted);
	line-height: 1.5;
}
body.mg-landing .mg-lp-module li:last-child { margin-bottom: 0; }
body.mg-landing .mg-lp-module li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--mg-teal);
}

/* Roles */
body.mg-landing .mg-lp-roles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
body.mg-landing .mg-lp-role {
	padding: 24px;
	border-radius: 12px;
	border: 1px solid var(--mg-line);
	background: #fff;
}
body.mg-landing .mg-lp-role__tag {
	display: inline-block;
	margin-bottom: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: var(--mg-teal-soft);
	color: var(--mg-teal-deep);
}
body.mg-landing .mg-lp-role h3 {
	margin: 0 0 8px;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--mg-ink);
}
body.mg-landing .mg-lp-role p {
	margin: 0;
	font-size: 0.875rem;
	color: var(--mg-muted);
	line-height: 1.55;
}

/* Steps */
body.mg-landing .mg-lp-steps {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: 720px;
	display: grid;
	gap: 0;
}
body.mg-landing .mg-lp-steps li {
	display: grid;
	grid-template-columns: 40px 1fr;
	gap: 16px;
	padding: 20px 0;
	border-bottom: 1px solid var(--mg-line);
}
body.mg-landing .mg-lp-steps li:last-child { border-bottom: 0; }
body.mg-landing .mg-lp-steps li > span {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	background: var(--mg-navy);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
}
body.mg-landing .mg-lp-steps li:nth-child(2) > span {
	background: var(--mg-teal);
}
body.mg-landing .mg-lp-steps h3 {
	margin: 0 0 4px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--mg-ink);
}
body.mg-landing .mg-lp-steps p {
	margin: 0;
	font-size: 0.875rem;
	color: var(--mg-muted);
}

/* Pricing */
body.mg-landing .mg-lp-pricing {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	max-width: 720px;
	margin: 0 auto;
}
body.mg-landing .mg-lp-plan {
	position: relative;
	padding: 28px 24px;
	border-radius: 12px;
	border: 1px solid var(--mg-line);
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
body.mg-landing .mg-lp-plan--featured {
	border-color: var(--mg-teal);
	border-width: 2px;
}
body.mg-landing .mg-lp-plan__badge {
	position: absolute;
	top: 16px;
	right: 16px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--mg-yellow-soft);
	color: #92400e;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
body.mg-landing .mg-lp-plan h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: var(--mg-ink);
}
body.mg-landing .mg-lp-plan__price {
	margin: 0;
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--mg-ink);
	line-height: 1.1;
}
body.mg-landing .mg-lp-plan__price small {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--mg-muted);
}
body.mg-landing .mg-lp-plan ul {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
}
body.mg-landing .mg-lp-plan li {
	position: relative;
	padding: 0 0 0 20px;
	margin-bottom: 8px;
	font-size: 0.875rem;
	color: var(--mg-muted);
}
body.mg-landing .mg-lp-plan li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--mg-teal);
	font-weight: 700;
	font-size: 0.8rem;
}

/* CTA */
body.mg-landing .mg-lp-cta {
	padding: 56px 0 72px;
	background: var(--mg-navy);
	color: #fff;
}
body.mg-landing .mg-lp-cta__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}
body.mg-landing .mg-lp-cta h2 {
	margin: 0 0 6px;
	font-size: clamp(1.35rem, 2.5vw, 1.75rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
}
body.mg-landing .mg-lp-cta p {
	margin: 0;
	font-size: 0.95rem;
	color: #94a3b8;
}
body.mg-landing .mg-lp-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
body.mg-landing .mg-lp-cta .mg-btn--primary {
	background: #fff;
	color: var(--mg-navy);
	border-color: #fff;
}
body.mg-landing .mg-lp-cta .mg-btn--primary:hover {
	background: #f1f5f9;
	border-color: #f1f5f9;
}

/* Footer */
body.mg-landing .mg-public-footer {
	padding: 24px 0 32px;
	background: #fff;
	border-top: 1px solid var(--mg-line);
}
body.mg-landing .mg-public-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 0.875rem;
	color: var(--mg-muted);
}
body.mg-landing .mg-public-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}
body.mg-landing .mg-public-footer__links a {
	color: var(--mg-muted);
	font-weight: 500;
}
body.mg-landing .mg-public-footer__links a:hover {
	color: var(--mg-ink);
}

@media (max-width: 899px) {
	body.mg-landing .mg-lp-hero__grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}
	body.mg-landing .mg-lp-hero {
		padding: 40px 0 36px;
	}
	body.mg-landing .mg-lp-modules {
		grid-template-columns: 1fr;
	}
	body.mg-landing .mg-lp-roles {
		grid-template-columns: 1fr;
	}
	body.mg-landing .mg-lp-pricing {
		grid-template-columns: 1fr;
	}
	body.mg-landing .mg-lp-cta__inner {
		flex-direction: column;
		align-items: flex-start;
	}
	body.mg-landing .mg-lp-section {
		padding: 56px 0;
	}
}
@media (max-width: 560px) {
	body.mg-landing .mg-container { width: calc(100% - 32px); }
	body.mg-landing .mg-public-nav .mg-public-link { display: none; }
	body.mg-landing .mg-lp-hero__actions .mg-btn { width: 100%; }
	body.mg-landing .mg-lp-cta__actions { width: 100%; }
	body.mg-landing .mg-lp-cta__actions .mg-btn { flex: 1; }
}
