/* OncoCRM — pantalla de acceso: tarjeta de vidrio sobre un fondo de cintas de
   luz en movimiento (acceso.js las dibuja; sin JavaScript quedan los halos). */
:root {
	--navy: #0b3a5e;
	--tinta: #082a45;
	--noche: #041523;
	--acento: #3aa8dc;
	--cielo: #8fdcff;
	--vidrio: rgb(255 255 255 / 9%);
	--filo: rgb(255 255 255 / 20%);
	--tenue: rgb(255 255 255 / 68%);
	--suave: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.acceso {
	position: relative;
	min-height: 100dvh;
	margin: 0;
	padding: 28px 20px;
	display: grid;
	place-items: center;
	overflow-x: hidden;
	color: #fff;
	font: 15px/1.5 "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	background:
		radial-gradient(ellipse 70% 60% at 85% 0%, rgb(58 168 220 / 22%), transparent 70%),
		linear-gradient(160deg, var(--noche) 0%, var(--tinta) 55%, #06223a 100%);
}

/* Fondo ------------------------------------------------------------------- */
.acceso__fondo,
.acceso__halos,
.acceso__velo {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* El lienzo se dibuja a media resolución y el desenfoque lo vuelve luz. */
.acceso__fondo {
	filter: blur(18px) saturate(1.25);
	transform: scale(1.08);
	opacity: 0;
	transition: opacity 1.4s ease;
}

.acceso__fondo.is-vivo { opacity: 0.95; }

.acceso__halos::before,
.acceso__halos::after {
	content: "";
	position: absolute;
	width: 62vmax;
	height: 62vmax;
	border-radius: 50%;
	filter: blur(70px);
	opacity: 0.5;
	animation: halo 22s ease-in-out infinite alternate;
}

.acceso__halos::before {
	top: -24vmax;
	left: -18vmax;
	background: radial-gradient(circle, rgb(58 168 220 / 75%), transparent 65%);
}

.acceso__halos::after {
	right: -22vmax;
	bottom: -28vmax;
	background: radial-gradient(circle, rgb(27 94 153 / 85%), transparent 65%);
	animation-duration: 28s;
	animation-direction: alternate-reverse;
}

/* Oscurece los bordes para que la tarjeta y el texto se lean siempre. */
.acceso__velo {
	background:
		radial-gradient(ellipse 120% 90% at 50% 50%, transparent 40%, rgb(4 21 35 / 72%) 100%),
		linear-gradient(90deg, rgb(4 21 35 / 55%) 0%, transparent 45%);
}

@keyframes halo {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to { transform: translate3d(9vmax, 6vmax, 0) scale(1.18); }
}

/* Escena ------------------------------------------------------------------ */
.acceso__escena {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1040px;
	display: grid;
	gap: 30px;
}

.acceso__hola {
	text-align: center;
	animation: subir 0.9s var(--suave) both;
}

.acceso__marca {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 20px;
	padding: 6px 16px 6px 6px;
	border: 1px solid var(--filo);
	border-radius: 999px;
	background: var(--vidrio);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	font-weight: 600;
	letter-spacing: 0.02em;
}

.acceso__marca img {
	display: block;
	border-radius: 50%;
}

.acceso h1 {
	margin: 0;
	font-size: clamp(38px, 7vw, 76px);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.acceso h1 em {
	font-family: "Instrument Serif", Georgia, serif;
	font-style: italic;
	font-weight: 400;
	letter-spacing: -0.01em;
	background: linear-gradient(100deg, #fff 10%, var(--cielo) 90%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	padding-right: 0.08em;
}

.acceso__sub {
	margin: 16px 0 0;
	font-size: clamp(15px, 1.5vw, 18px);
	color: var(--tenue);
}

/* Tarjeta de vidrio -------------------------------------------------------- */
.acceso__caja {
	--mx: 50%;
	--my: 0%;
	position: relative;
	width: 100%;
	max-width: 420px;
	margin-inline: auto;
	padding: clamp(26px, 5vw, 38px);
	border: 1px solid var(--filo);
	border-radius: 28px;
	background: linear-gradient(150deg, rgb(255 255 255 / 16%) 0%, rgb(255 255 255 / 5%) 60%, rgb(255 255 255 / 9%) 100%);
	-webkit-backdrop-filter: blur(26px) saturate(1.5);
	backdrop-filter: blur(26px) saturate(1.5);
	box-shadow:
		0 40px 90px -30px rgb(2 12 24 / 80%),
		0 1px 0 rgb(255 255 255 / 30%) inset,
		0 -1px 0 rgb(255 255 255 / 6%) inset;
	overflow: hidden;
	animation: subir 0.9s 0.12s var(--suave) both;
}

/* Reflejo que sigue al cursor. */
.acceso__caja::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(320px circle at var(--mx) var(--my), rgb(255 255 255 / 16%), transparent 65%);
	pointer-events: none;
	transition: opacity 0.4s;
}

.acceso__caja > * { position: relative; }

.acceso h2 {
	margin: 0 0 4px;
	font-size: 23px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.acceso__guia {
	margin: 0 0 24px;
	font-size: 14px;
	color: var(--tenue);
}

.acceso__campo {
	margin-bottom: 16px;
	animation: subir 0.8s var(--suave) both;
	animation-delay: calc(0.22s + var(--i, 0) * 0.07s);
}

.acceso label {
	display: block;
	margin-bottom: 7px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: rgb(255 255 255 / 84%);
}

.acceso__entrada {
	position: relative;
	display: flex;
	align-items: center;
}

.acceso__entrada > svg {
	position: absolute;
	left: 16px;
	width: 18px;
	height: 18px;
	color: rgb(255 255 255 / 55%);
	pointer-events: none;
	transition: color 0.3s;
}

.acceso__entrada:focus-within > svg { color: var(--cielo); }

.acceso input:not([type="checkbox"]) {
	width: 100%;
	height: 52px;
	padding: 0 16px 0 46px;
	border: 1px solid rgb(255 255 255 / 16%);
	border-radius: 16px;
	background: rgb(255 255 255 / 7%);
	color: #fff;
	font: inherit;
	font-size: 16px;
	outline: 0;
	transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.acceso input:not([type="checkbox"]):hover { border-color: rgb(255 255 255 / 30%); }

.acceso input:not([type="checkbox"]):focus {
	border-color: var(--cielo);
	background: rgb(255 255 255 / 12%);
	box-shadow: 0 0 0 4px rgb(58 168 220 / 28%);
}

/* El relleno automático del navegador no debe pintar la caja de amarillo. */
.acceso input:-webkit-autofill,
.acceso input:-webkit-autofill:focus {
	-webkit-text-fill-color: #fff;
	caret-color: #fff;
	transition: background-color 600000s 0s, color 600000s 0s;
}

.acceso .acceso__entrada--ojo input { padding-right: 52px; }

.acceso__ojo {
	position: absolute;
	right: 6px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: none;
	color: rgb(255 255 255 / 60%);
	cursor: pointer;
	transition: color 0.3s, background-color 0.3s;
}

.acceso__ojo:hover,
.acceso__ojo:focus-visible { color: #fff; background: rgb(255 255 255 / 10%); outline: 0; }
.acceso__ojo svg { width: 19px; height: 19px; }
.acceso__ojo .ojo-cerrado,
.acceso__ojo[aria-pressed="true"] .ojo-abierto { display: none; }
.acceso__ojo[aria-pressed="true"] .ojo-cerrado { display: block; }

.acceso__check {
	display: flex !important;
	align-items: center;
	gap: 11px;
	margin: 4px 0 22px !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	color: var(--tenue) !important;
	cursor: pointer;
}

.acceso__check input {
	appearance: none;
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1px solid rgb(255 255 255 / 34%);
	border-radius: 7px;
	background: rgb(255 255 255 / 7%) center / 12px no-repeat;
	cursor: pointer;
	transition: background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.acceso__check input:checked {
	border-color: var(--acento);
	background-color: var(--acento);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23082a45' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.acceso__check input:focus-visible { outline: 0; box-shadow: 0 0 0 4px rgb(58 168 220 / 30%); }

.acceso__entrar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 54px;
	border: 0;
	border-radius: 16px;
	background: linear-gradient(120deg, var(--acento) 0%, var(--cielo) 100%);
	color: var(--tinta);
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	overflow: hidden;
	box-shadow: 0 16px 34px -14px rgb(58 168 220 / 90%), 0 1px 0 rgb(255 255 255 / 55%) inset;
	transition: transform 0.35s var(--suave), box-shadow 0.35s var(--suave), filter 0.3s;
}

/* Brillo que cruza el botón al pasar el cursor. */
.acceso__entrar::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: -60%;
	width: 45%;
	background: linear-gradient(100deg, transparent, rgb(255 255 255 / 60%), transparent);
	transform: skewX(-18deg);
	transition: left 0.75s var(--suave);
}

.acceso__entrar:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -14px rgb(58 168 220 / 95%), 0 1px 0 rgb(255 255 255 / 55%) inset; }
.acceso__entrar:hover::before { left: 120%; }
.acceso__entrar:active { transform: translateY(0) scale(0.985); }
.acceso__entrar:focus-visible { outline: 0; box-shadow: 0 0 0 4px rgb(255 255 255 / 45%); }
.acceso__entrar svg { width: 18px; height: 18px; transition: transform 0.35s var(--suave); }
.acceso__entrar:hover svg { transform: translateX(4px); }

.acceso__entrar[disabled] {
	cursor: not-allowed;
	filter: saturate(0.35) brightness(0.85);
	transform: none;
	box-shadow: none;
}

.acceso__entrar[disabled]::before { display: none; }

.acceso__giro {
	display: none;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgb(8 42 69 / 25%);
	border-top-color: var(--tinta);
	border-radius: 50%;
	animation: giro 0.7s linear infinite;
}

.acceso__entrar.is-cargando .acceso__giro { display: block; }
.acceso__entrar.is-cargando svg { display: none; }

.acceso__error {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0 0 20px;
	padding: 12px 14px;
	border: 1px solid rgb(255 138 128 / 45%);
	border-radius: 14px;
	background: rgb(255 82 82 / 14%);
	color: #ffdcd8;
	font-size: 14px;
	animation: sacudir 0.5s var(--suave) both;
}

.acceso__error svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.acceso__error[hidden] { display: none; }

/* Primer ingreso: requisitos de la contraseña nueva, se encienden al cumplirse. */
.acceso__reglas {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin: 2px 0 22px;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: rgb(255 255 255 / 55%);
}

.acceso__reglas li {
	display: flex;
	align-items: center;
	gap: 8px;
	transition: color 0.3s;
}

.acceso__reglas i {
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border: 1px solid rgb(255 255 255 / 30%);
	border-radius: 50%;
	transition: background-color 0.3s, border-color 0.3s, transform 0.4s var(--suave);
}

.acceso__reglas svg {
	width: 10px;
	height: 10px;
	color: var(--tinta);
	opacity: 0;
	transition: opacity 0.3s;
}

.acceso__reglas .is-ok { color: #fff; }
.acceso__reglas .is-ok i { border-color: var(--cielo); background: var(--cielo); transform: scale(1.08); }
.acceso__reglas .is-ok svg { opacity: 1; }

.acceso__pie a {
	color: #fff;
	font-weight: 600;
	text-underline-offset: 3px;
}

.acceso__pie a:hover,
.acceso__pie a:focus-visible { color: var(--cielo); outline: 0; }

.acceso__pie {
	display: flex;
	gap: 9px;
	align-items: flex-start;
	margin: 20px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: rgb(255 255 255 / 55%);
}

.acceso__pie svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--cielo); }

@keyframes subir {
	from { opacity: 0; transform: translate3d(0, 22px, 0); }
	to { opacity: 1; transform: none; }
}

@keyframes sacudir {
	0% { opacity: 0; transform: translateX(-10px); }
	35% { opacity: 1; transform: translateX(7px); }
	60% { transform: translateX(-4px); }
	100% { transform: none; }
}

@keyframes giro {
	to { transform: rotate(360deg); }
}

/* Escritorio: saludo a la izquierda, tarjeta a la derecha. */
@media (min-width: 900px) {
	.acceso__escena {
		grid-template-columns: minmax(0, 1fr) 420px;
		align-items: center;
		gap: clamp(40px, 7vw, 96px);
	}

	.acceso__hola { text-align: left; }
	.acceso__caja { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.acceso *,
	.acceso *::before,
	.acceso *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
