/*
 * Login / register background — CSS only (no images). Copy of dashboard-test views/assets/css/tpl/tpl-auth-bg.css
 * (other vhost), used by the plan picker and process.php.
 * Near-white base, thin light-blue grid lines, a sky-blue glow rising from the bottom left,
 * a soft periwinkle glow on the right and a bright centre behind the card.
 * Markup (first child of <body>):
 *   <div class="auth-bg" aria-hidden="true">
 *     <span class="auth-bg__glow auth-bg__glow--1"></span>
 *     <span class="auth-bg__glow auth-bg__glow--2"></span>
 *     <span class="auth-bg__glow auth-bg__glow--3"></span>
 *     <span class="auth-bg__grid"></span>
 *   </div>
 */

/* Fallback colour on <html> only: a body background would paint over the z-index:-1 layer. */
html {
	background: #f7fafd;
}
body.auth-bg-page {
	background: transparent;
}

.auth-bg {
	position: fixed;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
	background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 55%, #eef4fa 100%);
}

/* Glows are radial gradients (no filter: blur), so they stay cheap on phones. */
.auth-bg__glow {
	position: absolute;
	border-radius: 50%;
	will-change: transform;
}

/* Sky-blue glow rising from the bottom left */
.auth-bg__glow--1 {
	width: 85vmax;
	height: 85vmax;
	bottom: -48vmax;
	left: -30vmax;
	background: radial-gradient(circle at center,
		rgba(120, 196, 228, 0.75) 0%,
		rgba(140, 205, 233, 0.45) 30%,
		rgba(160, 214, 238, 0) 65%);
	animation: auth-bg-drift-1 34s ease-in-out infinite alternate;
}

/* Soft periwinkle glow on the right */
.auth-bg__glow--2 {
	width: 70vmax;
	height: 70vmax;
	top: 10%;
	right: -34vmax;
	background: radial-gradient(circle at center,
		rgba(178, 198, 236, 0.6) 0%,
		rgba(190, 207, 238, 0.3) 35%,
		rgba(200, 214, 240, 0) 65%);
	animation: auth-bg-drift-2 40s ease-in-out infinite alternate;
}

/* Bright centre behind the card */
.auth-bg__glow--3 {
	width: 70vmax;
	height: 55vmax;
	top: 4%;
	left: 50%;
	margin-left: -35vmax;
	background: radial-gradient(ellipse at center,
		rgba(255, 255, 255, 0.9) 0%,
		rgba(255, 255, 255, 0.55) 35%,
		rgba(255, 255, 255, 0) 70%);
}

/* Thin grid lines, strongest at the top, fading out towards the bottom */
.auth-bg__grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, rgba(140, 170, 205, 0.16) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(140, 170, 205, 0.16) 1px, transparent 1px);
	background-size: 56px 56px;
	background-position: center top;
	-webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.75) 55%, rgba(0, 0, 0, 0.35) 100%);
	mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.75) 55%, rgba(0, 0, 0, 0.35) 100%);
}

@keyframes auth-bg-drift-1 {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(6vmax, -4vmax, 0) scale(1.06); }
}

@keyframes auth-bg-drift-2 {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(-6vmax, 5vmax, 0) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
	.auth-bg__glow {
		animation: none;
	}
}

/* Text that sits directly on the background (not inside a card). */
.auth-bg-text {
	color: #1f3b57;
}
.auth-bg-text a {
	color: #116dff;
}
