/* Login MFA */
.kt-login.kt-login--v4 .kt-login__wrapper {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  width: 100%;
}

.kt-login.kt-login--v4 .kt-login__wrapper .kt-login__container {
  width: min(100%, 430px);
  margin: 0 auto;
}

.kt-login.kt-login--v4 .kt-login__container .kt-login__logo img {
  margin-bottom: .75rem;
  max-width: 220px;
}

.kt-login.kt-login--v4 .kt-login__container .kt-login__logo img.business-logo {
  max-height: 100px;
}

.kt-login.kt-login--v4 .kt-login__container .kt-login__head {
  margin-top: .5rem;
  margin-bottom: 1.5rem;
}

#form_mfa.mfa-card {
  width: min(100%, 430px);
  padding: 26px 36px 22px;
  border: 1px solid #edf0f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 42px rgb(19 48 66 / 12%);
}

#form_mfa.mfa-card h5 {
  margin: 0 0 .5rem;
  color: #003b55;
  font-size: 1.45rem;
  font-weight: 600;
}

#mfa_recovery_codes.mfa-recovery-card {
  width: min(100%, 430px);
  padding: 26px 30px 24px;
  border: 1px solid #edf0f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 42px rgb(19 48 66 / 12%);
}

#mfa_recovery_codes h5 {
  margin: 0 0 .5rem;
  color: #003b55;
  font-size: 1.35rem;
  font-weight: 600;
}

#mfa_recovery_codes > p {
  margin: 0 0 1.25rem;
  color: #667788;
  font-size: .95rem;
  line-height: 1.55;
}

.mfa-recovery-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin: 0 0 1.4rem;
  padding: 0;
}

.mfa-recovery-list li {
  min-width: 0;
  padding: .55rem .65rem;
  border: 1px solid #e5ebf0;
  border-radius: 7px;
  background: #f7f9fb;
  text-align: center;
}

.mfa-recovery-list code {
  color: #003b55;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .035em;
  overflow-wrap: anywhere;
  user-select: all;
}

#mfa_recovery_continue {
  width: 100%;
}

.mfa-recovery-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin: 0 0 .35rem;
}

.mfa-recovery-actions .btn {
  width: 100%;
  white-space: nowrap;
}

#mfa_recovery_codes > .mfa-recovery-feedback {
  min-height: 1.35rem;
  margin: 0 0 .65rem;
  color: #667788;
  font-size: .88rem;
  text-align: center;
}

#mfa_recovery_codes > .mfa-recovery-feedback.is-success {
  color: #16845b;
}

#mfa_recovery_codes > .mfa-recovery-feedback.is-error {
  color: #b42318;
}

#form_mfa.mfa-card #mfa_help {
  margin: 0;
  color: #667788;
  font-size: 1rem;
  line-height: 1.55;
}

#form_mfa .mfa-countdown {
  margin: .5rem 0 0;
  color: #667788;
  font-size: .92rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#form_mfa .mfa-countdown.is-expiring {
  color: #b45309;
  font-weight: 700;
}

#form_mfa #mfa_enroll {
  margin-top: 1rem;
  text-align: center;
}

#form_mfa #mfa_qr {
  max-width: min(100%, 220px);
  height: auto;
}

.mfa-enroll-secret {
  margin: .75rem auto 0;
  padding: .65rem .8rem;
  border: 1px solid #e5ebf0;
  border-radius: 8px;
  background: #f7f9fb;
  color: #667788;
  font-size: .88rem;
  text-align: left;
}

.mfa-enroll-secret span {
  display: block;
  margin-bottom: .25rem;
}

.mfa-enroll-secret code {
  display: block;
  color: #003b55;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .035em;
  overflow-wrap: anywhere;
  user-select: all;
}

.mfa-code-field {
  position: relative;
  width: min(100%, 360px);
  height: 56px;
  margin: 1.1rem auto 0;
}

.mfa-code-slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  height: 100%;
}

.mfa-code-slots span {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
  color: #003b55;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.mfa-code-slots span.is-current {
  border-color: #003b55;
  box-shadow: 0 0 0 1px #003b55;
}

.mfa-code-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: .01;
  cursor: text;
}

.mfa-code-field:focus-within .mfa-code-slots span.is-current {
  border-color: #0087d7;
  box-shadow: 0 0 0 2px rgb(0 135 215 / 18%);
}

.mfa-code-field.is-recovery {
  height: 46px;
}

.mfa-code-field.is-recovery .mfa-code-slots {
  display: none;
}

.mfa-code-field.is-recovery .mfa-code-input {
  position: relative;
  opacity: 1;
  padding: 0 1rem;
  border: 1px solid #e2e5ec;
  border-radius: 4px;
  color: #595d6e;
  text-align: left;
}

.mfa-login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  row-gap: .85rem;
  column-gap: .5rem;
  margin-top: .8rem;
}

.mfa-login-actions .kt-login__btn-primary {
  width: 100%;
  grid-column: 1 / -1;
}

.mfa-login-actions #mfa_recovery_switch {
  justify-self: start;
}

.mfa-login-actions #mfa_cancel {
  justify-self: end;
}

.mfa-login-actions .btn-link {
  padding: .35rem .5rem;
  white-space: nowrap;
  font-size: .92rem;
}

/* Confirmación TOTP de acciones sensibles (modal de static.functions.js) */
.mfa-step-up {
  padding: .5rem .25rem 0;
  text-align: center;
}

.mfa-step-up__icon {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: .9rem;
  border-radius: 50%;
  background: rgb(0 135 215 / 10%);
  color: #0087d7;
  font-size: 2rem;
}

.mfa-step-up__title {
  margin: 0 0 .45rem;
  color: #003b55;
  font-size: 1.35rem;
  font-weight: 600;
}

.mfa-step-up__help {
  max-width: 340px;
  margin: 0 auto;
  color: #74788d;
  font-size: .95rem;
  line-height: 1.45;
}

.mfa-step-up .mfa-code-field {
  margin-top: 1.4rem;
}

.mfa-step-up .mfa-code-field.is-invalid .mfa-code-slots span {
  border-color: #fd397a;
  box-shadow: none;
}

.mfa-step-up__error {
  min-height: 1.35em;
  margin: .7rem 0 0;
  color: #fd397a;
  font-size: .9rem;
}

@media (max-width: 460px) {
  #form_mfa.mfa-card {
    padding: 24px 20px 20px;
  }

  .mfa-code-field {
    max-width: 100%;
    gap: 6px;
  }

  #mfa_recovery_codes.mfa-recovery-card {
    padding: 24px 20px 20px;
  }

  .mfa-recovery-list {
    gap: .4rem;
  }

  .mfa-recovery-list li {
    padding: .5rem .35rem;
  }

  .mfa-recovery-list code {
    font-size: .82rem;
  }

  .mfa-login-actions {
    column-gap: .25rem;
  }

  .mfa-login-actions .btn-link {
    padding-right: .25rem;
    padding-left: .25rem;
    font-size: .85rem;
  }
}

@media (max-width: 360px) {
  .mfa-recovery-actions {
    grid-template-columns: 1fr;
  }
}
