/* -- Arranque: portada #dacs-splash (_Host.cshtml), <Authorizing> de App.razor y Loader.razor --
   Mismo look en los tres para que el relevo no parpadee (plan 2026-10-14-ux-estados-carga).
   z 9998: por debajo del modal de reconexión (9999), que debe verse si el circuito no levanta. */
.dacs-boot {
	position: fixed;
	inset: 0;
	z-index: 9998;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	background: var(--dacs-surface, #fff);
	color: var(--dacs-text, #111827);
	font-family: var(--dacs-font-sans, 'Inter', 'Segoe UI', sans-serif);
	transition: opacity 0.3s ease-out;
}

.dacs-boot-brand {
	font-family: var(--dacs-font-display, 'Outfit', 'Inter', sans-serif);
	font-size: 28px;
	font-weight: 600;
	letter-spacing: 0.4em;
	/* letter-spacing deja hueco tras la última letra: se compensa para centrar. */
	margin-right: -0.4em;
}

.dacs-boot-ring {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 3px solid var(--dacs-border, #e5e7eb);
	border-top-color: var(--dacs-color-primary, #2563eb);
	animation: spin 0.9s linear infinite;
}

.dacs-boot-text {
	font-size: 13px;
	color: var(--dacs-text-muted, #6b7280);
}

@media (prefers-reduced-motion: reduce) {
	.dacs-boot-ring { animation-duration: 2.4s; }
}

/* Loader.razor oculto: por toggleSpinner(false) (.hidden) o porque la app ya arrancó en esta pestaña
   (html.dacs-booted, ver app.js toggleSpinner): un layout nuevo no vuelve a tapar en blanco. */
#loading-spinner.hidden,
html.dacs-booted #loading-spinner {
	opacity: 0;
	pointer-events: none;
}

/* Oculto por opacidad, el anillo seguía girando (getAnimations() → spin running): CPU/batería en kiosko. */
#loading-spinner.hidden .dacs-boot-ring,
html.dacs-booted #loading-spinner .dacs-boot-ring {
	animation: none;
}

/* Overlay de peticiones (toggleAjax): spinner grande con scope propio, no .spinner-border global. */
.loader-overlay .loader-overlay-spinner {
	width: 3rem;
	height: 3rem;
}

/* Skeletons del shell sobre fondo oscuro (navbar/sidebar): .dash-skel (dash.css) atenuado. */
.navuser-skel-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	opacity: 0.3;
}

.navuser-skel-name {
	display: inline-block;
	width: 96px;
	height: 12px;
	vertical-align: middle;
	opacity: 0.3;
}

.sidebar-skel .nav-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	pointer-events: none;
}

.sidebar-skel .sidebar-skel-icon {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	border-radius: 6px;
	opacity: 0.25;
}

.sidebar-skel .sidebar-skel-label {
	height: 10px;
	opacity: 0.25;
}

.sidebar-load-error .nav-link {
	background: transparent;
	border: 0;
	color: var(--dacs-sev-warn, #f59e0b);
}

@keyframes pulse {
	0% {
		transform: scale(0.6);
		opacity: 1;
	}

	50% {
		transform: scale(1.2);
		opacity: 0;
	}

	100% {
		transform: scale(0.6);
		opacity: 1;
	}
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

#blazor-error-ui {
	background: lightyellow;
	bottom: 0;
	box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
	display: none;
	left: 0;
	padding: 0.6rem 1.25rem 0.7rem 1.25rem;
	position: fixed;
	width: 100%;
	z-index: 1000;
}

	#blazor-error-ui .dismiss {
		cursor: pointer;
		position: absolute;
		right: 0.75rem;
		top: 0.5rem;
	}

.blazor-error-boundary {
	background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCki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IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
	padding: 1rem 1rem 1rem 3.7rem;
	color: white;
}

	.blazor-error-boundary::after {
		content: "An error has occurred."
	}

/* Collapsed (mini) sidebar: keep it in flow so unfolding pushes content
   instead of overlaying it. Overrides Limitless layout_2 default
   position:absolute on .sidebar-main-resized (>= lg only). Below lg the theme
   keeps the sidebar off-canvas (position:fixed); forcing relative there left a
   72px empty column on phones. */
@media (min-width: 992px) {
	.sidebar-main.sidebar-main-resized:not(.sidebar-collapsed) {
		position: relative !important;
		transition: none;
	}

	.sidebar-main.sidebar-main-resized:not(.sidebar-collapsed) + * {
		margin-left: 0 !important;
	}
}

/* Make the mini sidebar a bit wider so icons breathe (>= lg: below lg the
   sidebar is the off-canvas drawer and keeps the theme width, with labels). */
@media (min-width: 992px) {
	.sidebar-main.sidebar-main-resized:not(.sidebar-collapsed):not(.sidebar-main-unfold) {
		--sidebar-width: 4.5rem !important;
		--bs-sidebar-width: 4.5rem !important;
	}
}
