/* Estilos compartidos de login.php y olvido.php */
:root {
	--azul: #0884f3;
	--azul-oscuro: #0565c0;
	--fondo-1: #0b1d3a;
	--fondo-2: #0a4fa0;
	--texto: #1f2937;
	--texto-suave: #6b7280;
	--borde: #e5e7eb;
	--exito-bg: #ecfdf5;
	--exito-txt: #047857;
}

* { box-sizing: border-box; }

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

body.auth {
	font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	color: var(--texto);
	background: radial-gradient(1200px 600px at 10% -10%, rgba(8,132,243,.55), transparent 60%),
	            radial-gradient(900px 500px at 110% 110%, rgba(8,132,243,.35), transparent 60%),
	            linear-gradient(135deg, var(--fondo-1), var(--fondo-2));
	background-attachment: fixed;
	display: flex;
	align-items: flex-start; /* arriba, asi con el teclado abierto se ven los inputs */
	justify-content: center;
	padding: 16px 16px 24px;
	-webkit-font-smoothing: antialiased;
}

.auth-wrap { width: 100%; max-width: 400px; }

.auth-logo { text-align: center; margin-bottom: 16px; }
.auth-logo img { max-width: 200px; max-height: 70px; }

.auth-card {
	background: #fff;
	border-radius: 16px;
	padding: 32px 28px 28px;
	box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.auth-card h1 {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 4px;
	letter-spacing: -.01em;
}
.auth-sub { margin: 0 0 24px; color: var(--texto-suave); font-size: 14px; line-height: 1.5; }

.auth-alert {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--exito-bg);
	color: var(--exito-txt);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 20px;
}
.auth-alert .material-symbols-outlined { font-size: 20px; }
.auth-alert[hidden] { display: none; }
.auth-alert-error { background: #fef2f2; color: #b91c1c; }

.btn-auth:disabled { opacity: .7; cursor: wait; }

.field { margin-bottom: 16px; }
.field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
}
.input-wrap { position: relative; }

/* Oculto a la vista pero lo leen los lectores de pantalla */
.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}
.input-wrap > .material-symbols-outlined {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #9ca3af;
	font-size: 20px;
	pointer-events: none;
}
.input-wrap input {
	width: 100%;
	height: 46px;
	padding: 0 44px 0 42px;
	border: 1px solid var(--borde);
	border-radius: 10px;
	font: inherit;
	font-size: 15px;
	color: var(--texto);
	background: #f9fafb;
	transition: border-color .15s, box-shadow .15s, background .15s;
	-webkit-appearance: none;
}
.input-wrap input:focus {
	outline: none;
	border-color: var(--azul);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(8,132,243,.15);
}
.input-wrap .toggle-pass {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	background: none;
	padding: 6px;
	border-radius: 8px;
	cursor: pointer;
	color: #6b7280;
	display: flex;
}
.input-wrap .toggle-pass:hover { color: var(--texto); background: #f3f4f6; }

.row-between {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 4px 0 20px;
	font-size: 14px;
}
.row-center { text-align: center; margin: 4px 0 16px; font-size: 14px; }
.auth-links { align-items: center; }
.auth-links.auth-links-center { justify-content: center; }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--texto-suave); }
.check input { width: 16px; height: 16px; accent-color: var(--azul); margin: 0; }

.link { color: var(--azul); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

.btn-auth {
	width: 100%;
	height: 46px;
	border: 0;
	border-radius: 10px;
	background: var(--azul);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, transform .05s;
	-webkit-appearance: none;
}
.btn-auth:hover { background: var(--azul-oscuro); }
.btn-auth:active { transform: translateY(1px); }
.btn-auth:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(8,132,243,.3); }

.auth-links {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--borde);
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 14px;
}
.auth-links a { display: inline-flex; align-items: center; gap: 4px; }
.auth-links .material-symbols-outlined { font-size: 18px; }

.auth-footer { text-align: center; color: rgba(255,255,255,.7); font-size: 13px; margin-top: 24px; }

.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

@media (max-width: 420px) {
	.auth-card { padding: 26px 20px 22px; }
}

/* Teclado abierto en el celular (pantalla baja): se compacta para que los dos inputs
   se vean sin scrollear. */
@media (max-height: 560px) {
	body.auth { padding-top: 8px; }
	.auth-logo { margin-bottom: 8px; }
	.auth-logo img { max-height: 32px; }
	.auth-card { padding: 16px 18px; }
	.auth-card h1 { font-size: 18px; margin-bottom: 10px; }
	.auth-sub, .auth-footer { display: none; }
	.field { margin-bottom: 10px; }
	.field label { margin-bottom: 4px; }
	.auth-alert { margin-bottom: 10px; padding: 8px 10px; }
}

/* Lo mismo cuando el JS detecta el teclado abierto (navegadores que no achican la pagina) */
body.auth.teclado { padding-top: 8px; }
body.auth.teclado .auth-logo { margin-bottom: 8px; }
body.auth.teclado .auth-logo img { max-height: 32px; }
body.auth.teclado .auth-card { padding: 16px 18px; }
body.auth.teclado .auth-card h1 { font-size: 18px; margin-bottom: 10px; }
body.auth.teclado .auth-sub,
body.auth.teclado .auth-footer { display: none; }
body.auth.teclado .field { margin-bottom: 10px; }
body.auth.teclado .field label { margin-bottom: 4px; }
body.auth.teclado .auth-alert { margin-bottom: 10px; padding: 8px 10px; }

/* Celular angosto: "Recordarme" y "Olvidaste..." en una sola linea */
@media (max-width: 380px) {
	.row-between { font-size: 13px; gap: 8px; }
	.row-between > * { white-space: nowrap; }
}
