/* ========== TOKENS (DESIGN SYSTEM) ========== */
:root {
	/* Paleta solicitada */
	--color-primary: #5d8a2f;	/* Verde principal */
	--color-accent: #d0d63a;	/* Amarillo lima */
	--color-dark: #28411f;	/* Verde muy oscuro */
	--color-secondary: #a8bd31;	/* Verde lima */

	/* Apoyos semánticos */
	--color-danger: #b91c1c;	/* Rojo para errores (semántico) */
	--color-surface: #ffffff;
	--color-bg: #f3f6ef;	/* Fondo suave neutro */
	--color-text: #2a2f24;	/* Texto principal sobre fondo claro */
	--color-muted: #6b735f;	/* Texto secundario */
	--color-border: #dfe6d8;	/* Bordes suaves */

	/* Tipografía y sizes */
	--font-family: sans-serif;
	--fs-14: 14px;
	--fs-15: 15px;
	--fs-18: 18px;
	--fs-24: 24px;

	/* Radii y sombras */
	--radius-1: 6px;
	--radius-2: 10px;
	--shadow-1: 0 4px 12px rgba(0,0,0,.10);
	--shadow-2: 0 8px 25px rgba(0,0,0,.10);

	/* Accesibilidad */
	--focus-ring-w: 3px;
	--focus-ring-color: var(--color-accent);
}

/* ========== RESETEO Y BASE ========== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
	height: 100%;
}

body {
	margin: 0;
	font-family: var(--font-family);
	background: var(--color-bg);
	color: var(--color-text);
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1.4;
}

img, svg, video {
	max-width: 100%;
	height: auto;
	display: block;
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
	outline: var(--focus-ring-w) solid var(--focus-ring-color);
	outline-offset: 2px;
	box-shadow: none;
}

.container-center {
	width: 100%;
	max-width: 900px;
	margin: 20px;
}

h1, h2, h3 {
	margin: 0 0 0.6rem;
	color: var(--color-dark);
}
/* ========== FORM ========== */
.form-group {
	margin-bottom: 15px;
	text-align: left;
}

.form-group label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: var(--fs-14);
	color: var(--color-muted);
}

.input,
.form-group input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-1);
	font-size: var(--fs-15);
	background: var(--color-surface);
	color: var(--color-text);
	transition: border-color .15s ease-in-out, background-color .15s ease-in-out;
}

.input:focus-visible,
.form-group input:focus-visible {
	border-color: var(--color-primary);
}

.password-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.password-wrapper input {
	padding-right: 45px;
}

.toggle-password {
	position: absolute;
	right: 15px;
	cursor: pointer;
	user-select: none;
	opacity: .7;
}

.toggle-password img {
	width: 20px;
	height: auto;
}

.form-row {
	display: flex;
	gap: 20px;
}
.form-row .form-group {
	flex: 1;
}

/* ========== BUTTONS ========== */
.btn,
.btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	width: 100%;
	padding: 12px;
	border: none;
	border-radius: var(--radius-1);
	font-size: var(--fs-18);
	font-weight: 700;
	cursor: pointer;
	transition: background-color .15s ease-in-out, transform .05s ease-in-out;
}

.btn-primary {
	background: var(--color-primary);
	color: #fff;
}

.btn-primary:hover {
	background: var(--color-dark);
}

.btn-primary:active {
	transform: translateY(1px);
}

/* ========== LINKS / SWITCH FORM ========== */
.switch-form {
	font-size: var(--fs-14);
}

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

.switch-form a:hover {
	text-decoration: underline;
}

/* ========== FLASH MESSAGES ========== */
.flash-message {
	padding: 5px 16px;
	margin-bottom: 20px;
	border-radius: var(--radius-1);
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	font-size: var(--fs-14);
}

.flash-message.success {
	border-left: 4px solid var(--color-primary);
	color: var(--color-dark);
}

.flash-message.error {
	border-left: 4px solid var(--color-danger);
	color: var(--color-dark);
}

/* ========== SMALL SCREENS (base mobile-first) ========== */
@media (min-width: 769px) {
	/* fila se mantiene en desktop; en mobile ya es columna por defecto si lo deseas */
}

/* ========== CONTENEDORES DE LA VISTA ========== */
.auth-surface {
	background: var(--color-surface);
	border-radius: var(--radius-2);
	box-shadow: var(--shadow-2);
	overflow: hidden;
}

/* Contenedor principal del layout (mobile-first: columna) */
.split-layout-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: transparent;
}

.split-pane {
	flex: none;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 24px;
	box-sizing: border-box;
}

/* Pane del logo */
.logo-pane {
	background: transparent;
	padding-bottom: 20px;
}

.logo-pane img { max-width: 180px; }

.form-pane {
	padding-top: 0;
}

.secondary-image-pane {
	order: 3;
	position: static;
	opacity: 1;
	z-index: 1;
	padding: 40px 20px;
	display: flex;
	justify-content: center;
}

.secondary-image-pane img {
	width: 250px;
	height: auto;
	border-radius: 8px;
}

.auth-container {
	background: var(--color-surface);
	box-shadow: var(--shadow-1);
	padding: 30px;
	border-radius: var(--radius-2);
	width: 90%;
	max-width: 400px;
	text-align: center;
}

.auth-container h2 {
	margin-bottom: 25px;
	color: var(--color-dark);
	font-size: var(--fs-24);
}

/* Separador */
.separator {
	border-top: 1px solid var(--color-border);
	margin: 25px 0;
}

/* ========== DESKTOP (dos columnas) ========== */
@media (min-width: 769px) {
	.split-layout-container {
		flex-direction: row;
		max-width: 900px;
		margin: 20px;
		background: var(--color-surface);
		border-radius: var(--radius-2);
		box-shadow: var(--shadow-2);
	}

	.split-pane {
		flex: 1;
		padding: 20px 40px;
	}

	.logo-pane {
		background: color-mix(in srgb, var(--color-accent) 12%, #fff 88%);
	}

	.logo-pane img {
		max-width: 90%;
	}

	/* Imagen secundaria fija en desktop */
	.secondary-image-pane {
		position: fixed;
		bottom: 20px;
		left: 20px;
		opacity: .5;
		z-index: -1;
		padding: 0;
	}

	.secondary-image-pane img {
		width: 444px;
	}

	.auth-container {
		background: transparent;
		box-shadow: none;
		padding: 0;
		width: 100%;
		max-width: 100%;
	}

	.form-row {
		display: flex;
		gap: 20px;
	}
}

@media (min-width: 1300px) and (max-width: 1600px) {
	.secondary-image-pane img { width: 340px; }
}

@media (min-width: 769px) and (max-width: 1300px) {
	.secondary-image-pane img { width: 280px; }
}
