:root {
	--primary: #0b8fd9;
	--primary-dark: #0878b8;
	--bg: #f4f7fb;
	--text: #1f2937;
	--muted: #6b7280;
	--border: #dbe4ee;
	--shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
	--shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.18);
	--radius: 24px;
	--login-max-sm: 420px;
	--login-max-md: 480px;
	--login-max-lg: 920px;
}

.login-body {
	margin: 0;
	font-family: 'Inter', sans-serif;
	background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 55%, #066ba3 100%);
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 4vw, 32px);
	box-sizing: border-box;
}

.login-container {
	width: 100%;
	max-width: var(--login-max-sm);
}

.login-card {
	background: #fff;
	border-radius: 32px;
	overflow: hidden;
	box-shadow: var(--shadow-lg);
}

.login-top {
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	padding: clamp(32px, 6vw, 42px) clamp(24px, 5vw, 30px) clamp(28px, 5vw, 36px);
	color: #fff;
	text-align: center;
	position: relative;
}

.logo-circle {
	width: clamp(72px, 14vw, 82px);
	height: clamp(72px, 14vw, 82px);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 18px;
	backdrop-filter: blur(10px);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 2px;
	overflow: hidden;
	flex-shrink: 0;
}

.logo-circle img {
	max-width: 70%;
	max-height: 70%;
	object-fit: contain;
}

.brand {
	font-size: clamp(28px, 5vw, 34px);
	font-weight: 800;
	letter-spacing: 3px;
	line-height: 1.15;
}

.brand-subtitle {
	margin-top: 6px;
	font-size: clamp(11px, 2vw, 13px);
	opacity: 0.85;
	letter-spacing: clamp(2px, 0.8vw, 4px);
}

.login-form {
	padding: clamp(28px, 5vw, 34px) clamp(22px, 4.5vw, 28px) clamp(24px, 4vw, 30px);
}

.welcome {
	text-align: center;
	margin-bottom: clamp(22px, 4vw, 28px);
}

.welcome h2 {
	font-size: clamp(24px, 4.5vw, 28px);
	margin: 0 0 10px;
	color: var(--text);
	font-weight: 700;
}

.welcome p {
	color: var(--muted);
	line-height: 1.5;
	font-size: clamp(13px, 2.2vw, 14px);
	margin: 0;
}

.input-group {
	margin-bottom: 18px;
}

.input-label {
	display: block;
	margin-bottom: 10px;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
}

.input-wrapper {
	height: clamp(52px, 10vw, 58px);
	border-radius: 18px;
	border: 1px solid var(--border);
	background: #f8fafc;
	display: flex;
	align-items: center;
	padding: 0 18px;
	transition: 0.2s;
}

.input-wrapper:focus-within {
	border-color: var(--primary);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(11, 143, 217, 0.08);
}

.input-icon {
	font-size: 18px;
	margin-right: 12px;
	opacity: 0.7;
	flex-shrink: 0;
}

.input-wrapper input {
	border: none;
	background: none;
	outline: none;
	width: 100%;
	font-size: 15px;
	color: #111827;
	font-family: inherit;
	min-width: 0;
}

.form-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 8px;
	margin-bottom: 26px;
}

.forgot-password {
	color: var(--primary);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

.forgot-password:hover {
	text-decoration: underline;
}

.login-btn,
.boton-login {
	width: 100%;
	height: clamp(52px, 10vw, 58px);
	border: none;
	border-radius: 18px;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
	transition: 0.2s;
	box-shadow: 0 10px 25px rgba(11, 143, 217, 0.25);
	font-family: inherit;
}

.login-btn:hover,
.boton-login:hover {
	transform: translateY(-2px);
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: #fff;
}

.login-btn:disabled {
	opacity: 0.7;
	cursor: wait;
	transform: none;
}

.msg_error {
	margin-bottom: 16px;
	padding: 12px 16px;
	border-radius: 14px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	font-size: 14px;
	font-weight: 600;
}

.msg_error ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.info-box {
	margin-top: 26px;
	background: #f8fafc;
	border-radius: 18px;
	padding: 18px;
	border: 1px solid #e5e7eb;
}

.info-box strong {
	display: block;
	margin-bottom: 10px;
	color: #111827;
	font-size: 15px;
}

.info-box p {
	font-size: 14px;
	line-height: 1.5;
	color: var(--muted);
	margin: 0;
}

.info-box a {
	color: var(--primary);
	text-decoration: none;
	font-weight: 600;
}

.info-box a:hover {
	text-decoration: underline;
}

.register-link {
	display: block;
	margin-top: 14px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--primary);
}

/* Tablet: tarjeta un poco más ancha */
@media (min-width: 576px) {
	.login-container {
		max-width: var(--login-max-md);
	}
}

/* Escritorio: diseño horizontal (marca | formulario) */
@media (min-width: 992px) {
	.login-container {
		max-width: var(--login-max-lg);
	}

	.login-card {
		display: grid;
		grid-template-columns: minmax(300px, 42%) 1fr;
		min-height: 480px;
		border-radius: 28px;
	}

	.login-top {
		padding: 48px 36px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
	}

	.logo-circle {
		width: 88px;
		height: 88px;
		margin-bottom: 22px;
	}

	.brand {
		font-size: 32px;
	}

	.login-form {
		padding: 48px 44px;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	.welcome {
		text-align: left;
		margin-bottom: 32px;
	}

	.welcome h2 {
		font-size: 30px;
	}

	.welcome p {
		font-size: 15px;
		max-width: 36ch;
	}
}

/* Pantallas muy grandes */
@media (min-width: 1200px) {
	.login-container {
		max-width: 960px;
	}

	.login-card {
		min-height: 520px;
	}

	.login-top {
		padding: 56px 44px;
	}

	.login-form {
		padding: 56px 52px;
	}

	.brand {
		font-size: 36px;
	}

	.logo-circle {
		width: 96px;
		height: 96px;
	}
}

/* Móvil pequeño */
@media (max-width: 480px) {
	.login-body {
		padding: 12px;
		align-items: flex-start;
		padding-top: max(12px, env(safe-area-inset-top));
		padding-bottom: max(12px, env(safe-area-inset-bottom));
	}

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

	.login-card {
		border-radius: 24px;
	}

	.login-top {
		padding: 32px 20px 28px;
	}

	.login-form {
		padding: 26px 20px 22px;
	}

	.brand-subtitle {
		letter-spacing: 3px;
	}
}

/* Preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
	.login-btn:hover,
	.boton-login:hover {
		transform: none;
	}
}
