:root{
  --login-rojo-sissan: #A61C1C;
  --login-rojo-sissan-oscuro: #8E1717;
  --login-rojo-sissan-claro: #DB2727;
  --btn-shadow-hover: 0 3px 7px rgba(0,0,0,0.18);
  --focus-ring: 0 0 0 3px rgba(166,28,28,.28);
  --btn-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

/* texto seleccionado */
::selection {
	background-color: #cbcbcb;
}

html{
	overflow-y: hidden;
}

form.Form,
table.TablaContenedora{
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: #f0f0f0 !important;
	flex-direction: column;
	min-height: 615px;
}

table.TablaContenedora{
	height: calc(100vh - 61px);
}

* {
	box-sizing: border-box;
	border-spacing: 0;
}

body.login-body {
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: transparent !important;
}

body.login-body,
body.login-body *{
	font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

img.imgLogo{
	max-width: 250px;
	display: block;
	margin-right: auto;
	margin-left: auto;
	margin-bottom: 8px;
	user-select: none;
	max-height: 65px;
}

#IMAGELOGO_MPAGE {
	margin-left: 8px;
	margin-right: 11px;
}

#IMAGELOGOTEXTO_MPAGE {
	display: block;
	max-height: 30px;
}

#TXTVERSION_MPAGE {
	color: #6c757d;
	font-weight: 400;
	margin-left: 2px;
}

#LBLVERSION_MPAGE {
	margin: auto !important;
	display: inline !important;
}

.version_logo {
	color: #d39e00;
	font-weight: 600;
	font-size: 11px;
	line-height: 1.2;
	font-family: "Aptos", sans-serif !important;
}

div.version_logo span{
	-webkit-text-stroke: 2px #fff;
	paint-order: stroke fill;
}

table.Table_logo_mspybs #IMAGELOGOTEXTO_MPAGE{
	margin-bottom: -5px;
}


/* ===============================
   CONTENEDOR
================================ */
.login-wrapper {
	padding: 20px;
}

.login-card {
	background: #fafbfc;
	border-radius: 14px;
	padding: 32px 36px 32px 34px;
	box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.login-card.saliendo {
	opacity: 0;
	transform: scale(0.95) rotateY(15deg);
}


#HEADERTABLE_MPAGE{
	transform: translateY(-100%);
	opacity: 0;
	transition: transform .45s ease, opacity .45s ease;
}

.login-card{
	opacity: 0;
	transform: perspective(800px) rotateX(-15deg) scale(.95);
	transition: opacity .45s ease, transform .45s ease;
}

#HEADERTABLE_MPAGE.visible {
	transform: translateY(0);
	opacity: 1;
}

.login-card.visible {
	opacity: 1;
	transform: perspective(800px) rotateX(0) scale(1);
	position: relative;
	z-index: 999;
}


/* ===============================
   HEADER
================================ */
.login-header {
	text-align: center;
	margin-bottom: 15px;
}

.login-header.usuario {
	margin-bottom: 28px;
}

.login-logo {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.login-version {
	font-size: 12px;
	color: #777;
	user-select: none;
}

/* ===============================
   FORM
================================ */
.login-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	width: 298px;
}

.campo{
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
}

.seccion-empdep .lblTitulo{
	font-weight: 600;
	font-size: 10pt;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	color: #333;
}

.campo label,
.TextBlock {
	font-size: 13px;
	color: #444;
	font-weight: 500;
}

.campo input,
.campo select,
.ComboEmpresa,
.ReadonlyComboEmpresa {
	height: 37px !important;
	padding: 0 12px;
	font-size: 14px !important;
	border-radius: 8px !important;
	border: 1px solid #d0d5dd !important;
	background: #fff;
	transition: border-color .2s, box-shadow .2s;
	width: 100%;
}

.ComboEmpresa,
.ReadonlyComboEmpresa {
	text-align: left;
	line-height: 2.3;
	background-color: #fafbfc;
}

.campo input:focus,
.campo select:focus {
	outline: none;
	border-color: #b71c1c;
	box-shadow: 0 0 0 2px rgba(183,28,28,0.15);
}

.TablaLogin{
	height: 225px;
}

.TablaLogin.EmpDep{
	height: 238px;
}

/* ===============================
   PASSWORD + OJO
================================ */
.password-wrapper {
	position: relative;
	width: 100%;
}

.password-wrapper input {
	width: 100%;
	padding-right: 44px;
}

.btn-ver-password {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 6px;
	color: #777;
}

