* {
	box-sizing: border-box;
}

html {
	background-color: #1e1e1e;
}

html, body {
	min-height: 100%;
	height: 100%;
}

body {
	margin: 0;
	font-family: "Manrope", sans-serif;
	color: #ffffff;
	background: url("../img/FONDO.jpg") 80% 25% / 120% no-repeat fixed;
	position: relative;
	overflow: hidden;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	background:
		radial-gradient(circle at 80% 40%, rgba(243, 197, 0, 0.18) 0%, transparent 52%),
		linear-gradient(120deg, rgba(10, 10, 10, 0.72), rgba(10, 10, 10, 0.48));
	pointer-events: none;
}

.login-phone {
	min-height: 100svh;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(1rem, 4vw, 4rem);
	padding: clamp(0.75rem, 2.5vw, 1.5rem);
	position: relative;
	z-index: 0;
	overflow: hidden;
}

.login-phone__layout {
	width: min(520px, 46vw);
	display: flex;
	align-items: center;
	justify-content: flex-end;
	max-height: calc(100svh - (clamp(0.75rem, 2.5vw, 1.5rem) * 2));
	overflow: visible;
	margin: 250px 100px 10px 10px;
}

.login-phone__info {
	width: min(720px, 54vw);
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	max-height: calc(100svh - (clamp(0.75rem, 2.5vw, 1.5rem) * 2));
	overflow: hidden;
}

.login-phone__info img {
	width: min(560px, 100%);
	height: auto;
	display: block;
	margin: 0;
	filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6));
}

.phone {
	width: 100%;
	display: flex;
	justify-content: flex-end;
	padding-right: clamp(0rem, 2.5vw, 1.75rem);
	overflow: visible;
}

.phone__device {
	height: min(calc(100svh - (clamp(0.75rem, 2.5vw, 1.5rem) * 2)), 840px);
	width: auto;
	margin: 0;
	max-width: 96vw;
	aspect-ratio: 100 / 200;
	border-radius: 52px;
	padding: 8px;
	background: linear-gradient(180deg, #0b0b0b, #171717 35%, #050505);
	border: 1px solid rgba(255, 255, 255, 0.10);
	box-shadow:
		0 28px 80px rgba(0, 0, 0, 0.65),
		inset 0 0 0 1px rgba(255, 255, 255, 0.07),
		inset 0 0 0 7px rgba(0, 0, 0, 0.86);
	position: relative;
	overflow: hidden;
	transition: box-shadow 200ms ease, border-color 200ms ease;
}

.phone__device:focus-within {
	border-color: color-mix(in srgb, var(--yellow) 40%, rgba(255, 255, 255, 0.10));
	box-shadow:
		0 28px 80px rgba(0, 0, 0, 0.65),
		0 0 0 2px color-mix(in srgb, var(--yellow) 22%, transparent),
		0 0 46px color-mix(in srgb, var(--yellow) 20%, transparent),
		inset 0 0 0 1px rgba(255, 255, 255, 0.07),
		inset 0 0 0 7px rgba(0, 0, 0, 0.86);
}

.phone__device::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 52px;
	background:
		linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.06) 22%, transparent 45%),
		radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.10), transparent 55%),
		radial-gradient(circle at 18% 80%, rgba(255, 255, 255, 0.06), transparent 52%);
	opacity: 0.55;
	pointer-events: none;
	z-index: 0;
}

.phone__device::after {
	content: "";
	position: absolute;
	inset: 8px;
	border-radius: 52px;
	border: 1px solid rgba(255, 255, 255, 0.10);
	pointer-events: none;
	z-index: 4;
	transition: border-color 200ms ease, box-shadow 200ms ease;
}

.phone__device:focus-within::after {
	border-color: color-mix(in srgb, var(--yellow) 45%, rgba(255, 255, 255, 0.10));
	box-shadow: 0 0 26px color-mix(in srgb, var(--yellow) 18%, transparent);
}

.phone__notch {
	position: absolute;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	width: 80px;
	height: 20px;
	background: rgba(0, 0, 0, 0.86);
	border-radius: 20px;
	z-index: 6;
	display: grid;
	place-items: center;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
	transition: box-shadow 200ms ease;
}

