/* Auth pages */
.auth-page {
	padding: 40px 0;
	min-height: 60vh;
}

.auth-page h1 {
	margin-bottom: 10px;
	color: #4f46e5;
}

.auth-page > p {
	color: #666;
	margin-bottom: 30px;
	font-size: 14px;
}

/* Auth form */
.auth-form {
	background: #f9fafb;
	padding: 30px;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	margin-bottom: 20px;
}

.auth-form .form-group {
	margin-bottom: 20px;
}

.auth-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #1f2937;
	font-size: 14px;
}

.auth-form input {
	width: 100%;
	padding: 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.2s;
}

.auth-form input:focus {
	outline: none;
	border-color: #4f46e5;
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.auth-form button {
	width: 100%;
	margin-top: 10px;
}

/* Form errors */
.form-errors {
	padding: 12px 16px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 4px;
	color: #991b1b;
	margin-bottom: 20px;
	font-size: 14px;
}

/* Alerts */
.alert {
	padding: 12px 16px;
	border-radius: 4px;
	margin-bottom: 20px;
	font-size: 14px;
}

.alert-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.alert-success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
}

/* Auth links */
.auth-link,
.auth-links {
	text-align: center;
	font-size: 14px;
	color: #666;
	margin-top: 20px;
}

.auth-link a,
.auth-links a {
	color: #4f46e5;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s;
}

.auth-link a:hover,
.auth-links a:hover {
	color: #4338ca;
	text-decoration: underline;
}

.auth-links {
	display: flex;
	justify-content: center;
	gap: 15px;
}

/* Login, recuperar/cambiar contraseña y registro: título y enlaces en el rojo de la marca.
   #DC241F en claro y #E85450 en oscuro (el oscuro sigue al sistema o al interruptor del sitio). */
.auth-login,
.auth-forgot,
.auth-reset,
.auth-signup {
	--auth-brand: #DC241F;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .auth-login,
	:root:not([data-theme="light"]) .auth-forgot,
	:root:not([data-theme="light"]) .auth-reset,
	:root:not([data-theme="light"]) .auth-signup {
		--auth-brand: #E85450;
	}
}

:root[data-theme="dark"] .auth-login,
:root[data-theme="dark"] .auth-forgot,
:root[data-theme="dark"] .auth-reset,
:root[data-theme="dark"] .auth-signup {
	--auth-brand: #E85450;
}

.auth-login h1,
.auth-forgot h1,
.auth-reset h1,
.auth-signup h1,
.auth-login .auth-links,
.auth-login .auth-links a,
.auth-login .auth-links a:hover,
.auth-forgot .auth-link a,
.auth-forgot .auth-link a:hover,
.auth-signup .auth-link a,
.auth-signup .auth-link a:hover {
	color: var(--auth-brand);
}

.auth-login .auth-links a:focus-visible,
.auth-forgot .auth-link a:focus-visible,
.auth-signup .auth-link a:focus-visible {
	outline: 3px solid var(--auth-brand);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Botón principal de login, registro y contraseñas: rojo de marca (#E85450, #DC241F al pasar el
   puntero), texto blanco y centrado. Colores fijos: en dark mode los tokens son pálidos y el
   blanco no contrastaría. La especificidad gana a las reglas de modo oscuro de main.css. */
main.auth-page .button.button--primary {
	display: block;
	width: min(100%, 16rem);
	margin: 10px auto 0;
	background: #E85450;
	border-color: #E85450;
	color: #ffffff;
	text-align: center;
}

main.auth-page .button.button--primary:hover,
main.auth-page .button.button--primary:focus-visible {
	background: #DC241F;
	border-color: #DC241F;
	color: #ffffff;
	box-shadow: 0 8px 16px rgba(220, 36, 31, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
	.auth-page {
		padding: 20px 0;
	}

	/* «Recuperar Contraseña» cabe en una sola línea desde 320 px de ancho. */
	.auth-forgot h1 {
		font-size: clamp(1.25rem, 6.6vw, 1.75rem);
		white-space: nowrap;
	}

	.auth-form {
		padding: 20px;
	}
}

/* Acceso con Google */
.auth-google {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-bottom: 4px;
}

/* El botón oficial de Google mide 40 px como máximo; se escala 25 % con CSS.
   El ancho se calcula en auth.js dividiendo entre esta misma escala. */
.auth-google__button {
	height: 40px;
	max-width: 100%;
	margin-bottom: 12px;
	transform: scale(1.25);
	transform-origin: top center;
}

.auth-google .form-errors {
	width: 100%;
	margin-bottom: 0;
}

/* Separador "o" entre Google y el formulario */
.auth-separator {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 20px 0;
	color: #6b7280;
	font-size: 14px;
}

.auth-separator::before,
.auth-separator::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #d1d5db;
}

/* Aviso tras crear la cuenta: pasos para verificar el correo. */
.auth-registro-ok ol {
	margin: .5rem 0 .75rem 1.25rem;
	padding: 0;
}

.auth-registro-ok p {
	margin: 0 0 .5rem;
}