.btn-ver-password:hover {
	color: #b71c1c;
}

.btn-ver-password:focus {
	outline: none;
}

.icono-ojo {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.icono-ojo-abierto {
	display: none;
	transform: translateY(-1px);
}

.btn-ver-password.activo .icono-ojo-cerrado {
	display: none;
}

.btn-ver-password.activo .icono-ojo-abierto {
	display: block;
}

/* ===============================
   BOTÓN
================================ */

.btn-login:hover {
	background: var(--login-rojo-sissan-oscuro);
	box-shadow: var(--btn-shadow-hover);
}

.btn-login:active{
	background-color: #751212;
	box-shadow: none;
	outline: none;
}

.btn-login:focus-visible{
	outline: none;
	box-shadow: var(--focus-ring), var(--btn-shadow);
}

.btn-login {
	height: 42px;
	width: 200px;
	border: none;
	border-radius: 10px;
	background: var(--login-rojo-sissan);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition:
		background 220ms ease,
		box-shadow 220ms ease,
		transform 220ms cubic-bezier(.22,1,.36,1);
}

.btn-login.btn-acceder {
	background: #b71a1a;
}

.btn-login.animar-etapa {
	animation: pulsoEtapa 260ms ease-out;
}

.ErrorViewer.gx_ev div {
	margin: 0;
	display: block;
	padding: 2px 14px;
	line-height: 1.2;
}

.ErrorViewer.gx_ev{
	opacity: 0;
	display: none;
}

.ErrorViewer.gx_ev:has(> div){
	background-color: #fdecea !important;
	color: #b71c1c;
	border: 1px solid #f5c2c0;
	border-radius: 7px;
	margin-right: auto;
	margin-left: auto;
	width: 298px;
	line-height: 1;
	padding: 5px 0;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	font-size: 14px;
	font-weight: normal;
	opacity: 0;
	transform: translateY(12px);
	will-change: opacity, transform;
	backface-visibility: hidden;
	animation: mostrarError 4.5s cubic-bezier(.22,1,.36,1) forwards;
}

iframe[name="EMBPAGELOGIN"]{
	width: 300px;
	height: 215px;
	z-index: 2;
	position: relative;
}

.seccion-login{
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: opacity 1s ease, transform 1s ease;
}

/* --- Override para el estado "En espera" --- */
#gx_ajax_notification {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 100000 !important;
  text-align: initial !important; /* anula el centrado de texto del theme */
  padding: 0 !important;
  margin: 0 !important;
  font: inherit !important;       /* anulamos la fuente que pone el theme */
}

/* Fondo translúcido gris oscuro */
#gx_ajax_notification > div {
  background: rgba(58, 58, 58, 0.40) !important;
  position: absolute !important;
  inset: 0 !important;
  opacity: 1 !important;
  filter: none !important;
}

/* Ocultar el GIF de GeneXus */
#gx_ajax_indicator { 
	display: none !important; 
}

/* Spinner circular con colores SISSAN */
#gx_ajax_notification::after {
  content: "";
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 6px solid #ffffff;
  border-top-color: #A61C1C;       /* rojo SISSAN #A61C1C */
  animation: gxSpin 0.8s linear infinite;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

/* Texto personalizado (ahora en blanco puro y con más contraste) */
#gx_ajax_notification::before {
  content: "Iniciando...";
  position: absolute;
  top: calc(40% + 52px);
  left: 50%;
  transform: translateX(-50%);
  font: 600 16px/1.2 Verdana, Arial, Helvetica, sans-serif;
  color: #A61C1C;                              /* <-- blanco puro */
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);      /* sombra más marcada para contraste */
  -webkit-text-stroke: 0.4px rgba(0,0,0,0.5); /* contorno sutil (Chrome/Edge) */
}

td[data-align="center"] {
  text-align: center;
}

@keyframes gxSpin {
  to { 
	transform: translate(-50%, -50%) rotate(360deg); 
  }
}

@keyframes pulsoEtapa {
	0% {
		transform: scale(1);
	}
	40% {
		transform: scale(1.03);
	}
	100% {
		transform: scale(1.01);
	}
}

@keyframes mostrarError {
	0% {
		opacity: 0;
		transform: translateY(12px);
	}

	12% {
		opacity: 1;
		transform: translateY(0);
	}

	75% {
		opacity: 1;
		transform: translateY(0);
	}

	100% {
		opacity: 0;
		transform: translateY(0);
	}
}
