/* ==========================================================================
   QR MASCOTAS — Acceso del cliente (login / registro / recuperar / OTP)
   v4.25.38 · Tarjeta centrada, responsive y con una sola paleta.

   Solo capa visual: no cambia lógica, formularios, nonces ni AJAX.
   Se carga DESPUÉS de mcg-professional.css, que usa !important en inputs,
   botones y pestañas; por eso las reglas de aquí son más específicas.
   Paleta única (la misma de mcg-professional.css):
     --qrm-primary #123b5d · --qrm-primary-2 #1b6280 · acento #d4a84f
   ========================================================================== */

.mcg-auth-card {
	--mcga-ink: #123b5d;
	--mcga-ink-2: #1b6280;
	--mcga-gold: #d4a84f;
	--mcga-gold-2: #e8c47c;
	--mcga-line: #d9e1e9;
	--mcga-muted: #6b7785;
	--mcga-field: #f8fafc;
	--mcga-ico-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7785' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
	--mcga-ico-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7785' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
	--mcga-ico-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7785' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
	--mcga-ico-name: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7785' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

/* ---------- Contenedor: tarjeta centrada de 440 px ---------- */
.mcg-shell.mcg-shell-angosto:has(.mcg-auth-card) {
	max-width: 440px !important;
	padding: 24px 16px 44px !important;
}

.mcg-shell .mcg-auth-card {
	padding: 0 28px 28px !important;
	border: 1px solid #e5eaf0 !important;
	border-radius: 20px !important;
	box-shadow:
		0 1px 2px rgba(18, 59, 93, 0.06),
		0 24px 56px -22px rgba(18, 59, 93, 0.28) !important;
}

/* ---------- Franja de marca ---------- */
.mcg-shell .mcg-auth-card:not(.mcg-auth-card-tienda) .mcg-auth-brand {
	margin: 0 -28px 22px !important;
	padding: 26px 28px 20px !important;
	background: linear-gradient(160deg, var(--mcga-ink) 0%, var(--mcga-ink-2) 100%);
	border-bottom: 3px solid var(--mcga-gold);
}
.mcg-shell .mcg-auth-card .mcg-auth-logo {
	width: 56px;
	height: 56px;
	margin-bottom: 12px;
}
.mcg-shell .mcg-auth-card:not(.mcg-auth-card-tienda) .mcg-auth-tagline {
	color: rgba(255, 255, 255, 0.82);
	font-size: 14px;
	line-height: 1.45;
	max-width: 32ch;
}

/* ---------- Botón de Google ---------- */
.mcg-shell .mcg-auth-card .mcg-google-btn-wrap {
	width: 100%;
	overflow: hidden;
	min-height: 48px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--mcga-line);
}

/* ---------- Pestañas (Iniciar sesión / Crear cuenta) ---------- */
.mcg-shell .mcg-auth-card .mcg-auth-tabs {
	background: #eef3f6 !important;
	border: 1px solid #e1e8ee !important;
	border-radius: 12px !important;
	padding: 4px !important;
	margin-bottom: 22px;
}
.mcg-shell .mcg-auth-card .mcg-auth-tab-label,
.mcg-shell .mcg-auth-card .mcg-auth-tab-label:hover {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 10px;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0;
	text-transform: none;
	color: #61717f !important;
	background: transparent !important;
	box-shadow: none !important;
	border-radius: 9px !important;
	-webkit-tap-highlight-color: transparent;
}
.mcg-shell .mcg-auth-card .mcg-auth-tab-label:hover { color: var(--mcga-ink) !important; }
.mcg-shell .mcg-auth-tab-radio:nth-of-type(1):checked ~ .mcg-auth-tabs label:nth-of-type(1),
.mcg-shell .mcg-auth-tab-radio:nth-of-type(2):checked ~ .mcg-auth-tabs label:nth-of-type(2),
.mcg-shell .mcg-auth-tab-radio:nth-of-type(1):checked ~ .mcg-auth-tabs label:nth-of-type(1):hover,
.mcg-shell .mcg-auth-tab-radio:nth-of-type(2):checked ~ .mcg-auth-tabs label:nth-of-type(2):hover {
	color: #fff !important;
}
.mcg-shell .mcg-auth-card .mcg-auth-tab-indicador {
	border-radius: 9px;
	background: linear-gradient(135deg, var(--mcga-ink) 0%, var(--mcga-ink-2) 100%);
	box-shadow: 0 4px 10px rgba(18, 59, 93, 0.28);
}
/* Navegación con teclado: la pestaña enfocada se ve. */
.mcg-shell .mcg-auth-tab-radio:focus-visible ~ .mcg-auth-tabs {
	outline: 3px solid rgba(212, 168, 79, 0.55);
	outline-offset: 2px;
}

