*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	padding: 0;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: linear-gradient(135deg, #0D1B2A 0%, #1B2A4A 50%, #1565C0 100%);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ── Contenedor principal ─────────────── */
.login-wrapper {
	display: flex;
	width: 860px;
	min-height: 500px;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(0,0,0,0.45);
}

/* ── Panel izquierdo (branding) ───────── */
.login-brand {
	flex: 1;
	background: linear-gradient(160deg, #1565C0 0%, #0D47A1 60%, #0A2A6E 100%);
	padding: 52px 44px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	color: white;
}

.brand-logo {
	display: flex;
	align-items: center;
	gap: 14px;
}

.brand-logo-icon {
	width: 52px;
	height: 52px;
	background: rgba(255,255,255,0.15);
	border: 1.5px solid rgba(255,255,255,0.3);
	border-radius: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	color: #90CAF9;
}

.brand-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-logo-name { font-size: 19px; font-weight: 700; }
.brand-logo-sub  { font-size: 11px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 2px; }

.brand-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }

.brand-hero h2 {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 16px;
}

.brand-hero p {
	font-size: 14px;
	color: rgba(255,255,255,0.65);
	line-height: 1.7;
	margin: 0;
}

.brand-features {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.brand-feature {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: rgba(255,255,255,0.8);
}

.brand-feature .pi {
	width: 28px;
	height: 28px;
	background: rgba(255,255,255,0.12);
	border-radius: 7px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	flex-shrink: 0;
	color: #90CAF9;
}

/* ── Panel derecho (formulario) ───────── */
.login-form-panel {
	width: 380px;
	background: white;
	padding: 52px 44px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.login-form-panel h3 {
	font-size: 22px;
	font-weight: 700;
	color: #1565C0;
	margin: 0 0 6px;
}

.login-form-panel .login-welcome {
	font-size: 13px;
	color: #9E9E9E;
	margin: 0 0 32px;
}

/* fields */
.login-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 18px;
}

.login-field label {
	font-size: 12px;
	font-weight: 600;
	color: #546E7A;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.login-field .ui-inputfield {
	border: 1px solid #CFD8DC !important;
	border-radius: 8px !important;
	padding: 11px 14px !important;
	font-size: 14px !important;
	width: 100% !important;
	transition: border-color 0.18s, box-shadow 0.18s !important;
	color: #2C3E50 !important;
}

.login-field .ui-inputfield:focus {
	border-color: #1565C0 !important;
	box-shadow: 0 0 0 3px rgba(21,101,192,0.12) !important;
	outline: none !important;
}

/* mensajes */
.login-messages { margin-bottom: 18px; }

/* botón */
.login-btn.ui-button {
	width: 100% !important;
	background: #1565C0 !important;
	border-color: #1565C0 !important;
	border-radius: 8px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	padding: 13px !important;
	letter-spacing: 0.3px !important;
	box-shadow: 0 4px 14px rgba(21,101,192,0.3) !important;
	transition: background 0.18s, box-shadow 0.18s !important;
	margin-top: 8px !important;
}
.login-btn.ui-button:hover {
	background: #0D47A1 !important;
	border-color: #0D47A1 !important;
	box-shadow: 0 6px 20px rgba(21,101,192,0.4) !important;
}
.login-btn .ui-button-text { padding: 0 !important; }

.login-footer {
	text-align: center;
	margin-top: 24px;
}

.login-footer a {
	font-size: 12.5px;
	color: #1565C0;
	text-decoration: none;
}
.login-footer a:hover { text-decoration: underline; }

/* ── "Continuar con Google" ────────────────────────────────────────── */
.google-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 22px 0;
	color: #9E9E9E;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.google-divider::before,
.google-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #E0E0E0;
}

.google-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 11px;
	border: 1px solid #CFD8DC;
	border-radius: 8px;
	background: white;
	color: #37474F;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.18s, border-color 0.18s;
}
.google-btn:hover {
	background: #F5F7FA;
	border-color: #B0BEC5;
}
.google-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Banner de error del login con Google (?googleError=...) */
.google-error-banner {
	background: #FDECEA;
	border: 1px solid #F5C6C0;
	color: #7A2E24;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 13px;
	line-height: 1.45;
	margin: 0 0 18px;
	display: flex;
	gap: 10px;
	align-items: flex-start;
}
.google-error-banner .pi {
	font-size: 16px;
	color: #C62828;
	margin-top: 1px;
	flex-shrink: 0;
}

/* Banner "sesión cerrada por inicio en otro lugar" */
.kicked-banner {
	background: #FFF3CD;
	border: 1px solid #FFE69C;
	color: #6B4F00;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 13px;
	line-height: 1.45;
	margin: 0 0 18px;
	display: flex;
	gap: 10px;
	align-items: flex-start;
}
.kicked-banner .pi {
	font-size: 16px;
	color: #B8860B;
	margin-top: 1px;
	flex-shrink: 0;
}

/* ── Responsive móvil / tablet ──────────────────────────────────────
   Compartido por login.xhtml y register.xhtml. El wrapper de 860px con
   dos paneles lado a lado no cabe en pantallas angostas: se apila en
   columna y el branding se reduce al logo (el formulario es lo que el
   usuario vino a usar; hero y features son decorativos en móvil). */
@media (max-width: 900px) {
	body {
		padding: 16px 12px;
		align-items: flex-start; /* permite scrollear cuando el teclado en pantalla acorta el viewport */
	}
	.login-wrapper {
		flex-direction: column;
		width: 100%;
		max-width: 480px;
		margin: 0 auto;
		min-height: 0;
	}
	.login-brand { padding: 22px 24px; }
	.brand-hero, .brand-features { display: none; }
	.login-form-panel { width: 100%; padding: 30px 24px; }
}

/* Inputs con fuente ≥16px en táctil: Safari iOS hace zoom automático al
   enfocar campos con fuente menor y descoloca todo el layout. */
@media (hover: none) and (pointer: coarse) {
	.login-field .ui-inputfield { font-size: 16px !important; }
}
