:root {
	--primary-color: #0f2f6b;
	--secondary-color: #2ea836;
	--gradient-start: #d8da00;
	--gradient-mid: #a2c617;
	--gradient-end: #2ea836;
	--text-dark: #333;
	--text-medium: #555;
	--text-light: #999;
	--border-light: #d9d9d9;
	--white: #fff;
	--transition-fast: 0.3s;
	--transition-medium: 0.4s;
	--transition-slow: 0.5s;
	--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
	--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
}

* {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Poppins', sans-serif;
	overflow: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.wave {
	position: fixed;
	bottom: 0;
	left: 0;
	height: 100%;
	z-index: -1;
	pointer-events: none;
}

.container {
	width: 100%;
	min-height: 100vh;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-gap: 7rem;
	padding: 0 2rem;
	align-items: center;
	justify-content: center;
	place-items: center;
}

.image-container {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
	padding: 2rem;
	position: relative;
}

.login-image {
	max-width: 100%;
	max-height: 500px;
	object-fit: contain;
	display: block;
	margin: auto;
	will-change: opacity;
}

.login-content {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	width: 100%;
	animation: loginFadeInUp 1s cubic-bezier(0.23, 1, 0.32, 1);
	opacity: 0;
	animation-fill-mode: forwards;
}

form {
	width: 360px;
	max-width: 100%;
}

.login-content img {
	height: 100px;
}

.login-content h2 {
	margin: 15px 0;
	color: var(--text-dark);
	text-transform: uppercase;
	font-size: clamp(2rem, 5vw, 2.9rem);
	font-weight: 600;
}

.login-content h3 {
	color: var(--text-dark);
	font-size: clamp(1.2rem, 3vw, 1.5rem);
	font-weight: 500;
}

.login-content .input-div {
	position: relative;
	display: grid;
	grid-template-columns: 7% 93%;
	margin: 25px 0;
	padding: 5px 0;
	border-bottom: 2px solid var(--border-light);
	transition: border-color var(--transition-fast);
}

.login-content .input-div.one {
	margin-top: 0;
}

.i {
	color: var(--border-light);
	display: flex;
	justify-content: center;
	align-items: center;
}

.i i {
	transition: color var(--transition-fast);
}

.input-div > div {
	position: relative;
	height: 45px;
}

.input-div > div > h5 {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-light);
	font-size: 18px;
	transition: all var(--transition-fast);
	pointer-events: none;
	user-select: none;
}

.input-div:before,
.input-div:after {
	content: '';
	position: absolute;
	bottom: -2px;
	width: 0%;
	height: 2px;
	background-color: var(--primary-color);
	transition: width var(--transition-medium);
}

.input-div:before {
	right: 50%;
}

.input-div:after {
	left: 50%;
}

.input-div.focus:before,
.input-div.focus:after {
	width: 50%;
}

.input-div.focus > div > h5 {
	top: -5px;
	font-size: 15px;
}

.input-div.focus > .i > i {
	color: var(--primary-color);
}

.input-div > div > input {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	border: none;
	outline: none;
	background: none;
	padding: 0.5rem 0.7rem;
	font-size: 1.2rem;
	color: var(--text-medium);
	font-family: 'Poppins', sans-serif;
}

.input-div.pass {
	margin-bottom: 4px;
}

a {
	display: block;
	text-align: right;
	text-decoration: none;
	color: var(--text-light);
	font-size: 0.9rem;
	transition: color var(--transition-fast);
}

a:hover {
	color: var(--primary-color);
}

a:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