/* ---------- Campos ---------- */
.mcg-shell .mcg-auth-card .mcg-auth-form .mcg-campo { margin-bottom: 14px; }
.mcg-shell .mcg-auth-card .mcg-auth-form .mcg-campo label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 700;
	color: #344756;
}
.mcg-shell .mcg-auth-card .mcg-auth-form .mcg-campo input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
	min-height: 48px;
	/* 16 px evita el zoom automático de iOS al tocar el campo. */
	font-size: 16px !important;
	padding: 12px 14px 12px 44px !important;
	color: #18212b !important;
	background-color: var(--mcga-field) !important;
	background-repeat: no-repeat !important;
	background-position: 14px center !important;
	background-size: 18px 18px !important;
	border: 1px solid var(--mcga-line) !important;
	border-radius: 12px !important;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
}
/* Íconos: mcg-professional.css los anulaba con "background: #fff !important". */
.mcg-shell .mcg-auth-card .mcg-auth-form input[name="mcg_login_user"],
.mcg-shell .mcg-auth-card .mcg-auth-form input[name="mcg_reg_usuario"],
.mcg-shell .mcg-auth-card .mcg-auth-form input[name="mcg_reset_user"] { background-image: var(--mcga-ico-user) !important; }
.mcg-shell .mcg-auth-card .mcg-auth-form input[name="mcg_login_pass"],
.mcg-shell .mcg-auth-card .mcg-auth-form input[name="mcg_reg_pass"],
.mcg-shell .mcg-auth-card .mcg-auth-form input[name="mcg_reset_pass1"],
.mcg-shell .mcg-auth-card .mcg-auth-form input[name="mcg_reset_pass2"] { background-image: var(--mcga-ico-lock) !important; }
.mcg-shell .mcg-auth-card .mcg-auth-form input[name="mcg_reg_correo"] { background-image: var(--mcga-ico-mail) !important; }
.mcg-shell .mcg-auth-card .mcg-auth-form input[name="mcg_reg_nombre"] { background-image: var(--mcga-ico-name) !important; }

.mcg-shell .mcg-auth-card .mcg-auth-form .mcg-campo input:not([type="checkbox"]):not([type="radio"]):focus {
	background-color: #fff !important;
	border-color: var(--mcga-ink-2) !important;
	box-shadow: 0 0 0 3px rgba(27, 98, 128, 0.16) !important;
	outline: none !important;
}
.mcg-shell .mcg-auth-card .mcg-auth-form .mcg-campo input:user-invalid {
	border-color: #c0392b !important;
	box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12) !important;
}
/* Código OTP: grande, centrado, sin ícono. */
.mcg-shell .mcg-auth-card .mcg-auth-form .mcg-campo input.mcg-otp-input {
	padding: 12px 10px 12px 20px !important;
	background-image: none !important;
	font-size: 26px !important;
	letter-spacing: 10px;
	text-align: center;
}

/* ---------- Mostrar / ocultar contraseña (lo crea mcg-login-ux.js) ---------- */
.mcg-pass-wrap { position: relative; }
.mcg-shell .mcg-auth-card .mcg-pass-wrap input { padding-right: 52px !important; }
.mcg-shell .mcg-auth-card .mcg-pass-wrap .mcg-pass-toggle {
	position: absolute;
	top: 50%;
	right: 4px;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0 !important;
	color: var(--mcga-muted);
	background: transparent !important;
	border: 0 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	cursor: pointer;
}
.mcg-shell .mcg-auth-card .mcg-pass-wrap .mcg-pass-toggle:hover {
	color: var(--mcga-ink);
	transform: translateY(-50%);
	box-shadow: none;
}
.mcg-shell .mcg-auth-card .mcg-pass-wrap .mcg-pass-toggle:focus-visible {
	outline: 3px solid rgba(212, 168, 79, 0.6);
	outline-offset: -2px;
}
.mcg-pass-toggle svg { width: 20px; height: 20px; pointer-events: none; }
.mcg-pass-toggle .mcg-ojo-oculto { display: none; }
.mcg-pass-toggle[aria-pressed="true"] .mcg-ojo-visible { display: none; }
.mcg-pass-toggle[aria-pressed="true"] .mcg-ojo-oculto { display: block; }

