/* Manager login — extensiones sobre ynex signin-cover (sin bridge legacy) */

.authentication .authentication-brand.desktop-logo,
.authentication .authentication-brand.desktop-dark {
	max-height: 5rem;
	max-width: min(100%, 320px);
	width: auto;
	height: auto;
	object-fit: contain;
}

.authentication .form-switch {
	padding-left: 0;
	min-height: 1.5rem;
	display: flex;
	align-items: center;
	margin-bottom: 0;
}

.authentication .form-switch .form-check-input {
	cursor: pointer;
	float: none;
	width: 2.5rem !important;
	height: 1.35rem !important;
	margin: 0 !important;
	border-radius: 2rem !important;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e") !important;
	background-position: left center !important;
	background-repeat: no-repeat !important;
	background-size: contain !important;
	background-color: rgba(0, 0, 0, 0.15) !important;
	border: 1px solid transparent !important;
	box-shadow: none !important;
	transition: background-position 0.15s ease-in-out, background-color 0.15s ease-in-out;
	appearance: none;
	-webkit-appearance: none;
}

.authentication .form-switch .form-check-input:focus {
	box-shadow: 0 0 0 0.15rem rgba(var(--primary-rgb), 0.2) !important;
	border-color: transparent !important;
}

.authentication .form-switch .form-check-input:checked {
	background-position: right center !important;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
}

