/* Diseño de las pantallas de acceso del Portal Visas. */
body.auth-refresh {
  --auth-blue: #085591;
  --auth-blue-dark: #073d69;
  --auth-yellow: #ffe100;
  --auth-ink: #173653;
  --auth-muted: #6b8092;
  min-height: 100dvh;
  background: #f3f7fa;
  color: var(--auth-ink);
  font-family: 'Montserrat', sans-serif;
}

body.auth-refresh .navbar {
  min-height: 66px;
  padding: 0 clamp(16px, 3vw, 48px);
  background: #fff !important;
  border-bottom: 1px solid #e5edf3;
  box-shadow: none !important;
}
body.auth-refresh .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #103d64;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.025em;
}
body.auth-refresh .navbar-brand::before {
  content: '';
  display: block;
  width: 29px;
  height: 29px;
  background: url('../img/portal-visas-favicon.png') center / contain no-repeat;
}

body.auth-refresh main {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  padding: 36px 24px;
}

body.auth-refresh .login-form {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: clamp(28px, 3.5vw, 42px);
  border: 1px solid #e2ebf2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(23, 54, 83, .09);
  text-align: left !important;
}
body.auth-refresh .login-form img.form-logo {
  display: block;
  width: 100%;
  max-width: 275px;
  height: auto;
  margin: 0 0 24px;
}
body.auth-refresh:not(.auth-login) .login-form::before {
  content: '';
  display: block;
  width: 215px;
  height: 96px;
  margin: 0 0 22px;
  background: url('../img/portal-visas-login.png') left center / contain no-repeat;
}
body.auth-refresh .login-form .titulo,
body.auth-refresh .login-form .subtitulo {
  margin: 0 0 10px !important;
  color: #122f49;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(22px, 2.5vw, 27px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.035em;
}
body.auth-refresh .login-form > p:not(.subtitulo) {
  margin: 0 0 28px !important;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.6;
}
body.auth-refresh .login-form .subtitulo { margin-bottom: 27px !important; }
body.auth-refresh .login-form .form-control {
  min-height: 49px;
  padding: 11px 14px;
  border: 1px solid #d8e3ec;
  border-radius: 10px;
  background: #fbfdff;
  color: #173653;
  font-size: 14px;
  box-shadow: none;
}
body.auth-refresh .login-form .form-control::placeholder { color: #8b9bac; }
body.auth-refresh .login-form .form-control:focus {
  border-color: #2684c9;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(38, 132, 201, .13);
}
body.auth-refresh .auth-password-field {
  position: relative;
}
body.auth-refresh .auth-password-field .form-control {
  padding-right: 55px;
}
body.auth-refresh .auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #637d91;
  cursor: pointer;
}
body.auth-refresh .auth-password-toggle:hover {
  background: #edf5fa;
  color: var(--auth-blue);
}
body.auth-refresh .auth-password-toggle:focus-visible {
  outline: 3px solid var(--auth-yellow);
  outline-offset: 2px;
}
body.auth-refresh .auth-password-toggle svg {
  width: 20px;
  height: 20px;
}
body.auth-refresh .auth-password-toggle .auth-eye-slash {
  display: none;
}
body.auth-refresh .auth-password-toggle.is-visible .auth-eye-slash {
  display: initial;
}
body.auth-refresh .auth-password-rules {
  margin-top: 0;
  padding: 13px 15px 14px;
  border: 1px solid #e2ebf2;
  border-radius: 11px;
  background: #f7fafc;
}
body.auth-refresh .auth-password-rules p {
  margin: 0 0 9px;
  color: #395b74;
  font-size: 12px;
  font-weight: 700;
}
body.auth-refresh .auth-password-rules ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.auth-refresh .auth-password-rules li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #657c8e;
  font-size: 12px;
  line-height: 1.45;
  transition: color .15s ease;
}
body.auth-refresh .auth-password-rules li::before {
  content: '\2713';
  display: inline-flex;
  flex: 0 0 16px;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 0;
  border: 1px solid #c8d8e3;
  border-radius: 50%;
  background: #fff;
  color: transparent;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
body.auth-refresh .auth-password-rules li.is-met {
  color: #17734a;
  font-weight: 600;
}
body.auth-refresh .auth-password-rules li.is-met::before {
  border-color: #198754;
  background: #198754;
  color: #fff;
}
body.auth-refresh .login-form a {
  color: var(--auth-blue);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
body.auth-refresh .login-form a:hover { color: var(--auth-blue-dark); text-decoration: underline; }
body.auth-refresh .login-form .btn-primario {
  min-height: 49px;
  border-radius: 10px;
  background: var(--auth-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 7px 16px rgba(8, 85, 145, .16);
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
body.auth-refresh .login-form .btn-primario.w-100 { width: 100% !important; }
body.auth-refresh .login-form .btn-primario:hover {
  background: var(--auth-blue-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(8, 85, 145, .22);
}
body.auth-refresh .login-form .btn-primario:focus-visible {
  outline: 3px solid #e6c931;
  outline-offset: 3px;
}
body.auth-refresh footer {
  padding: 16px !important;
  border-top: 1px solid #e5edf3;
  background: #fff !important;
  color: #72879a;
  font-size: 11px;
}

/* Avisos de acceso, registro y recuperacion. No afectan los modales del portal. */
body.auth-refresh .modal-backdrop.show {
  background: #102f48;
  opacity: .58;
}
body.auth-refresh #mensajeModal .modal-dialog {
  width: calc(100% - 32px) !important;
  max-width: 470px !important;
  margin: 16px auto !important;
  min-height: calc(100% - 32px);
  height: auto !important;
  display: flex;
  align-items: center;
}
body.auth-refresh #mensajeModal .modal-content {
  height: auto !important;
  max-height: calc(100dvh - 32px);
  padding: 0 !important;
  overflow-y: auto;
  border: 1px solid #dce8f0 !important;
  border-radius: 20px !important;
  background: #fff;
  box-shadow: 0 26px 70px rgba(10, 35, 56, .25) !important;
}
body.auth-refresh #mensajeModal .modal-header {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 14px;
  min-height: 0;
  padding: 25px 26px 19px;
  border: 0 !important;
  background: #eef6fc !important;
  color: var(--auth-ink) !important;
  position: relative;
}
body.auth-refresh #mensajeModal .modal-header::before {
  content: 'i';
  display: flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #d9eefa;
  color: var(--auth-blue);
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
}
body.auth-refresh #mensajeModal .modal-header.error {
  background: #fff1f1 !important;
}
body.auth-refresh #mensajeModal .modal-header.error::before {
  content: '!';
  background: #fbdfe1;
  color: #b72d3e;
}
body.auth-refresh #mensajeModal .modal-header.exito {
  background: #edf8f2 !important;
}
body.auth-refresh #mensajeModal .modal-header.exito::before {
  content: '\2713';
  background: #d7f0e2;
  color: #17734a;
}
body.auth-refresh #mensajeModal .modal-header.warning {
  background: #fff8e9 !important;
}
body.auth-refresh #mensajeModal .modal-header.warning::before {
  content: '!';
  background: #ffebbc;
  color: #8b610b;
}
body.auth-refresh #mensajeModal .modal-title {
  flex: 1 1 auto;
  margin: 0 !important;
  color: #173653 !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left !important;
}
body.auth-refresh #mensajeModal .modal-body {
  padding: 22px 26px 15px;
  color: #526b7f;
  font-size: 14px;
  line-height: 1.7;
  text-align: left !important;
  overflow-wrap: anywhere;
}
body.auth-refresh #mensajeModal .modal-footer {
  display: flex;
  justify-content: flex-end !important;
  gap: 9px;
  padding: 8px 26px 25px;
  border: 0 !important;
  background: #fff !important;
}
body.auth-refresh #mensajeModal .modal-footer .btn {
  min-width: 110px;
  min-height: 42px;
  margin: 0;
  padding: 9px 17px;
  border: 0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}