.btn {
	display: block;
	width: 100%;
	height: 50px;
	border-radius: 25px;
	outline: none;
	border: none;
	background-image: linear-gradient(to right, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
	background-size: 200%;
	font-size: 1.2rem;
	color: var(--white);
	font-family: 'Poppins', sans-serif;
	text-transform: uppercase;
	margin: 1rem 0;
	cursor: pointer;
	transition: background-position var(--transition-slow), transform 0.2s;
	box-shadow: var(--shadow-sm);
}

.btn:hover {
	background-position: right;
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.btn:active {
	transform: translateY(0);
}

.btn:focus {
	outline: 3px solid var(--primary-color);
	outline-offset: 2px;
}
.img img {
	width: auto;
	height: auto;
	animation: disintegrate 10s infinite;
}

/* Animación mejorada con mejor rendimiento */
@keyframes disintegrate {
	0%, 100% {
		clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
		opacity: 1;
	}
	25% {
		clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
		opacity: 0.75;
	}
	50% {
		clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
		opacity: 0.5;
	}
	75% {
		clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%);
		opacity: 0.25;
	}
}

.fade-out {
	animation: fadeOutImg 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in {
	animation: fadeInImg 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeOutImg {
	from {
		opacity: 1;
		transform: scale(1);
	}
	to {
		opacity: 0;
		transform: scale(0.95);
	}
}

@keyframes fadeInImg {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes loginFadeInUp {
	from {
		opacity: 0;
		transform: translateY(40px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Estilos responsive mejorados */

/* Móviles pequeños (hasta 480px) */
@media screen and (max-width: 480px) {
	.container {
		grid-template-columns: 1fr;
		grid-gap: 1rem;
		padding: 1rem;
		justify-content: center;
	}

	.image-container,
	.wave {
		display: none;
	}

	.login-content {
		justify-content: center;
		padding: 1rem;
		margin: 0 auto;
	}

	form {
		width: 100%;
		max-width: 300px;
		margin: 0 auto;
	}

	.login-content h2 {
		font-size: 2rem;
	}

	.login-content h3 {
		font-size: 1.5rem;
	}

	.input-div > div > h5 {
		font-size: 16px;
	}

	.input-div > div > input {
		font-size: 1rem;
	}

	.btn {
		font-size: 1rem;
		height: 45px;
	}
}

/* Móviles grandes (481px - 768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
	.container {
		grid-template-columns: 1fr;
		grid-gap: 2rem;
		padding: 1.5rem;
		justify-content: center;
	}

	.image-container {
		display: none;
	}

	.login-content {
		justify-content: center;
		margin: 0 auto;
	}

	form {
		width: 100%;
		max-width: 340px;
		margin: 0 auto;
	}

	.login-content h2 {
		font-size: 2.2rem;
	}
}

/* Tablets (769px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
	.container {
		grid-template-columns: 1fr;
		grid-gap: 2rem;
		padding: 2rem;
		justify-content: center;
	}

	.image-container {
		display: none;
	}

	.login-content {
		justify-content: center;
		padding: 2rem;
		margin: 0 auto;
	}

	form {
		width: 100%;
		max-width: 380px;
		margin: 0 auto;
	}

	.login-content img {
		height: 120px;
	}

	.login-content h2 {
		font-size: 2.5rem;
	}

	.login-content h3 {
		font-size: 1.3rem;
	}
}

/* Tablets grandes y Galaxy Tab Active 5 (1025px - 1280px) */
@media screen and (min-width: 1025px) and (max-width: 1280px) {
	.container {
		grid-template-columns: 1fr;
		grid-gap: 3rem;
		padding: 2rem 3rem;
		justify-content: center;
	}

	.image-container {
		display: none;
	}

	.login-content {
		justify-content: center;
		padding: 2rem;
		margin: 0 auto;
	}

	form {
		width: 100%;
		max-width: 400px;
		margin: 0 auto;
	}

	.login-content img {
		height: 120px;
	}
}

/* Laptops y pantallas medianas (1281px - 1366px) */
@media screen and (min-width: 1281px) and (max-width: 1366px) {
	.container {
		grid-template-columns: repeat(2, 1fr);
		grid-gap: 4rem;
		padding: 0 2rem;
	}

	.image-container {
		display: flex;
	}

	.login-image {
		max-height: 450px;
	}

	form {
		width: 340px;
	}
}

/* Pantallas grandes (1367px+) */
@media screen and (min-width: 1367px) {
	.container {
		grid-template-columns: repeat(2, 1fr);
		grid-gap: 7rem;
		padding: 0 4rem;
	}

	.image-container {
		display: flex;
	}

	.login-image {
		max-height: 500px;
	}
}

/* Tablets en orientación landscape */
@media screen and (min-width: 768px) and (max-width: 1366px) and (orientation: landscape) {
	.container {
		grid-template-columns: 1fr;
		padding: 1.5rem 3rem;
	}

	.image-container {
		display: none;
	}

	.login-content {
		justify-content: center;
		margin: 0 auto;
	}

	form {
		max-width: 400px;
		margin: 0 auto;
	}
}

/* Tablets en orientación portrait */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
	.container {
		grid-template-columns: 1fr;
		padding: 2rem;
	}

	.image-container {
		display: none;
	}

	.login-content {
		justify-content: center;
		margin: 0 auto;
	}

	form {
		max-width: 380px;
		margin: 0 auto;
	}
}

/* Modo oscuro preferido por el sistema */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Mejoras de accesibilidad para alto contraste */
@media (prefers-contrast: high) {
	.input-div {
		border-bottom-width: 3px;
	}

	.btn {
		border: 2px solid var(--white);
	}
}
@keyframes onAutoFillStart {
	from { /* sentinel */ }
	to   { /* sentinel */ }
}
@keyframes onAutoFillCancel {
	from { /* sentinel */ }
	to   { /* sentinel */ }
}

.input-div input:-webkit-autofill,
.input-div .ui-password input:-webkit-autofill {
	animation-name: onAutoFillStart;
	animation-duration: 0.001s;
	transition: background-color 9999s ease-in-out 0s !important;
	-webkit-text-fill-color: var(--ink-900) !important;
	-webkit-box-shadow: 0 0 0 1000px transparent inset !important;
	caret-color: var(--ns-navy);
	font-family: var(--font-body) !important;
}

.input-div input:not(:-webkit-autofill) {
	animation-name: onAutoFillCancel;
	animation-duration: 0.001s;
}