.phone__notch-camera {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, rgba(120, 196, 255, 0.85), rgba(20, 20, 20, 0.95));
	border: 1px solid rgba(255, 255, 255, 0.14);
	transform: translateX(30px);
	transition: box-shadow 200ms ease, background 200ms ease;
}

.phone__device:focus-within .phone__notch-camera {
	background: radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.98), rgba(230, 230, 230, 0.92));
	box-shadow:
		0 0 15px 15px rgba(255, 255, 255, 0.55),
		0 0 16px rgba(255, 255, 255, 0.55);
}

.phone__screen {
	height: 100%;
	border-radius: 42px;
	padding:
		clamp(3rem, 7vh, 3.5rem)
		clamp(1rem, 2.5vw, 1.3rem)
		clamp(0.8rem, 2vh, 1rem);
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.86));
	border: 1px solid rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	position: relative;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 2;
}

.phone__screen::-webkit-scrollbar {
	width: 0;
	background: transparent;
}

.phone__content {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1;
}

.phone__bottom {
	grid-row: 3;
	align-self: end;
	justify-self: center;
	padding-bottom: 0.25rem;
	margin-top: 0rem;
}

.phone__screen::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		url("../img/FONDO.jpg") 89% 80% / cover no-repeat fixed;
	filter: saturate(0.85) contrast(1.12) brightness(0.62);
	transform: scale(1.26);
	opacity: 0.60;
	pointer-events: none;
	z-index: 0;
}

.phone__screen::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 38% 34%, rgba(243, 197, 0, 0.40) 0%, rgba(243, 197, 0, 0.16) 34%, transparent 62%),
		linear-gradient(180deg, rgba(243, 197, 0, 0.14), rgba(0, 0, 0, 0.12) 42%, rgba(0, 0, 0, 0.55));
	opacity: 0.95;
	pointer-events: none;
	z-index: 0;
}

.phone__screen > * {
	position: relative;
	z-index: 1;
}

.phone__top {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
}

.phone__logo {
	height: clamp(56px, 9vh, 82px);
	width: auto;
	display: block;
	opacity: 0.98;
	filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
}

.phone__title {
	margin: 0;
	font-family: "Space Grotesk", sans-serif;
	letter-spacing: 0.06em;
	font-weight: 800;
	font-size: clamp(1.3rem, 2.5vh, 1.6rem);
}

.phone__body {
	width: 100%;
	flex: 1;
	overflow: hidden;
	display: grid;
	align-content: start;
}

.phone__form {
	width: min(100%, 280px);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}

.phone__form::-webkit-scrollbar {
	width: 0;
	height: 0;
}

.phone__captcha-wrapper {
	display: flex;
	justify-content: center;
	margin: 0;
	padding: 0;
}

.phone__captcha {
	transform: scale(0.95);
	transform-origin: center center;
	display: inline-block;
}

.phone__captcha > div {
	transform: scale(0.85);
	transform-origin: center center;
}

@supports (zoom: 1) {
	.phone__captcha > div {
		transform: none;
		zoom: 0.85;
	}
}

.phone__captcha .g-recaptcha {
	transform-origin: center center;
}

.pfield {
	height: clamp(20px, 4vh, 40px);
	border-radius: 5px;
	display: grid;
	grid-template-columns: 34px 1fr;
	align-items: center;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.28);
	overflow: hidden;
}

.pfield__icon {
	height: 100%;
	display: grid;
	place-items: center;
	color: rgba(0, 0, 0, 0.45);
}

.pfield__icon svg {
	width: 16px;
	height: 16px;
	display: block;
}

.pfield__input {
	width: 100%;
	height: 100%;
	border: 0;
	outline: none;
	background: transparent;
	font: inherit;
	font-size: 0.5rem;
	color: rgba(0, 0, 0, 0.78);
	padding: 0 0.7rem 0 0;
}

.pfield .password-field {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	height: 100%;
}

.pfield .password-field .pfield__input {
	padding-right: 3.2rem;
}

