* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
}

body {
	background: linear-gradient(90deg, #a5a1f0, #493ca7);
	overflow: hidden;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	position: relative;
}

/* ===== Fondo fijo con imagen ===== */
#background-image {
	position: fixed;
	inset: 0;
	z-index: -2;
	background-image: url('img/fondoinicio.png');
	background-repeat: no-repeat;
	background-size: cover;
	background-position: 22% center;
}

/* Capa oscura 50% encima de la imagen */
#background-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.50);
	z-index: 1;
}

h2 {
	background: #0d094d;
	font-size: 16px;
	margin-top: 20px;
	padding: 10px 10px;
	border-radius: 8px;
	border: 1px solid #D4D3E8;
	font-weight: bold;
	align-items: center;
	color: #ffffff;
	box-shadow: 0px 2px 2px #1c1936;
	cursor: default;
	transition: .2s;
	text-align: center;
}

.container {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	text-align: center;
	padding: 20px;
	position: relative;
	z-index: 2;
}

.screen {
	background: linear-gradient(90deg, rgba(76, 68, 134, 0.72), rgba(84, 81, 124, 0.76));
	position: relative;
	height: 600px;
	width: 400px;
	box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.35);
	text-align: center;
	border: 1px solid rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	overflow: hidden;
}

.screen__content {
	z-index: 1;
	position: relative;
	height: 100%;
	text-align: center;
	padding: 10px 22px 20px 22px;
}

.screen__background {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 0;
	-webkit-clip-path: inset(0 0 0 0);
	clip-path: inset(0 0 0 0);
}

.login {
	width: 100%;
	max-width: 320px;
	margin: 0 auto;
}

.login__field {
	padding: 14px 0px;
	position: relative;
	font-size: 16px;
}

.login__input {
	border: none;
	border-bottom: 2px solid #D1D1D4;
	background: rgba(255, 255, 255, 0.08);
	padding: 10px 12px;
	font-weight: bold;
	width: 70%;
	transition: .2s;
	font-size: 16px;
	color: #ffffff;
	border-radius: 6px 6px 0 0;
	text-align: center;
}

.login__input::placeholder {
	color: rgba(255, 255, 255, 0.78);
	font-weight: 500;
}

.login__input:focus {
	outline: none;
	border-bottom: 2px solid #ffffff;
	background: rgba(255, 255, 255, 0.14);
}

label {
	border: none;
	border-bottom: 2px solid transparent;
	background: none;
	padding: 10px;
	padding-left: 0;
	font-weight: bold;
	width: 75%;
	transition: .2s;
	font-size: 16px;
	color: #ffffff;
	text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.35);
	display: inline-block;
	text-align: center;
}

.login__submit {
	background: #fff;
	font-size: 16px;
	margin: 24px auto 0 auto;
	padding: 16px 20px;
	border-radius: 26px;
	border: 1px solid #D4D3E8;
	text-transform: uppercase;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 70%;
	color: #4C489D;
	box-shadow: 0px 2px 2px #5C5696;
	cursor: pointer;
	transition: .2s;
}

.login__submit:active,
.login__submit:focus,
.login__submit:hover {
	border-color: #6A679E;
	outline: none;
	transform: translateY(-1px);
	box-shadow: 0px 4px 10px rgba(0,0,0,0.22);
}

.button__icon {
	font-size: 24px;
	margin-left: auto;
	color: #7875B5;
}

.screen__background__shape {
	transform: rotate(45deg);
	position: absolute;
}

.screen__background__shape1 {
	height: 520px;
	width: 520px;
	background: #91919136;
	top: -50px;
	right: 120px;
	border-radius: 0 72px 0 0;
}

.screen__background__shape2 {
	height: 220px;
	width: 220px;
	background: #69648ab2;
	top: -172px;
	right: 0;
	border-radius: 32px;
}

