/* ============================================================
   EMP SAN RAMÓN — Pantalla de acceso de WordPress
   Login · Recuperar contraseña · Resetear contraseña
   Identidad: Escuela Marítima del Perú San Ramón
   ============================================================ */

/* Fuente de marca (misma que la web). Si el sitio ya la carga,
   esta línea es inofensiva. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700;800&display=swap');

:root {
	--brand-900: #023059;
	--brand-800: #033b6f;
	--brand-700: #044a8a;
	--brand-500: #0660b5;
	--brand-300: #5a9fd4;
	--brand-100: #d0e4f5;
	--brand-50:  #eaf3fb;
	--accent-500: #F2B705;
	--accent-400: #F2A20C;
	--ink-900: #0c1320;
	--ink-700: #1a1a2e;
	--ink-500: #5a5a72;
	--ink-200: #d6d6dd;
	--white: #ffffff;
	--danger: #dc2626;
	--radius-md: 10px;
	--radius-lg: 16px;
	--shadow-lg: 0 18px 50px rgba(2, 48, 89, .14);
	--transition: .25s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Lienzo general ---------- */
html,
body.login {
	overflow-x: hidden;   /* evita el margen/scroll horizontal en móvil */
	max-width: 100%;
}
body.login {
	min-height: 100vh;
	margin: 0;
	font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
	color: var(--ink-700);
	background: var(--brand-50);
	display: flex;
	flex-direction: column;
}

/* El login de WP no usa border-box; sin esto, el padding horizontal
   suma al 100% de ancho y desborda hacia la derecha. */
body.login,
body.login *,
body.login *::before,
body.login *::after {
	box-sizing: border-box;
}

/* En escritorio dividimos la pantalla: hero a la izquierda, formulario a la derecha. */
@media (min-width: 900px) {
	body.login {
		display: grid;
		grid-template-columns: 1.05fr .95fr;
		grid-template-areas: "hero form";
		align-items: stretch;
	}
	.emp-hero { grid-area: hero; }
	#login {
		grid-area: form;
		align-self: center;
		justify-self: center;
	}
	.emp-login-footer { grid-column: 1 / -1; }
}

/* ---------- Panel hero de bienvenida ---------- */
.emp-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 64px 56px;
	overflow: hidden;
	background:
		radial-gradient(120% 120% at 80% -10%, rgba(6, 96, 181, .55) 0%, rgba(6, 96, 181, 0) 55%),
		linear-gradient(145deg, var(--brand-900) 0%, var(--brand-800) 45%, var(--brand-700) 100%);
	color: #fff;
	min-height: 220px;
}
.emp-hero__overlay {
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 18% 82%, rgba(242, 183, 5, .18) 0, rgba(242, 183, 5, 0) 24%),
		repeating-linear-gradient(115deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 26px);
	pointer-events: none;
}
.emp-hero__content {
	position: relative;
	z-index: 1;
	max-width: 460px;
}
.emp-hero__eyebrow {
	display: inline-block;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--accent-500);
	margin-bottom: 18px;
	padding: 6px 14px;
	border: 1px solid rgba(242, 183, 5, .4);
	border-radius: 999px;
}
.emp-hero__title {
	font-size: clamp(2.4rem, 4vw, 3.4rem);
	font-weight: 800;
	line-height: 1.1;
	margin: 0 0 10px;
	color: #fff;
}
.emp-hero__subtitle {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--brand-100);
	margin: 0 0 18px;
}
.emp-hero__note {
	font-size: .98rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, .82);
	margin: 0;
	max-width: 400px;
}

/* Barra dorada de acento al pie del hero. */
.emp-hero::after {
	content: '';
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 6px;
	background: linear-gradient(90deg, var(--accent-500), var(--accent-400));
}

/* ---------- Contenedor del formulario ---------- */
#login {
	width: 100%;
	max-width: 420px;
	padding: 48px 24px;
	margin: 0 auto;
}

/* Logo del login (reemplaza el de WordPress). */
.login h1 { margin-bottom: 8px; }
.login h1 a {
	background-image: url('assets/logo.png');
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	width: 200px;
	height: 120px;
	margin: 0 auto 4px;
	text-indent: -9999px;
	overflow: hidden;
}

