/* =============================================
   Site shell polish — layout rhythm and footer bridge
   ============================================= */

body:not(.mb-admin-center-page) {
	background:
		radial-gradient(circle at 8% 0%, rgba(var(--mb-primary-rgb), 0.06), transparent 28rem),
		linear-gradient(180deg, #f6f9fd 0%, #eef3f8 100%);
}

body:not(.mb-admin-center-page) .mb-main {
	position: relative;
	isolation: isolate;
	background:
		linear-gradient(180deg, #f6f9fd 0%, #ffffff 16rem, #f5f8fc 58%, #eef3f8 100%);
	padding-bottom: clamp(56px, 7vw, 104px);
}

body:not(.mb-admin-center-page) .mb-main::before,
body:not(.mb-admin-center-page) .mb-main::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	z-index: -1;
	pointer-events: none;
}

body:not(.mb-admin-center-page) .mb-main::before {
	top: 0;
	height: min(520px, 52vw);
	background:
		radial-gradient(circle at 14% 8%, rgba(var(--mb-accent-rgb), 0.11), transparent 22rem),
		radial-gradient(circle at 88% 0%, rgba(var(--mb-primary-rgb), 0.10), transparent 24rem);
}

body:not(.mb-admin-center-page) .mb-main::after {
	bottom: 0;
	height: clamp(96px, 11vw, 164px);
	background:
		linear-gradient(180deg, rgba(238, 243, 248, 0), #eaf0f7 72%, #e5edf6 100%);
}

.mb-home-shell--sb,
.mb-site-page,
.mb-dashboard--pro,
.mb-archive-listings--v3 {
	position: relative;
}

.mb-home-shell--sb {
	padding-bottom: 0;
}

.mb-home-shell--sb > section,
.mb-home-shell--sb > div {
	position: relative;
}

.mb-home-top {
	background:
		radial-gradient(circle at 18% 0%, rgba(var(--mb-accent-rgb), 0.10), transparent 24rem),
		linear-gradient(180deg, rgba(255,255,255,0.78), rgba(246,249,253,0));
}

.mb-sb-board {
	padding-top: clamp(18px, 2.5vw, 30px);
	padding-bottom: clamp(38px, 5vw, 62px);
	background:
		linear-gradient(180deg, rgba(246,249,253,0) 0%, rgba(255,255,255,0.72) 18%, rgba(246,249,253,0.92) 100%);
}

.mb-sb-hub {
	margin-top: 0;
	padding: clamp(42px, 5vw, 68px) 0 clamp(48px, 6vw, 82px);
	background:
		radial-gradient(circle at 10% 0%, rgba(var(--mb-accent-rgb), 0.10), transparent 26rem),
		linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
	border-top: 1px solid rgba(30, 74, 140, 0.08);
	border-bottom: 0;
}

.mb-sb-hub::before {
	content: '';
	position: absolute;
	inset: 18px clamp(12px, 3vw, 42px);
	z-index: 0;
	border: 1px solid rgba(30, 74, 140, 0.08);
	border-radius: 34px;
	background: rgba(255, 255, 255, 0.44);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.84);
	pointer-events: none;
}

.mb-sb-hub > .mb-container {
	position: relative;
	z-index: 1;
}

.mb-home-recent--strip {
	margin: 0;
	padding: clamp(24px, 4vw, 42px) 0 clamp(54px, 6vw, 86px);
	background:
		linear-gradient(180deg, #eef4fb 0%, #eaf0f7 100%);
	border-top: 0;
}

.mb-home-recent--strip[hidden],
.mb-home-recent--strip:not(.is-ready) {
	display: none !important;
}

.mb-home-recent--strip .mb-container {
	padding: 18px;
	border: 1px solid rgba(30, 74, 140, 0.10);
	border-radius: 24px;
	background: rgba(255,255,255,0.78);
	box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
}

.mb-footer {
	margin-top: 0;
	padding: clamp(58px, 7vw, 88px) 0 0;
	border-top: 0;
	background:
		radial-gradient(circle at 12% 0%, rgba(var(--mb-accent-rgb), 0.16), transparent 20rem),
		radial-gradient(circle at 88% 8%, rgba(var(--mb-primary-rgb), 0.14), transparent 24rem),
		linear-gradient(180deg, #e5edf6 0%, #f8fafc 34%, #eef2f7 100%);
}

.mb-footer::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(var(--mb-accent-rgb), 0.72), transparent);
	pointer-events: none;
}

.mb-footer__hero {
	position: relative;
	overflow: hidden;
	padding: clamp(24px, 3vw, 34px);
	margin-bottom: 18px;
	border-radius: 26px;
	border: 1px solid rgba(255,255,255,0.18);
	box-shadow:
		0 24px 70px rgba(12, 31, 61, 0.20),
		inset 0 1px 0 rgba(255,255,255,0.18);
}

.mb-footer__hero::before {
	content: '';
	position: absolute;
	inset: -40% -10% auto auto;
	width: 360px;
	height: 360px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(var(--mb-accent-rgb), 0.28), transparent 64%);
	pointer-events: none;
}

.mb-footer__hero-copy,
.mb-footer__hero-actions {
	position: relative;
	z-index: 1;
}

.mb-footer__trust {
	margin-bottom: 22px;
}

.mb-footer__trust-item,
.mb-footer__grid {
	background: rgba(255,255,255,0.82);
	backdrop-filter: blur(12px);
}

.mb-footer__grid {
	padding: clamp(26px, 3vw, 36px);
	border: 1px solid rgba(30, 74, 140, 0.10);
	border-radius: 24px;
	box-shadow: 0 18px 54px rgba(15, 23, 42, 0.06);
}

.mb-footer__bottom {
	margin-top: 18px;
	border-top: 1px solid rgba(30, 74, 140, 0.08);
}

@media (max-width: 768px) {
	body:not(.mb-admin-center-page) .mb-main {
		padding-bottom: 56px;
	}

	.mb-sb-board {
		padding-bottom: 34px;
	}

	.mb-sb-hub {
		padding: 34px 0 44px;
	}

	.mb-sb-hub::before {
		inset: 10px 8px;
		border-radius: 24px;
	}

	.mb-home-recent--strip .mb-container,
	.mb-footer__grid {
		padding: 18px;
		border-radius: 20px;
	}

	.mb-footer {
		padding-top: 44px;
	}

	.mb-footer__hero {
		border-radius: 22px;
	}
}
