/* =========================================
   LOGIN
   ========================================= */

.login-page {
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px 20px;
	background: radial-gradient(circle at top left, rgba(13, 110, 253, 0.15), transparent 35%), radial-gradient(circle at bottom right, rgba(8, 66, 152, 0.15), transparent 35%), #f4f7fb;
}


/* TARJETA */

.login-card {
	width: 100%;
	max-width: 430px;
	background: white;
	padding: 40px;
	border-radius: 20px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
	border: 1px solid rgba(0, 0, 0, 0.05);
}


/* LOGO */

.login-logo {
	width: 75px;
	height: 75px;
	margin: 0 auto 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 18px;
	background: linear-gradient( 135deg, #0d6efd, #084298 );
	color: white;
	font-size: 38px;
	box-shadow: 0 10px 25px rgba(13, 110, 253, 0.3);
}


/* TITULO */

.login-title {
	text-align: center;
	font-weight: 700;
	font-size: 28px;
	margin-bottom: 5px;
	color: #172033;
}


/* SUBTITULO */

.login-subtitle {
	text-align: center;
	color: #6c757d;
	margin-bottom: 30px;
}


/* LABEL */

.login-card .form-label {
	font-weight: 600;
	color: #343a40;
	margin-bottom: 7px;
}


/* INPUTS */

.login-card .form-control,
.login-card .form-select {
	height: 48px;
	border: 1px solid #d9dee7;
	border-radius: 0 9px 9px 0;
}

.login-card .input-group-text {
	width: 48px;
	justify-content: center;
	background: #f8f9fa;
	border: 1px solid #d9dee7;
	border-radius: 9px 0 0 9px;
}

.login-card .form-control:focus,
.login-card .form-select:focus {
	border-color: #0d6efd;
	box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
}


/* BOTON */

.btn-login {
	height: 50px;
	border: none;
	border-radius: 10px;
	background: linear-gradient( 135deg, #0d6efd, #084298 );
	color: white;
	font-size: 16px;
	font-weight: 600;
	transition: 0.25s;
}

	.btn-login:hover {
		color: white;
		transform: translateY(-2px);
		box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
	}


/* RECUPERAR */

.forgot-password {
	color: #0d6efd;
	text-decoration: none;
	font-size: 14px;
}

	.forgot-password:hover {
		text-decoration: underline;
	}


/* PIE LOGIN */

.login-footer {
	text-align: center;
	color: #9aa1aa;
	font-size: 13px;
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}


/* =========================================
   FOOTER
   ========================================= */

.footer-academico {
	padding: 20px;
	background: white;
	border-top: 1px solid #dee2e6;
	color: #6c757d;
}

	.footer-academico a {
		color: #0d6efd;
		text-decoration: none;
	}

/* =========================================
   LOGIN ANIMADO
   ========================================= */

.login-page {
	min-height: 100vh;
	position: relative;
	overflow: hidden;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px 20px;
	background: linear-gradient( -45deg, #eef5ff, #f8fbff, #e8f1ff, #f5f8ff );
	background-size: 400% 400%;
	animation: fondoMovimiento 12s ease infinite;
}


	/* =========================================
   LUCES DEL FONDO
   ========================================= */

	.login-page::before,
	.login-page::after {
		content: "";
		position: absolute;
		width: 350px;
		height: 350px;
		border-radius: 50%;
		filter: blur(80px);
		opacity: 0.35;
		pointer-events: none;
	}

	.login-page::before {
		background: #0d6efd;
		top: -150px;
		left: -100px;
		animation: luzFlotante1 8s ease-in-out infinite;
	}

	.login-page::after {
		background: #6f42c1;
		bottom: -150px;
		right: -100px;
		animation: luzFlotante2 10s ease-in-out infinite;
	}


/* =========================================
   TARJETA
   ========================================= */

.login-card {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 430px;
	background: rgba(255, 255, 255, 0.94);
	padding: 40px;
	border-radius: 22px;
	border: 1px solid rgba(255, 255, 255, 0.8);
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
	animation: aparecerTarjeta 0.9s ease-out;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}


	/* Efecto al pasar sobre tarjeta */

	.login-card:hover {
		transform: translateY(-5px);
		box-shadow: 0 30px 70px rgba(0, 0, 0, 0.18);
	}


/* =========================================
   LOGO
   ========================================= */

.login-logo {
	width: 78px;
	height: 78px;
	margin: 0 auto 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 20px;
	background: linear-gradient( 135deg, #0d6efd, #084298 );
	color: white;
	font-size: 38px;
	box-shadow: 0 12px 30px rgba(13, 110, 253, 0.35);
	animation: aparecerLogo 0.8s ease-out, flotarLogo 3s ease-in-out 1s infinite;
}


/* =========================================
   TITULO
   ========================================= */

.login-title {
	text-align: center;
	font-weight: 700;
	font-size: 28px;
	margin-bottom: 5px;
	color: #172033;
	animation: aparecerTexto 0.8s ease-out 0.2s both;
}


.login-subtitle {
	text-align: center;
	color: #6c757d;
	margin-bottom: 30px;
	animation: aparecerTexto 0.8s ease-out 0.3s both;
}


/* =========================================
   CAMPOS
   ========================================= */

.login-card form > div:nth-of-type(1) {
	animation: aparecerCampo 0.6s ease-out 0.35s both;
}

.login-card form > div:nth-of-type(2) {
	animation: aparecerCampo 0.6s ease-out 0.5s both;
}

.login-card form > div:nth-of-type(3) {
	animation: aparecerCampo 0.6s ease-out 0.65s both;
}


/* =========================================
   LABELS
   ========================================= */

.login-card .form-label {
	font-weight: 600;
	color: #343a40;
	margin-bottom: 7px;
}


/* =========================================
   INPUTS
   ========================================= */

.login-card .form-control,
.login-card .form-select {
	height: 48px;
	border: 1px solid #d9dee7;
	border-radius: 0 9px 9px 0;
	transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}


.login-card .input-group-text {
	width: 48px;
	justify-content: center;
	background: #f8f9fa;
	border: 1px solid #d9dee7;
	border-radius: 9px 0 0 9px;
	transition: background 0.25s ease, transform 0.25s ease;
}


/* =========================================
   INPUT FOCUS
   ========================================= */

.login-card .form-control:focus,
.login-card .form-select:focus {
	border-color: #0d6efd;
	box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
	transform: translateX(3px);
	outline: none;
}


	.login-card .form-control:focus + *,
	.login-card .form-select:focus + * {
		background: #eaf2ff;
	}


/* =========================================
   BOTÓN
   ========================================= */

.btn-login {
	position: relative;
	height: 50px;
	border: none;
	border-radius: 10px;
	background: linear-gradient( 135deg, #0d6efd, #084298 );
	background-size: 200% 200%;
	color: white;
	font-size: 16px;
	font-weight: 600;
	overflow: hidden;
	animation: aparecerBoton 0.7s ease-out 0.8s both;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}


	/* Brillo que cruza el botón */

	.btn-login::before {
		content: "";
		position: absolute;
		top: 0;
		left: -100%;
		width: 60%;
		height: 100%;
		background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.35), transparent );
		transform: skewX(-20deg);
		animation: brilloBoton 4s ease-in-out infinite;
	}


	.btn-login:hover {
		color: white;
		transform: translateY(-3px);
		box-shadow: 0 12px 25px rgba(13, 110, 253, 0.35);
		background-position: right center;
	}


	.btn-login:active {
		transform: translateY(0);
	}


/* =========================================
   LINK
   ========================================= */

.forgot-password {
	color: #0d6efd;
	text-decoration: none;
	font-size: 14px;
	transition: color 0.2s ease, letter-spacing 0.2s ease;
}


	.forgot-password:hover {
		color: #084298;
		text-decoration: underline;
		letter-spacing: 0.2px;
	}


/* =========================================
   FOOTER LOGIN
   ========================================= */

.login-footer {
	text-align: center;
	color: #9aa1aa;
	font-size: 13px;
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #eee;
	animation: aparecerTexto 0.8s ease-out 1s both;
}


/* =========================================
   ANIMACIONES
   ========================================= */


/* Fondo */

@keyframes fondoMovimiento {

	0% {
		background-position: 0% 50%;
	}

	50% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0% 50%;
	}
}


/* Luz 1 */

@keyframes luzFlotante1 {

	0%, 100% {
		transform: translate(0, 0) scale(1);
	}

	50% {
		transform: translate(100px, 80px) scale(1.2);
	}
}


/* Luz 2 */

@keyframes luzFlotante2 {

	0%, 100% {
		transform: translate(0, 0) scale(1);
	}

	50% {
		transform: translate(-100px, -80px) scale(1.25);
	}
}


/* Tarjeta */

@keyframes aparecerTarjeta {

	from {
		opacity: 0;
		transform: translateY(40px) scale(0.95);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}


/* Logo */

@keyframes aparecerLogo {

	from {
		opacity: 0;
		transform: scale(0.5) rotate(-15deg);
	}

	to {
		opacity: 1;
		transform: scale(1) rotate(0);
	}
}


/* Logo flotando */

@keyframes flotarLogo {

	0%, 100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-8px);
	}
}


/* Texto */

@keyframes aparecerTexto {

	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}


/* Campos */

@keyframes aparecerCampo {

	from {
		opacity: 0;
		transform: translateX(-20px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}


/* Botón */

@keyframes aparecerBoton {

	from {
		opacity: 0;
		transform: translateY(15px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}


/* Brillo */

@keyframes brilloBoton {

	0% {
		left: -100%;
	}

	30% {
		left: 130%;
	}

	100% {
		left: 130%;
	}
}


/* =========================================
   MÓVIL
   ========================================= */

@media (max-width: 576px) {

	.login-page {
		padding: 20px 15px;
	}

	.login-card {
		padding: 30px 22px;
		border-radius: 18px;
	}

	.login-title {
		font-size: 24px;
	}

	.login-logo {
		width: 68px;
		height: 68px;
		font-size: 32px;
	}
}


/* =========================================
   REDUCIR ANIMACIONES SI EL USUARIO LO PIDE
   ========================================= */

@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}