/* ---------- Tarjeta del formulario ---------- */
#loginform,
#lostpasswordform,
#resetpassform,
#registerform {
	background: var(--white);
	border: 1px solid var(--brand-100);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: 32px 28px !important;
	margin: 12px 0 0 !important; /* anula el margin-left: 8px de WP que causaba el desborde */
	width: 100%;
	max-width: 100%;
	overflow: hidden; /* contiene el warning de mayúsculas y demás elementos */
}

/* Todos los campos ocupan el ancho disponible sin desbordar. */
.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"],
.login .wp-pwd,
.login .user-pass-wrap {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Deja espacio para el icono de "mostrar contraseña". */
.login .wp-pwd { position: relative; }
.login .wp-pwd input[type="password"],
.login .wp-pwd input[type="text"] {
	padding-right: 44px;
}
.login .wp-pwd .button.wp-hide-pw {
	position: absolute;
	right: 2px;
	top: 0;
	height: 100%;
}

/* Título accesible arriba de cada formulario nativo (mensajes). */
.login #login_error,
.login .message,
.login .success {
	border-radius: var(--radius-md);
	border: none;
	border-left: 4px solid var(--brand-500);
	box-shadow: var(--shadow-lg);
	padding: 14px 18px;
	font-size: .9rem;
	color: var(--ink-700);
}
.login #login_error { border-left-color: var(--danger); }
.login .success     { border-left-color: var(--accent-500); }

/* Etiquetas */
.login label {
	font-size: .9rem;
	font-weight: 700;
	color: var(--brand-900);
}

/* Campos de texto */
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
	border: 1px solid var(--ink-200);
	border-radius: var(--radius-md);
	padding: 12px 14px;
	font-size: 1rem;
	color: var(--ink-900);
	background: #fff;
	box-shadow: none;
	transition: border-color var(--transition), box-shadow var(--transition);
}
.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
	border-color: var(--brand-500);
	box-shadow: 0 0 0 3px rgba(6, 96, 181, .15);
	outline: none;
}

/* Icono "mostrar contraseña" de WP */
.login .wp-pwd .button.wp-hide-pw {
	color: var(--brand-500);
}

/* ---------- Botón principal ---------- */
.login .button.button-primary,
.wp-core-ui .login .button-primary {
	width: 100%;
	background: var(--brand-900);
	border: 2px solid var(--brand-900);
	border-radius: var(--radius-md);
	color: #fff;
	font-family: 'DM Sans', sans-serif;
	font-weight: 700;
	font-size: .95rem;
	padding: 12px 20px;
	height: auto;
	line-height: 1.4;
	margin-top: 6px;
	box-shadow: 0 4px 14px rgba(2, 48, 89, .25);
	transition: all var(--transition);
	text-shadow: none;
}
.login .button.button-primary:hover,
.login .button.button-primary:focus {
	background: var(--brand-700);
	border-color: var(--brand-700);
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(2, 48, 89, .35);
}

/* "Recuérdame" */
.login .forgetmenot label { font-weight: 500; color: var(--ink-500); }

/* ---------- Enlaces auxiliares ---------- */
.login #nav,
.login #backtoblog {
	text-align: center;
	padding: 14px 0 0;
}
.login #nav a,
.login #backtoblog a {
	color: var(--brand-700);
	font-weight: 500;
	font-size: .88rem;
}
.login #nav a:hover,
.login #backtoblog a:hover {
	color: var(--accent-400);
}

/* ---------- Pie institucional ---------- */
.emp-login-footer {
	text-align: center;
	font-size: .82rem;
	color: var(--ink-500);
	padding: 22px 16px 28px;
	margin: 0;
}
.emp-login-footer a {
	color: var(--brand-700);
	font-weight: 600;
}
.emp-login-footer a:hover { color: var(--accent-400); }

/* Ocultamos el "idioma" switcher si aparece, para una vista limpia. */
.login .language-switcher { display: none; }

/* ---------- Responsive fino ---------- */
@media (max-width: 899px) {
	body.login {
		display: flex;
		flex-direction: column;
	}
	.emp-hero {
		flex: 0 0 auto;      /* no se encoge: crece según su contenido */
		min-height: auto;    /* deja de forzar 220px y recortar el contenido */
		padding: 52px 26px;
		text-align: center;
	}
	.emp-hero__content { margin: 0 auto; }
	#login { padding: 28px 20px 8px; }
}
