/* Login moderno — paleta A&A Firma (aandafirma.mx) */

:root {
	--aanda-blue: #004aad;
	--aanda-blue-dark: #304254;
	--aanda-blue-light: #1962ff;
	--aanda-teal: #0097b2;
	--aanda-gold: #c89116;
	--aanda-red: #bc2227;
	--aanda-text: #100f0d;
	--aanda-text-muted: #304254;
	--aanda-bg: #f3f4e7;
	--aanda-surface: #ffffff;
	--aanda-border: rgba(48, 66, 84, 0.22);
	--aanda-shadow: rgba(0, 74, 173, 0.18);
	--aanda-focus: rgba(0, 74, 173, 0.22);
}

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

html,
body.login-page {
	margin: 0;
	min-height: 100%;
}

body.login-page {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--aanda-text);
	background: var(--aanda-bg);
	-webkit-font-smoothing: antialiased;
}

.login-layout {
	display: grid;
	min-height: 100vh;
	grid-template-columns: 1fr;
}

.login-hero {
	display: none;
	background-color: #fff;
	background-image: url('../../images/fondo01.jpg');
	background-repeat: no-repeat;
	background-position: center bottom;
	background-size: cover;
	color: #fff;
	padding: 48px 40px;
	position: relative;
	overflow: hidden;
}

.login-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient(165deg, rgba(0, 74, 173, 0.78) 0%, rgba(48, 66, 84, 0.65) 50%, rgba(0, 151, 178, 0.45) 100%),
		radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.12), transparent 40%);
	pointer-events: none;
}

.login-hero__content {
	position: relative;
	z-index: 1;
	max-width: 420px;
}

.login-hero__eyebrow {
	margin: 0 0 12px;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.9;
}

.login-hero__title {
	margin: 0 0 16px;
	font-size: clamp(1.75rem, 4vw, 2.35rem);
	font-weight: 700;
	line-height: 1.2;
}

.login-hero__text {
	margin: 0;
	font-size: 1rem;
	opacity: 0.92;
	line-height: 1.6;
}

.login-panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 32px 20px 24px;
	position: relative;
}

.login-page--myrpabuelas .login-panel {
	background-color: var(--aanda-bg);
	background-image: url('../../images/terraza_01.jpeg');
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
}

.login-page--myrpabuelas .login-panel::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(243, 244, 231, 0.88) 0%, rgba(255, 255, 255, 0.78) 100%);
	pointer-events: none;
}

.login-page--myrpabuelas .login-card,
.login-page--myrpabuelas .login-footer-note {
	position: relative;
	z-index: 1;
}

.login-card {
	width: 100%;
	max-width: 420px;
	background: var(--aanda-surface);
	border-radius: 20px;
	border: 1px solid var(--aanda-border);
	box-shadow:
		0 4px 6px -1px rgba(16, 15, 13, 0.06),
		0 20px 40px -12px var(--aanda-shadow);
	padding: 32px 28px 28px;
}

.login-card__header {
	text-align: center;
	margin-bottom: 28px;
}

.login-card__logo {
	display: block;
	max-width: 200px;
	max-height: 88px;
	width: auto;
	height: auto;
	margin: 0 auto 20px;
	object-fit: contain;
}

.login-card__title {
	margin: 0 0 6px;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--aanda-blue);
}

.login-card__subtitle {
	margin: 0;
	font-size: 0.9rem;
	color: var(--aanda-text-muted);
}

.login-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.login-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.login-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--aanda-text-muted);
}

.login-input {
	width: 100%;
	margin: 0;
	padding: 12px 14px;
	font-size: 1rem;
	line-height: 1.4;
	color: #0f172a;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input:hover {
	border-color: #94a3b8;
	background: #fff;
}

.login-input:focus {
	outline: none;
	border-color: var(--aanda-blue);
	background: #fff;
	box-shadow: 0 0 0 3px var(--aanda-focus);
}

.login-input--select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 36px;
}

.login-company-pill {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 14px;
	background: linear-gradient(135deg, rgba(0, 74, 173, 0.08), rgba(0, 151, 178, 0.1));
	border: 1px solid rgba(0, 74, 173, 0.25);
	border-radius: 10px;
}

.login-company-pill__label {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--aanda-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.login-company-pill__value {
	font-size: 0.95rem;
	color: var(--aanda-blue);
	word-break: break-all;
}

.login-submit {
	width: 100%;
	margin: 4px 0 0;
	padding: 13px 20px;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, var(--aanda-blue) 0%, var(--aanda-teal) 100%);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	box-shadow: 0 8px 20px var(--aanda-shadow);
}

.login-submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 24px rgba(0, 74, 173, 0.35);
}

.login-submit:active {
	transform: translateY(0);
}

.login-submit:disabled {
	opacity: 0.7;
	cursor: wait;
	transform: none;
}

.login-forgot {
	margin: 0;
	text-align: center;
}

.login-forgot__link {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--aanda-blue);
	text-decoration: none;
}

.login-forgot__link:hover {
	color: var(--aanda-teal);
	text-decoration: underline;
}

.login-footer-note {
	margin: 20px 0 0;
	font-size: 0.75rem;
	color: var(--aanda-text-muted);
	text-align: center;
}

/* Compatibilidad con IDs antiguos */
#container {
	text-align: initial;
	margin: 0;
	width: auto;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

#login_box {
	width: 100%;
}

#login_logo {
	display: none;
}

#demo_text {
	margin: 0;
}

input.button,
.login-form .button {
	all: unset;
}

@media (min-width: 900px) {
	.login-layout {
		grid-template-columns: minmax(320px, 1.1fr) minmax(380px, 1fr);
	}

	.login-hero {
		display: flex;
		align-items: flex-start;
		justify-content: flex-start;
		padding-top: 48px;
		padding-bottom: 40px;
	}

	.login-panel {
		padding: 48px;
	}
}

@media (max-width: 399px) {
	.login-card {
		padding: 24px 18px 22px;
		border-radius: 16px;
	}
}