.screen__background__shape3 {
	height: 540px;
	width: 190px;
	background: linear-gradient(270deg, #48436ba9, #515068b0);
	top: -24px;
	right: 0;
	border-radius: 32px;
}

.screen__background__shape4 {
	height: 400px;
	width: 200px;
	background: #58568181;
	top: 420px;
	right: 50px;
	border-radius: 60px;
}

/* ===== Pantalla 2FA ===== */

.twofa-box {
	max-width: 330px;
	margin: 0 auto;
	padding: 24px 28px;
	text-align: center;
	color: #ffffff;
}

.twofa-title {
	background: #0d094d;
	font-size: 18px;
	margin: 20px auto 24px auto;
	padding: 12px 14px;
	border-radius: 8px;
	border: 1px solid #D4D3E8;
	font-weight: 800;
	color: #ffffff;
	box-shadow: 0px 2px 2px #1c1936;
	text-align: center;
}

.twofa-text {
	color: #ffffff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
	margin: 12px auto;
	text-align: center;
	text-shadow: 0px 1px 2px rgba(0,0,0,0.35);
}

.twofa-user {
	display: inline-block;
	margin-top: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(13, 9, 77, 0.75);
	color: #ffffff;
	font-weight: 800;
	font-size: 15px;
	border: 1px solid rgba(255,255,255,0.35);
}

.twofa-error {
	background: rgba(127, 29, 29, 0.9);
	color: #ffffff;
	padding: 11px 13px;
	border-radius: 8px;
	margin: 16px auto;
	max-width: 310px;
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0px 2px 6px rgba(0,0,0,0.25);
}

.twofa-form {
	width: 100%;
	max-width: 310px;
	margin: 0 auto;
	text-align: center;
}

.twofa-form .login__field {
	padding: 12px 0px;
}

.twofa-form label {
	display: block;
	width: auto;
	border-bottom: none;
	padding: 8px 0;
	color: #ffffff;
	font-size: 16px;
	font-weight: 800;
	text-shadow: 0px 1px 2px rgba(0,0,0,0.35);
}

.twofa-form .login__input {
	width: 180px;
	background: rgba(255,255,255,0.92);
	border: 2px solid #D4D3E8;
	border-radius: 10px;
	text-align: center;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: 5px;
	color: #0d094d;
	padding: 10px 12px;
}

.twofa-form .login__input:focus {
	outline: none;
	border-color: #ffffff;
	box-shadow: 0px 0px 0px 3px rgba(255,255,255,0.22);
}

.twofa-button {
	justify-content: center;
	width: 100%;
	max-width: 280px;
	margin: 18px auto 0 auto;
	padding: 14px 18px;
}

.twofa-secondary-button {
	background: rgba(255,255,255,0.18);
	color: #ffffff;
	border: 1px solid rgba(255,255,255,0.55);
	box-shadow: 0px 2px 2px rgba(0,0,0,0.25);
}

.twofa-secondary-button:hover,
.twofa-secondary-button:focus {
	background: rgba(255,255,255,0.28);
	border-color: #ffffff;
	color: #ffffff;
}

.twofa-back {
	display: inline-block;
	margin-top: 22px;
	color: #ffffff;
	font-size: 15px;
	font-weight: 800;
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(13, 9, 77, 0.65);
	border: 1px solid rgba(255,255,255,0.35);
	text-shadow: 0px 1px 2px rgba(0,0,0,0.35);
}

.twofa-back:hover,
.twofa-back:focus {
	color: #ffffff;
	background: rgba(13, 9, 77, 0.9);
	border-color: #ffffff;
	text-decoration: none;
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
	#background-image {
		background-position: 16% center;
	}

	.container {
		padding: 16px;
	}

	.screen {
		width: 100%;
		max-width: 390px;
		height: auto;
		min-height: 600px;
	}

	.screen__content {
		padding: 14px 18px 24px 18px;
	}

	.login__input {
		width: 82%;
		font-size: 16px;
	}

	label {
		width: 82%;
		font-size: 15px;
	}

	.login__submit {
		width: 82%;
	}

	.twofa-box {
		padding: 18px 16px;
	}

	.twofa-title {
		font-size: 17px;
	}

	.twofa-text {
		font-size: 15px;
	}

	.twofa-form .login__input {
		width: 170px;
		font-size: 22px;
	}
}

@media (max-width: 480px) {
	#background-image {
		background-position: 14% center;
	}

	h2 {
		font-size: 15px;
		padding: 10px 8px;
	}

	.screen {
		max-width: 100%;
		min-height: 580px;
	}

	.login__field {
		padding: 10px 0;
	}

	.login__input {
		width: 86%;
	}

	label {
		width: 86%;
	}

	.login__submit {
		width: 86%;
		font-size: 15px;
		padding: 14px 18px;
	}
}