/* ===================================================== */
/* RESET Y BASE                                          */
/* ===================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    "Roboto",
    system-ui,
    -apple-system,
    sans-serif;
}

body {
  background-color: #ffffff;
  color: #333;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===================================================== */
/* LOADER                                                */
/* ===================================================== */
#main-loader-container {
  position: fixed;
  inset: 0;
  background: rgba(0, 25, 71, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#main-loader-container.loader-hidden {
  display: none !important;
}

.loader-spinner svg {
  width: 60px;
  height: 60px;
  animation: spin 0.8s linear infinite;
}

.loader-spinner circle {
  stroke: #fff;
  stroke-dasharray: 90, 150;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

/* ===================================================== */
/* PÁGINA                                                */
/* ===================================================== */
.page {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 40px 24px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

.col-login {
  flex: 0 0 440px;
  max-width: 100%;
}

.col-info {
  flex: 1;
  max-width: 560px;
  padding-top: 20px;
}

/* ===================================================== */
/* LOGO + TÍTULO (misma fila)                            */
/* ===================================================== */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

.logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-full {
  max-width: 220px;
}

.logo-min {
  display: none;
  max-width: 40px;
}

.title-welcome {
  font-size: 26px;
  font-weight: 500;
  color: #000;
  line-height: 1.3;
  margin: 0;
  flex: 1;
}

/* ===================================================== */
/* BANNER AYUDA "¿Nunca has ingresado...?"               */
/* ===================================================== */
.help-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0043a9;
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  min-height: 72px;
}

.help-banner__img {
  flex: 0 0 56px;
  height: 56px;
}

.help-banner__img img,
.help-banner__img svg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.help-banner__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.help-banner__text p {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
  color: #fff;
}

.help-banner__text a {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.help-banner__text a:hover {
  text-decoration: underline;
}

/* ===================================================== */
/* CARD LOGIN                                            */
/* ===================================================== */
.login-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 24px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* ===================================================== */
/* TABS                                                  */
/* ===================================================== */
.tabs {
  position: relative;
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin: 0 -24px 0;
}

.tab {
  flex: 1;
  height: 52px;
  background: transparent;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #5c5c5c;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}

.tab--active {
  color: #0043a9;
}

.tab--active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #0043a9;
  z-index: 2;
}

.tab-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 50%;
  height: 2px;
  background: #0043a9;
  transition: transform 0.25s ease;
  z-index: 2;
}

/* ===================================================== */
/* INFO BANNER (a todo el ancho del card)                */
/* ===================================================== */
.info-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #d4e5f8;
  border-radius: 0;
  padding: 12px 24px;
  margin: 0 -24px 0;
  width: calc(100% + 48px);
  box-sizing: border-box;
}

.info-banner p {
  flex: 1;
  font-size: 13px;
  color: #0043a9;
  line-height: 1.45;
  margin: 0;
}

.info-banner__close {
  background: transparent;
  border: none;
  font-size: 18px;
  font-weight: 300;
  color: #0043a9;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}

.info-banner__close:hover {
  opacity: 0.7;
}

/* ===================================================== */
/* FORM                                                  */
/* ===================================================== */
.login-form {
  display: flex;
  flex-direction: column;
  padding-top: 16px;
}

.field-label {
  font-size: 13px;
  color: #333;
  margin-bottom: 6px;
}

.field-label--mt {
  margin-top: 14px;
}

/* ===================================================== */
/* ROW IDENTIFICACIÓN: dropdown + input lado a lado      */
/* ===================================================== */
.row-id {
  display: flex !important;
  flex-direction: row !important;
  gap: 8px !important;
  width: 100% !important;
  align-items: stretch !important;
  margin-bottom: 14px !important;
}

.row-id .dropdown {
  flex: 0 0 130px !important;
  min-width: 130px !important;
  max-width: 130px !important;
  position: relative !important;
}

.row-id .dropdown__btn {
  height: 44px !important;
  width: 100% !important;
  font-size: 14px !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.row-id #txtUsuario {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
}

/* ===================================================== */
/* DROPDOWN TIPO DOC                                     */
/* ===================================================== */
.dropdown {
  position: relative;
}

.dropdown__btn {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #b3b3b3;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s;
}

.dropdown__btn:hover,
.dropdown__btn:focus {
  border-color: #0043a9;
  outline: none;
}

.dropdown__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown__arrow {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.dropdown__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  min-width: 260px;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 67, 169, 0.15);
  display: none;
  z-index: 100;
}

.dropdown__menu--open {
  display: block;
}

.dropdown__item {
  padding: 10px 12px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown__item:hover {
  background: #f0f6ff;
  color: #0043a9;
}

/* ===================================================== */
/* INPUT TEXTO                                           */
/* ===================================================== */
.input-text {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #b3b3b3;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  background: #fff;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.input-text:focus {
  border-color: #0043a9;
  box-shadow: 0 0 0 3px rgba(0, 67, 169, 0.1);
}

.input-text.error {
  border-color: #f30437 !important;
}

/* ===================================================== */
/* INPUT CON OJO                                         */
/* ===================================================== */
.input-wrap {
  position: relative;
}

.input-wrap .input-text {
  padding-right: 44px;
}

.input-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pass-section,
#debito-section {
  margin-bottom: 14px;
}

/* Errores específicos por ID */
#txtUsuario.error,
#txtPass.error,
#claveDebito.error,
#ultimos4Debito.error {
  border-color: #f30437 !important;
}