.authentication .recover-password-rule.is-valid {
	color: var(--success, #198754);
}

.authentication .recover-password-rule.is-valid i {
	color: var(--success, #198754);
}

.authentication .recover-password-rule.is-invalid-active {
	color: var(--danger, #dc3545);
}

.authentication .recover-password-rule.is-invalid-active i {
	color: var(--danger, #dc3545);
}

/* Login — modo oscuro (plantilla-login no carga manager-ynex-bridge.css) */
[data-theme-mode="dark"] body.bg-white {
	background-color: var(--default-body-bg-color, rgb(var(--body-bg-rgb2, 37, 39, 41))) !important;
}

[data-theme-mode="dark"] .authentication .form-label,
[data-theme-mode="dark"] .authentication .h5,
[data-theme-mode="dark"] .authentication .text-default {
	color: var(--default-text-color, rgba(255, 255, 255, 0.9)) !important;
}

[data-theme-mode="dark"] .authentication .text-muted,
[data-theme-mode="dark"] .authentication .op-7,
[data-theme-mode="dark"] .authentication .fs-12.text-muted {
	color: var(--text-muted, rgba(255, 255, 255, 0.55)) !important;
}

[data-theme-mode="dark"] .authentication .form-control,
[data-theme-mode="dark"] .authentication .form-control-lg {
	background-color: var(--form-control-bg, #232628) !important;
	border-color: var(--input-border, #313335) !important;
	color: var(--default-text-color, rgba(255, 255, 255, 0.9)) !important;
	caret-color: var(--default-text-color, rgba(255, 255, 255, 0.9));
}

[data-theme-mode="dark"] .authentication .form-control::placeholder,
[data-theme-mode="dark"] .authentication .form-control-lg::placeholder {
	color: var(--text-muted, rgba(255, 255, 255, 0.45)) !important;
	opacity: 1;
}

[data-theme-mode="dark"] .authentication .form-control:focus,
[data-theme-mode="dark"] .authentication .form-control-lg:focus {
	background-color: var(--form-control-bg, #2a2e32) !important;
	border-color: var(--primary-color) !important;
	color: var(--default-text-color, rgba(255, 255, 255, 0.95)) !important;
	box-shadow: 0 0 0 0.15rem rgba(var(--primary-rgb), 0.25) !important;
}

/* Chrome/Safari autofill: evita el recuadro blanco/azul al seleccionar credenciales */
[data-theme-mode="dark"] .authentication .form-control:-webkit-autofill,
[data-theme-mode="dark"] .authentication .form-control:-webkit-autofill:hover,
[data-theme-mode="dark"] .authentication .form-control:-webkit-autofill:focus,
[data-theme-mode="dark"] .authentication .form-control:-webkit-autofill:active,
[data-theme-mode="dark"] .authentication .form-control-lg:-webkit-autofill,
[data-theme-mode="dark"] .authentication .form-control-lg:-webkit-autofill:hover,
[data-theme-mode="dark"] .authentication .form-control-lg:-webkit-autofill:focus,
[data-theme-mode="dark"] .authentication .form-control-lg:-webkit-autofill:active,
[data-theme-mode="dark"] .authentication .form-control:-internal-autofill-selected,
[data-theme-mode="dark"] .authentication .form-control-lg:-internal-autofill-selected {
	-webkit-text-fill-color: var(--default-text-color, rgba(255, 255, 255, 0.9)) !important;
	caret-color: var(--default-text-color, rgba(255, 255, 255, 0.9));
	-webkit-box-shadow: 0 0 0 1000px var(--form-control-bg, #232628) inset !important;
	box-shadow: 0 0 0 1000px var(--form-control-bg, #232628) inset !important;
	transition: background-color 99999s ease-out 0s;
}

[data-theme-mode="dark"] .authentication .form-control:-webkit-autofill:focus,
[data-theme-mode="dark"] .authentication .form-control-lg:-webkit-autofill:focus,
[data-theme-mode="dark"] .authentication .form-control:-internal-autofill-selected:focus,
[data-theme-mode="dark"] .authentication .form-control-lg:-internal-autofill-selected:focus {
	-webkit-box-shadow: 0 0 0 1000px var(--form-control-bg, #2a2e32) inset, 0 0 0 0.15rem rgba(var(--primary-rgb), 0.25) !important;
	box-shadow: 0 0 0 1000px var(--form-control-bg, #2a2e32) inset, 0 0 0 0.15rem rgba(var(--primary-rgb), 0.25) !important;
}

[data-theme-mode="dark"] .authentication .input-group .btn-light {
	background-color: var(--form-control-bg, #232628) !important;
	border-color: var(--input-border, #313335) !important;
	color: var(--default-text-color, rgba(255, 255, 255, 0.75)) !important;
}

[data-theme-mode="dark"] .authentication .input-group .btn-light:hover {
	background-color: var(--list-hover-focus-bg, rgba(255, 255, 255, 0.08)) !important;
	color: var(--default-text-color, #fff) !important;
}

[data-theme-mode="dark"] .authentication .input-group .form-control,
[data-theme-mode="dark"] .authentication .input-group .form-control-lg {
	border-right: 0 !important;
}

[data-theme-mode="dark"] .authentication .form-switch .form-check-input {
	background-color: rgba(255, 255, 255, 0.18) !important;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.55%29'/%3e%3c/svg%3e") !important;
}

[data-theme-mode="dark"] .authentication .authentication-barrier span {
	background: var(--default-body-bg-color, rgb(var(--body-bg-rgb2, 37, 39, 41)));
	color: var(--text-muted, rgba(255, 255, 255, 0.55));
}

[data-theme-mode="dark"] .authentication .btn-light,
[data-theme-mode="dark"] .authentication .btn-icon.btn-light {
	background-color: var(--form-control-bg, #232628) !important;
	border-color: var(--input-border, #313335) !important;
	color: var(--default-text-color, rgba(255, 255, 255, 0.85)) !important;
}

[data-theme-mode="dark"] .authentication .alert-danger {
	background-color: rgba(220, 53, 69, 0.2);
	border-color: rgba(220, 53, 69, 0.35);
	color: #ffb3b8;
}

/* SweetAlert (manager-swal.js) — overlay centrado; plantilla-login no carga ynex-bridge/compat */
.agent-swal-overlay {
	position: fixed;
	inset: 0;
	z-index: 10060;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	pointer-events: none;
	visibility: hidden;
}

.agent-swal-overlay.is-visible {
	pointer-events: auto;
	visibility: visible;
}

.agent-swal-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	opacity: 0;
	transition: opacity 0.28s ease;
}

.agent-swal-overlay.is-visible .agent-swal-overlay__backdrop {
	opacity: 1;
}

.agent-swal-overlay__dialog {
	position: relative;
	z-index: 1;
	width: min(24rem, 100%);
	transform: translateY(0.75rem) scale(0.94);
	opacity: 0;
	transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.agent-swal-overlay.is-visible .agent-swal-overlay__dialog {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.agent-swal-overlay .agent-swal-alert {
	box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.2);
	border-radius: 0.5rem;
	background-color: var(--custom-white, #fff);
}

.agent-swal-overlay .agent-swal-alert .btn-close {
	padding: 0;
	margin-block-end: 0.35rem;
	background: transparent;
	opacity: 0.65;
	box-shadow: none;
}

.agent-swal-overlay .agent-swal-alert .btn-close:hover {
	opacity: 1;
}

.agent-swal-overlay .agent-swal-alert .btn-close i {
	font-size: 1.1rem;
	line-height: 1;
	color: var(--primary-color, #845adf);
}

.agent-swal-overlay .agent-swal-alert h5 {
	color: var(--default-text-color);
}

.agent-swal-overlay .agent-swal-alert p {
	margin-block-end: 1.25rem;
	color: var(--text-muted, #6c757d);
	font-size: 0.8rem;
}

.agent-swal-overlay .agent-swal-alert [data-agent-swal-actions] {
	padding-bottom: 0.35rem;
}

body.agent-swal-open {
	overflow: hidden !important;
}

.sweet-overlay,
.sweet-alert {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.agent-swal-overlay__backdrop,
	.agent-swal-overlay__dialog {
		transition: none !important;
	}
}
