/* Full-screen page preloader. Painted before content, fades out on window load
   (js/core/preloader.js). Token-driven with literal fallbacks so layouts that
   skip tokens.css (auth) still render correctly. */
#app-preloader {
	position: fixed;
	inset: 0;
	z-index: 20000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--nm-bg, #eef1f4);
	transition: opacity .45s ease, visibility .45s ease;
}

#app-preloader.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.preloader-stack {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
}

.preloader-ring {
	position: relative;
	width: 84px;
	height: 84px;
}

.preloader-ring::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 3px solid var(--glass-border, rgba(0, 0, 0, .08));
}

.preloader-ring::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 3px solid transparent;
	border-top-color: var(--nm-accent, #6ea84a);
	border-right-color: var(--nm-accent-2, #8fc56a);
	animation: preloader-spin .8s linear infinite;
}

.preloader-logo {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.preloader-logo img {
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.preloader-label {
	font-family: 'Nunito', sans-serif;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-size: .72rem;
	color: var(--nm-muted, #7a8794);
	animation: preloader-pulse 1.4s ease-in-out infinite;
}

@keyframes preloader-spin {
	to { transform: rotate(360deg); }
}

@keyframes preloader-pulse {
	0%, 100% { opacity: .45; }
	50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.preloader-ring::after { animation-duration: 1.6s; }
	.preloader-label { animation: none; }
}
