html,
body {
  height: 100%;
}

body {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
  background-color: #f5f5f5;
}

.block-container {
  width: 100%;
  max-width: 450px;
  padding: 15px;
  margin: auto;
}

.form-signin .checkbox {
  font-weight: 400;
}
.form-signin .form-control {
  position: relative;
  box-sizing: border-box;
  height: auto;
  padding: 10px;
  font-size: 16px;
}
.form-signin .form-control:focus {
  z-index: 2;
}
.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

#app-icon {
  width: 280px;
  border-radius: 40px;
}

#verify-vendor-body {
  flex-direction: column;
}

.app-install-btn.w-200 {
  width: 200px;
}
.app-install-btn {
  text-align: center;
}

#login-error-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* === MFA helpers for legacy page (optional) === */

.chooser-grid {
  display: grid;
  gap: .5rem;
  margin-top: .5rem;
}

#mfa-code {
  text-align: center;
  letter-spacing: .18em;
  font-weight: 600;
}

/* Keep the resend countdown readable but subtle */
#mfa-resend-countdown {
  margin-left: .25rem;
  color: #6c757d; /* Bootstrap muted */
}

/* TOTP QR container */
.qr-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e9ecef;
  border-radius: .5rem;
  padding: 12px;
  background: #fff;
}

/* Backup codes block */
.backup-codes {
  background: #fff;
  border: 1px dashed #ced4da;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: .5rem;
  padding: .75rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .95rem;
  line-height: 1.3;
}

/* Ensure all auth forms line up with legacy layout */
#login-form,
#mfa-form,
#mfa-enroll {
  max-width: 450px;
}

/* Keep alert close button clickable in narrow layouts */
#login-error .close,
#mfa-error .close,
#enroll-error .close {
  line-height: 1;
}