/* ---------- Recordar sesión / olvidé contraseña ---------- */
.mcg-shell .mcg-auth-card .mcg-auth-recordar {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0 0 4px;
	font-size: 13.5px;
	font-weight: 500;
	color: #4a5c6b;
}
.mcg-shell .mcg-auth-card .mcg-auth-recordar input[type="checkbox"] {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	min-height: 0;
	margin: 0;
	padding: 0 !important;
	accent-color: var(--mcga-ink);
}
.mcg-shell .mcg-auth-card .mcg-auth-olvide {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--mcga-ink-2);
}
.mcg-shell .mcg-auth-card .mcg-auth-nota { font-size: 12.5px; line-height: 1.5; }

/* ---------- Botones ---------- */
.mcg-shell .mcg-auth-card .mcg-btn-ancho {
	width: 100%;
	min-height: 50px;
	margin-top: 16px;
	padding: 12px 16px !important;
	font-size: 15px;
	font-weight: 700 !important;
	letter-spacing: 0.01em;
	border: 0 !important;
	border-radius: 12px !important;
}
.mcg-shell .mcg-auth-card .mcg-btn-ancho:not(.mcg-btn-secundario):not(.mcg-btn-tienda-solido) {
	color: #fff !important;
	background: linear-gradient(135deg, var(--mcga-ink) 0%, var(--mcga-ink-2) 100%) !important;
	box-shadow: 0 10px 20px -10px rgba(18, 59, 93, 0.55) !important;
}
/* "Crear cuenta": dorado de la marca (professional lo dejaba blanco). */
.mcg-shell .mcg-auth-card .mcg-btn-secundario.mcg-btn-ancho {
	color: #1d2a38 !important;
	background: linear-gradient(135deg, var(--mcga-gold-2) 0%, var(--mcga-gold) 100%) !important;
	box-shadow: 0 10px 20px -12px rgba(166, 124, 46, 0.6) !important;
}
.mcg-shell .mcg-auth-card .mcg-btn-ancho:active { transform: translateY(0); }
.mcg-shell .mcg-auth-card .mcg-btn-ancho:focus-visible {
	outline: 3px solid rgba(212, 168, 79, 0.65);
	outline-offset: 2px;
}

/* ---------- Mensajes ---------- */
.mcg-shell .mcg-auth-card .mcg-flash {
	margin: 0 0 16px;
	padding: 12px 14px;
	font-size: 13.5px;
	line-height: 1.45;
	border-radius: 12px !important;
}

/* ---------- Móvil ---------- */
@media (max-width: 480px) {
	.mcg-shell.mcg-shell-angosto:has(.mcg-auth-card) {
		padding: 12px 12px 32px !important;
	}
	.mcg-shell .mcg-auth-card { padding: 0 20px 22px !important; border-radius: 18px !important; }
	.mcg-shell .mcg-auth-card:not(.mcg-auth-card-tienda) .mcg-auth-brand {
		margin: 0 -20px 18px !important;
		padding: 20px 20px 16px !important;
	}
	.mcg-shell .mcg-auth-card .mcg-auth-logo { width: 48px; height: 48px; margin-bottom: 10px; }
	.mcg-shell .mcg-auth-card .mcg-auth-tab-label { font-size: 13.5px !important; padding: 8px 6px; }
	.mcg-shell .mcg-auth-card .mcg-auth-form .mcg-campo input.mcg-otp-input {
		font-size: 24px !important;
		letter-spacing: 8px;
	}
}
@media (max-width: 360px) {
	.mcg-shell .mcg-auth-card { padding: 0 16px 20px !important; }
	.mcg-shell .mcg-auth-card:not(.mcg-auth-card-tienda) .mcg-auth-brand {
		margin: 0 -16px 16px !important;
		padding: 18px 16px 14px !important;
	}
	.mcg-shell .mcg-auth-card .mcg-auth-tagline { font-size: 13px; }
}

/* Pantallas bajas en horizontal: menos aire vertical. */
@media (max-height: 520px) and (orientation: landscape) {
	.mcg-shell.mcg-shell-angosto:has(.mcg-auth-card) { padding-top: 8px !important; }
	.mcg-shell .mcg-auth-card:not(.mcg-auth-card-tienda) .mcg-auth-brand { padding-top: 14px !important; padding-bottom: 12px !important; }
	.mcg-shell .mcg-auth-card .mcg-auth-logo { width: 40px; height: 40px; margin-bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.mcg-shell .mcg-auth-card,
	.mcg-shell .mcg-auth-card * { animation: none !important; transition: none !important; }
}