body.auth-refresh #mensajeModal .modal-footer .btn-primario {
  background: var(--auth-blue);
  color: #fff;
}
body.auth-refresh #mensajeModal .modal-footer .btn-primario:hover {
  background: var(--auth-blue-dark);
  color: #fff;
}
body.auth-refresh #mensajeModal .modal-footer .btn-error {
  background: #b72d3e;
  color: #fff;
}
body.auth-refresh #mensajeModal .modal-footer .btn-error:hover {
  background: #8f2030;
  color: #fff;
}
body.auth-refresh #mensajeModal .modal-footer .btn:focus-visible {
  outline: 3px solid var(--auth-yellow);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  body.auth-refresh main {
    padding: 32px 18px;
  }
  body.auth-refresh .login-form { max-width: 480px; }
}
@media (max-width: 575px) {
  body.auth-refresh .navbar { min-height: 58px; }
  body.auth-refresh .navbar-brand { font-size: 15px; }
  body.auth-refresh main { padding: 24px 12px; }
  body.auth-refresh .login-form { padding: 27px 23px; border-radius: 18px; }
  body.auth-refresh .login-form img.form-logo { max-width: 250px; }
  body.auth-refresh:not(.auth-login) .login-form::before { width: 190px; height: 85px; }
  body.auth-refresh #mensajeModal .modal-header { padding: 21px 21px 15px; }
  body.auth-refresh #mensajeModal .modal-body { padding: 20px 21px 13px; }
  body.auth-refresh #mensajeModal .modal-footer { padding: 8px 21px 21px; }
  body.auth-refresh #mensajeModal .modal-footer .btn { flex: 1 1 auto; }
}
@media (max-width: 360px) {
  body.auth-refresh .auth-password-rules ul { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  body.auth-refresh .login-form .btn-primario { transition: none; }
}