.password-field {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.password-field input {
	width: 100%;
	padding-right: 3.2rem;
}

.password-toggle {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	right: 0.45rem;
	border: 0;
	background: transparent;
	color: rgba(0, 0, 0, 0.55);
	font-size: 0.45rem;
	font-weight: 800;
	padding: 0.2rem 0.35rem;
	cursor: pointer;
}

/* En la vista de login colocamos el ojo en la esquina superior derecha del campo */
.login-phone .password-field .password-toggle {
	top: 6px;
	right: 8px;
}

.password-toggle:focus-visible {
	outline: 2px solid rgba(243, 197, 0, 0.45);
	outline-offset: 2px;
	border-radius: 6px;
}

.pfield__input::placeholder {
	color: rgba(0, 0, 0, 0.38);
}

/* Override field-validator visuals ONLY for the login page
	 This removes green/red borders and messages on login inputs without
	 affecting other pages that rely on validation UI. */
.login-phone .field-error,
.login-phone .pfield.field-error,
.login-phone .pfield__input.field-error,
.login-phone .password-field.field-error {
	border-color: rgba(255,255,255,0.28) !important;
	box-shadow: none !important;
}

.login-phone .field-success,
.login-phone .pfield.field-success,
.login-phone .pfield__input.field-success,
.login-phone .password-field.field-success {
	border-color: rgba(255,255,255,0.28) !important;
	box-shadow: none !important;
}

.login-phone .field-message,
.login-phone .required-indicator {
	display: none !important;
}

.pfield:focus-within {
	border-color: rgba(243, 197, 0, 0.8);
	box-shadow: 0 0 0 4px rgba(243, 197, 0, 0.16);
}

.phone__button {
	height: clamp(25px, 4.5vh, 44px);
	border: 0;
	border-radius: 8px;
	background: linear-gradient(135deg, var(--yellow), var(--yellow-soft));
	color: #ffffff;
	font: inherit;
	font-weight: 900;
	font-size: clamp(0.5rem, 1.7vh, 0.86rem);
	letter-spacing: 0.06em;
	cursor: pointer;
	margin-top: 0;
	box-shadow: 0 14px 28px rgba(243, 197, 0, 0.22);
}

.phone__button:focus-visible {
	outline: 3px solid rgba(243, 197, 0, 0.35);
	outline-offset: 3px;
}

.phone__links {
	margin-top: 0.55rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	align-items: center;
}

.phone__link {
	color: rgba(255, 255, 255, 0.82);
	text-decoration: none;
	font-size: clamp(0.3rem, 1.2vh, 0.86rem);
	border-bottom: 1px solid rgba(255, 255, 255, 0.22);
	padding-bottom: 2px;
}

.phone__link:hover {
	color: rgba(255, 255, 255, 0.95);
	border-bottom-color: rgba(255, 255, 255, 0.35);
}

.phone__link--button {
	background: transparent;
	border-left: 0;
	border-right: 0;
	border-top: 0;
	cursor: pointer;
	font-family: inherit;
}

.registro-copy {
	margin: 0 0 0.85rem;
	color: #4b5563;
	font-size: 0.9rem;
}

.registro-copy--soft {
	margin-top: 0.15rem;
	margin-bottom: 0.2rem;
	font-size: 0.82rem;
	color: #6b7280;
}

@media (max-width: 900px) {
	.login-phone__layout {
		justify-content: center;
	}

	.phone {
		justify-content: center;
		padding-right: 0;
	}

	.login-phone__info {
		display: none;
	}
}

@media (min-width: 901px) {
	.phone__device {
		transform: translateX(34%) scale(1.85);
		transform-origin: 100% 50%;
	}
}

@media (max-height: 740px) {
	.phone__device {
		border-radius: 46px;
		padding: 12px;
	}

	.phone__screen {
		border-radius: 38px;
		padding:
			clamp(2.5rem, 6vh, 3rem)
			clamp(1rem, 2.5vw, 1.3rem)
			clamp(0.5rem, 1.5vh, 0.8rem);
	}
	
	.phone__form {
		gap: 0.5rem;
	}
}

.test-mode-flag {
	display: none;
}

.phone__captcha-wrapper--hidden {
	display: none;
}