/* ===================================================== */
/* ERROR                                                 */
/* ===================================================== */
.error-msg {
  display: none;
  color: #f30437;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}

.error-msg--show {
  display: block;
}

/* ===================================================== */
/* BOTÓN INGRESAR                                        */
/* ===================================================== */
.btn-ingresar {
  width: 100%;
  height: 48px;
  border: 1px solid #e6e6e6;
  border-radius: 100px;
  background: #f2f2f2;
  color: #808080;
  font-size: 16px;
  font-weight: 500;
  cursor: not-allowed;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.btn-ingresar--active {
  background: #0043a9;
  color: #fff;
  border-color: #0043a9;
  cursor: pointer;
}

.btn-ingresar--active:hover {
  background: #002c76;
  border-color: #002c76;
}

/* ===================================================== */
/* LINKS                                                 */
/* ===================================================== */
.links {
  display: flex;
  justify-content: space-around;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
}

.link-btn {
  background: transparent;
  border: none;
  color: #0043a9;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
}

.link-btn:hover {
  text-decoration: underline;
}

/* ===================================================== */
/* LEGAL                                                 */
/* ===================================================== */
.legal {
  font-size: 11px;
  color: #5c5c5c;
  line-height: 1.5;
  margin-top: 20px;
  padding: 0 4px;
}

.legal a {
  color: #0043a9;
  text-decoration: none;
}

.legal a:hover {
  text-decoration: underline;
}

/* ===================================================== */
/* COLUMNA DERECHA: BANNER AMARILLO                      */
/* ===================================================== */
.banner-ads {
  background: #ffc72c;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}

.banner-ads__inner {
  padding: 32px 24px;
  color: #0043a9;
}

.banner-ads__inner h2 {
  font-size: 32px;
  font-weight: 700;
  color: #0043a9;
  margin-bottom: 8px;
}

.banner-ads__inner p {
  font-size: 15px;
  margin-bottom: 16px;
}

.banner-ads__btn {
  background: #0043a9;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.banner-ads__btn:hover {
  background: #002c76;
}

/* ===================================================== */
/* CARRUSEL DE CARDS                                     */
/* ===================================================== */
.carousel-wrap {
  position: relative;
}

.carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel__item {
  flex: 0 0 160px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px 8px;
  font-size: 13px;
  color: #0043a9;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.carousel__item:hover {
  border-color: #0043a9;
  box-shadow: 0 2px 8px rgba(0, 67, 169, 0.1);
}

.carousel__icon {
  width: 40px;
  height: 40px;
}

.carousel__next {
  position: absolute;
  top: 50%;
  right: -18px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #0043a9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.carousel__next:hover {
  background: #f0f6ff;
}

.carousel__item--wide {
  flex: 0 0 180px;
  flex-direction: row;
  gap: 10px;
  padding: 14px 12px;
  min-height: 70px;
  text-align: left;
  justify-content: flex-start;
}

.carousel__item--wide .carousel__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.carousel__item--wide span {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: #0043a9;
}

.carousel--row2 {
  margin-top: 12px;
}

/* ===================================================== */
/* RESPONSIVE — TABLET                                   */
/* ===================================================== */
@media (max-width: 1024px) {
  .page {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 24px 16px;
  }

  .col-login {
    flex: 1 1 auto;
    width: 100%;
    max-width: 480px;
  }

  .col-info {
    width: 100%;
    max-width: 480px;
    padding-top: 0;
  }
}

/* ===================================================== */
/* RESPONSIVE — MÓVIL                                    */
/* ===================================================== */
@media (max-width: 600px) {
  .page {
    padding: 20px 12px;
  }

  .logo-wrap {
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
  }

  .logo-full {
    display: none;
  }
  .logo-min {
    display: block;
    max-width: 40px;
    max-height: 32px;
  }

  .title-welcome {
    font-size: 18px;
  }

  .help-banner {
    padding: 10px 12px;
    min-height: 64px;
  }

  .help-banner__img {
    flex: 0 0 44px;
    height: 44px;
  }

  .help-banner__img img,
  .help-banner__img svg {
    width: 44px;
    height: 44px;
  }

  .help-banner__text p,
  .help-banner__text a {
    font-size: 12px;
  }

  .login-card {
    padding: 0 16px 16px;
  }

  .tabs {
    margin: 0 -16px 0;
  }

  .info-banner {
    padding: 10px 16px;
    margin: 0 -16px 0;
    width: calc(100% + 32px);
  }

  .info-banner p {
    font-size: 12px;
  }

  .login-form {
    padding-top: 14px;
  }

  .row-id {
    margin-bottom: 12px !important;
  }

  .row-id .dropdown {
    flex: 0 0 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
  }

  #pass-section,
  #debito-section {
    margin-bottom: 12px;
  }

  .field-label--mt {
    margin-top: 12px;
  }

  .links {
    margin-top: 12px;
    padding-top: 12px;
  }

  .banner-ads__inner {
    padding: 24px 16px;
  }

  .banner-ads__inner h2 {
    font-size: 24px;
  }

  .carousel__item {
    flex: 0 0 140px;
    min-height: 120px;
  }

  .carousel__item--wide {
    flex: 0 0 160px;
    min-height: 64px;
    padding: 12px 10px;
  }

  .carousel__item--wide .carousel__icon {
    width: 24px;
    height: 24px;
  }

  .carousel__item--wide span {
    font-size: 11px;
  }

  .carousel__next {
    right: 4px;
  }
}
