.saved-work-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  height: calc(100vh - 82px);
  padding: 10px 14px 18px;
  overflow-y: auto;
}

.saved-work-toolbar {
  display: flex;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dbe5f0;
}

.saved-work-tab,
.saved-work-more,
.saved-work-action {
  appearance: none;
  border: 1px solid #237cc8;
  border-radius: 6px;
  background: #fff;
  color: #155f9f;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.saved-work-tab {
  min-width: 120px;
  padding: 8px 14px;
}

.saved-work-tab.is-active {
  background: #218cf0;
  color: #fff;
}

.saved-work-status {
  min-height: 20px;
  color: #415468;
  font-size: 13px;
}

.saved-work-status[data-state="error"],
.saved-work-status[data-state="conflict"] {
  color: #a12222;
}

.saved-work-status[data-state="saved"] {
  color: #166b3b;
}

.saved-work-autosave-status {
  min-height: 18px;
  padding: 0 10px 8px;
  color: #607286;
  font-size: 11px;
  text-align: center;
}

.saved-work-autosave-status[data-state="error"],
.saved-work-autosave-status[data-state="conflict"] {
  color: #a12222;
  font-weight: 700;
}

.saved-work-autosave-status[data-state="saved"] {
  color: #166b3b;
}

.saved-work-global-status {
  position: fixed;
  z-index: 9500;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 10px 14px;
  border: 1px solid #d88989;
  border-radius: 8px;
  background: #fff1f1;
  box-shadow: 0 5px 18px rgb(84 23 23 / 20%);
  color: #8e2323;
  font-size: 13px;
  font-weight: 700;
}

.saved-work-section {
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid #d8e4ef;
  border-radius: 8px;
  background: #f7faff;
}

.saved-work-section h3 {
  margin: 0 0 10px;
  color: #152840;
  font-size: 15px;
}

.saved-work-help {
  margin: -4px 0 10px;
  color: #607286;
  font-size: 12px;
}

.saved-work-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saved-work-empty {
  padding: 18px;
  border: 1px dashed #bdccdb;
  border-radius: 7px;
  background: #fff;
  color: #607286;
  text-align: center;
}

.saved-work-card {
  padding: 12px 14px;
  border: 1px solid #cbd9e7;
  border-left: 4px solid #238ce7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgb(28 52 77 / 8%);
  color: #1d2c3b;
}

.saved-work-card[tabindex] {
  cursor: pointer;
}

.saved-work-card:hover {
  border-color: #7eb6e8;
  box-shadow: 0 3px 10px rgb(28 84 132 / 12%);
}

.saved-work-card:focus-visible,
.saved-work-tab:focus-visible,
.saved-work-action:focus-visible,
.saved-work-star:focus-visible,
.saved-work-field input:focus-visible {
  outline: 3px solid rgb(33 140 240 / 32%);
  outline-offset: 2px;
}

.saved-work-card__header,
.saved-work-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saved-work-card__file {
  color: #123457;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.saved-work-star {
  width: 36px;
  height: 34px;
  padding: 0;
  border: 1px solid #cad6e2;
  border-radius: 7px;
  background: #fff;
  color: #8291a0;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.saved-work-star.is-active {
  border-color: #e0ae2c;
  background: #fff9df;
  color: #f3b700;
}

.saved-work-card__fields {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  margin: 10px 0;
}

.saved-work-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #536679;
  font-size: 11px;
  font-weight: 700;
}

.saved-work-field input {
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  border: 1px solid #c9d5e1;
  border-radius: 5px;
  padding: 7px 9px;
  background: #fff;
  color: #1d2c3b;
  font: inherit;
  font-size: 13px;
}

.saved-work-field input[readonly] {
  background: #f3f6f9;
}

.saved-work-card__dois {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.saved-work-doi {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7f3ff;
  color: #155f9f;
  font-size: 12px;
  font-weight: 700;
}

.saved-work-doi--empty {
  background: #eef2f5;
  color: #687786;
  font-weight: 600;
}

.saved-work-card__time,
.saved-work-purge-note {
  color: #617284;
  font-size: 12px;
}

.saved-work-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.saved-work-action {
  padding: 7px 12px;
  transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.08s ease, color 0.12s ease;
}

.saved-work-action--primary {
  background: #1e90ff;
  border-color: #1e90ff;
  color: #fff;
}

.saved-work-action--primary:hover {
  background: #1873cc;
  border-color: #1873cc;
}

.saved-work-action--primary:active {
  background: #125a98;
  border-color: #125a98;
  box-shadow: inset 0 2px 10px rgba(0, 24, 48, 0.35);
}

.saved-work-action--danger {
  border-color: #c97a7a;
  color: #962f2f;
}

.saved-work-action--danger:hover {
  background: #fff1f1;
  border-color: #b45454;
  color: #7d2424;
}

.saved-work-action--danger:active {
  background: #f8d6d6;
  border-color: #962f2f;
  color: #7d2424;
  box-shadow: inset 0 2px 8px rgba(120, 24, 24, 0.18);
}

.saved-work-more {
  display: block;
  margin: 12px auto 0;
  padding: 7px 18px;
}

.saved-work-more[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .saved-work-shell {
    height: calc(100vh - 72px);
    padding: 8px 10px 16px;
  }

  .saved-work-card__fields {
    grid-template-columns: 1fr;
  }

  .saved-work-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .saved-work-card__actions {
    width: 100%;
  }

  .saved-work-action {
    flex: 1;
  }
}

.auth-mfa-enrollment {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  text-align: center;
}

.auth-mfa-form {
  width: min(450px, 100%);
  margin: 0 auto;
}

.auth-mfa-form--enrollment > .auth-field {
  margin-top: 18px;
}

.auth-mfa-form--enrollment:has(#authMfaManualPanel:not(.hidden)) > .auth-field {
  margin-top: 10px;
}


.auth-mfa-enrollment p {
  margin: 2px 0;
}

.auth-mfa-scan-tail {
  display: block;
}

.auth-mfa-qr {
  width: calc(198px * 1.04);
  max-width: 100%;
  height: auto;
  border: 1px solid #d5e0ea;
  border-radius: 8px;
  background: #fff;
}

.auth-mfa-form .auth-mfa-manual-toggle {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  margin: 2px auto 0;
  padding: 2px 4px;
  border: none;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: #afc4ff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  gap: 8px;
  cursor: pointer;
  justify-content: center;
  align-items: center;
}

.auth-mfa-form .auth-mfa-manual-toggle:hover,
.auth-mfa-form .auth-mfa-manual-toggle:focus-visible {
  background: transparent;
  color: #ffffff;
}

.auth-mfa-manual-copy__icon,
.auth-mfa-manual-copy__check,
.auth-mfa-manual-help svg,
.auth-mfa-manual-close svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-mfa-manual-panel {
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
  padding: 12px 12px 12px 14px;
  border: 1px solid #44558a;
  border-radius: 10px;
  background: #0c1736;
  text-align: left;
}

.auth-mfa-manual-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.auth-mfa-manual-panel__title {
  display: flex;
  align-items: center;
  min-width: 0;
}

.auth-mfa-form .auth-mfa-manual-panel__title .auth-mfa-manual-help {
  margin: -6px 0 -6px calc(8px - 4px / 0.9);
}

.auth-mfa-form .auth-mfa-manual-help svg {
  width: 20px;
  height: 20px;
}

.auth-mfa-manual-panel__label {
  color: #d7e0f7;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.auth-mfa-manual-panel__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: -6px -6px -6px 0;
}

.auth-mfa-form .auth-mfa-manual-copy,
.auth-mfa-form .auth-mfa-manual-help,
.auth-mfa-form .auth-mfa-manual-close {
  display: inline-flex;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  flex: 0 0 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #8eabff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.auth-mfa-form .auth-mfa-manual-copy:hover,
.auth-mfa-form .auth-mfa-manual-copy:focus-visible,
.auth-mfa-form .auth-mfa-manual-help:hover,
.auth-mfa-form .auth-mfa-manual-help:focus-visible,
.auth-mfa-form .auth-mfa-manual-close:hover,
.auth-mfa-form .auth-mfa-manual-close:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #d5e2ff;
}

.auth-mfa-form .auth-mfa-manual-help {
  position: relative;
  z-index: 1;
}

.auth-mfa-form .auth-mfa-manual-help::before,
.auth-mfa-form .auth-mfa-manual-help::after {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.08s ease;
}

.auth-mfa-form .auth-mfa-manual-help::before {
  content: "";
  position: absolute;
  top: calc(100% - 2px);
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #e7edff;
}

.auth-mfa-form .auth-mfa-manual-help::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  z-index: 5;
  width: 268px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #e7edff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
  color: #10183a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.auth-mfa-form .auth-mfa-manual-help:hover,
.auth-mfa-form .auth-mfa-manual-help:focus-visible {
  z-index: 4;
}

.auth-mfa-form .auth-mfa-manual-help:hover::before,
.auth-mfa-form .auth-mfa-manual-help:hover::after,
.auth-mfa-form .auth-mfa-manual-help:focus-visible::before,
.auth-mfa-form .auth-mfa-manual-help:focus-visible::after {
  opacity: 1;
}

.auth-mfa-form .auth-mfa-manual-copy.is-copied {
  color: #9ef4c1;
}

.auth-mfa-manual-copy__check {
  display: none;
}

.auth-mfa-form .auth-mfa-manual-copy.is-copied .auth-mfa-manual-copy__icon {
  display: none;
}

.auth-mfa-form .auth-mfa-manual-copy.is-copied .auth-mfa-manual-copy__check {
  display: block;
}

.auth-mfa-secret {
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #f4f7ff;
  font: 600 15px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
  user-select: all;
  text-align: left;
}

#authMfaBack {
  position: static !important;
  left: auto !important;
  display: flex !important;
  width: fit-content !important;
  min-height: 28px;
  margin: 7px auto 0 !important;
  padding: 4px 10px !important;
  text-align: center;
  font-size: 13px;
  line-height: 1.2;
}

.auth-required-password-form .auth-setup-copy {
  max-width: 430px;
  margin-right: auto;
  margin-bottom: 18px;
  margin-left: auto;
  line-height: 1.4;
}

.auth-required-password-form .auth-field {
  margin-bottom: 14px;
}

.auth-required-password-back {
  position: static !important;
  left: auto !important;
  display: flex !important;
  width: fit-content !important;
  min-height: 28px;
  margin: 8px auto 0 !important;
  padding: 4px 10px !important;
  text-align: center;
  font-size: 13px;
  line-height: 1.2;
}

.auth-mfa-lockout-help {
  position: relative;
  width: fit-content;
  margin: 7px auto 0;
  text-align: center;
}

.auth-mfa-form .auth-mfa-lockout-toggle {
  position: relative !important;
  left: auto !important;
  display: flex !important;
  width: fit-content !important;
  min-height: 0;
  margin: 0 auto !important;
  padding: 0 8px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #8ea0cf;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
}

.auth-mfa-form .auth-mfa-lockout-toggle::before {
  content: "";
  position: absolute;
  inset: -5px -8px;
}

.auth-mfa-form .auth-mfa-lockout-toggle:hover,
.auth-mfa-form .auth-mfa-lockout-toggle:focus-visible {
  background: transparent !important;
  color: #afc4ff;
  text-decoration: underline;
}

.auth-mfa-form .auth-mfa-lockout-toggle:focus-visible {
  outline: 2px solid #52a7ff;
  outline-offset: 1px;
}

.auth-mfa-lockout-popover {
  position: absolute;
  top: calc(50% - 2px);
  left: calc(100% + 14px);
  z-index: 20;
  width: 220px;
  max-width: min(220px, calc(100vw - 48px));
  padding: 8px 10px;
  box-sizing: border-box;
  border: 1px solid #c8d6f0;
  border-radius: 8px;
  background: #e7edff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
  color: #10183a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(3px, -50%);
  transition: opacity 0.1s ease, transform 0.1s ease, visibility 0.1s;
}

.auth-mfa-lockout-popover::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  border: 6px solid transparent;
  border-right-color: #e7edff;
  transform: translateY(-50%);
}

.auth-mfa-lockout-help.is-open .auth-mfa-lockout-popover {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

.auth-delete-confirm-code {
  margin: 12px 0 0;
}

.auth-delete-confirm-code .auth-field {
  margin-bottom: 4px;
}

.auth-delete-confirm-code small {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.auth-delete-confirm-error {
  margin-top: 7px;
  color: #b42318;
  font-size: 12px;
  line-height: 1.35;
}

.auth-modal .auth-form .auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  background-color: transparent;
  color: #5b6e95;
  font-size: 0;
  font-weight: 400;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  transform: translateY(-50%);
  z-index: 2;
}

.auth-modal .auth-form .auth-password-toggle:hover,
.auth-modal .auth-form .auth-password-toggle:focus-visible {
  background: #eef3fb;
  background-color: #eef3fb;
  color: #1e3a5f;
  box-shadow: none;
}

.auth-modal .auth-form .auth-password-toggle:active {
  background: #e2eaf6;
  background-color: #e2eaf6;
  color: #1e3a5f;
  box-shadow: none;
}

.auth-modal .auth-form .auth-password-toggle:focus-visible {
  outline: 2px solid #52a7ff;
  outline-offset: 1px;
}

.auth-modal .auth-field input {
  color-scheme: light;
}

.auth-modal .auth-field input:-webkit-autofill,
.auth-modal .auth-field input:-webkit-autofill:hover,
.auth-modal .auth-field input:-webkit-autofill:focus,
.auth-modal .auth-field input:-webkit-autofill:active,
.auth-modal .auth-field input:-internal-autofill-selected,
.auth-modal .auth-field input:-internal-autofill-previewed {
  -webkit-text-fill-color: #111827 !important;
  caret-color: #111827;
  border: 1px solid #bfcee9;
  background-color: #ffffff !important;
  color: #111827 !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  transition: background-color 99999s ease-out 0s;
}

.auth-modal .auth-field input:autofill {
  background-color: #ffffff !important;
  color: #111827 !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
}

.auth-modal .auth-password-wrap:has(input:-webkit-autofill) .auth-password-toggle,
.auth-modal .auth-password-wrap:has(input:-internal-autofill-selected) .auth-password-toggle,
.auth-modal .auth-password-wrap:has(input:-internal-autofill-previewed) .auth-password-toggle,
.auth-modal .auth-password-wrap:has(input:autofill) .auth-password-toggle {
  background: #ffffff;
  background-color: #ffffff;
  color: #5b6e95;
  box-shadow: none;
}

.auth-modal .auth-password-wrap:has(input:-webkit-autofill) .auth-password-toggle:hover,
.auth-modal .auth-password-wrap:has(input:-webkit-autofill) .auth-password-toggle:focus-visible,
.auth-modal .auth-password-wrap:has(input:-internal-autofill-selected) .auth-password-toggle:hover,
.auth-modal .auth-password-wrap:has(input:-internal-autofill-previewed) .auth-password-toggle:hover,
.auth-modal .auth-password-wrap:has(input:autofill) .auth-password-toggle:hover,
.auth-modal .auth-password-wrap:has(input:autofill) .auth-password-toggle:focus-visible {
  background: #eef3fb;
  background-color: #eef3fb;
  color: #1e3a5f;
}

.auth-modal .auth-password-wrap:has(input:-webkit-autofill) .auth-password-toggle:active,
.auth-modal .auth-password-wrap:has(input:-internal-autofill-selected) .auth-password-toggle:active,
.auth-modal .auth-password-wrap:has(input:-internal-autofill-previewed) .auth-password-toggle:active,
.auth-modal .auth-password-wrap:has(input:autofill) .auth-password-toggle:active {
  background: #e2eaf6;
  background-color: #e2eaf6;
  color: #1e3a5f;
}

.auth-forgot-password-complete .auth-field,
.auth-reset-password-complete .auth-field {
  display: none;
}

.auth-forgot-password-complete #authForgotPasswordRequestSubmit,
.auth-reset-password-complete #authResetPasswordSubmit {
  margin-top: 0;
}

.auth-modal--reset-complete .auth-modal-header {
  margin-bottom: 4px;
}

.auth-modal-message.auth-modal-message--reset-complete {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 0;
}

.auth-modal-message.auth-modal-message--reset-complete::before {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23027a48'/%3E%3Cpath d='M7.2 12.4l3.1 3.1 6.5-6.8' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.auth-modal--forgot-complete .auth-modal-header {
  margin-bottom: 16px;
}

.auth-modal-message.auth-modal-message--forgot-complete {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 17px;
  min-height: 0;
  color: #374151;
  line-height: 1.45;
}

.auth-modal-message.auth-modal-message--forgot-complete p {
  margin: 0;
  font-weight: 400;
}

.auth-modal-message.auth-modal-message--forgot-complete p:first-child {
  font-weight: 500;
}

/* Change Password: close the empty message slot and leave 17px under the heading (19px less than before). */
.auth-modal:has(#authChangePasswordForm:not(.hidden)):has(.auth-modal-message:empty) .auth-modal-header {
  margin-bottom: 17px;
}

.auth-modal:has(#authChangePasswordForm:not(.hidden)) .auth-modal-message:empty {
  min-height: 0;
  margin-bottom: 0;
}

#authChangePasswordForm > .auth-field:last-of-type {
  margin-bottom: 0;
}

#authChangePasswordForm > #authChangePasswordSubmit {
  margin-top: 16px;
}

/* Reset Password: close the empty message slot and leave 14px under the heading (22px less than before). */
.auth-modal:has(#authResetPasswordForm:not(.hidden)):has(.auth-modal-message:empty) .auth-modal-header {
  margin-bottom: 14px;
}

.auth-modal:has(#authResetPasswordForm:not(.hidden)) .auth-modal-message:empty {
  min-height: 0;
  margin-bottom: 0;
}

/* Forgot Password: close the empty message slot and leave 14px under the heading. */
.auth-modal:has(#authForgotPasswordRequestForm:not(.hidden)):has(.auth-modal-message:empty) .auth-modal-header {
  margin-bottom: 14px;
}

.auth-modal:has(#authForgotPasswordRequestForm:not(.hidden)) .auth-modal-message:empty {
  min-height: 0;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .auth-mfa-lockout-help.is-open {
    margin-bottom: 58px;
  }

  .auth-mfa-lockout-popover {
    top: calc(100% + 4px);
    bottom: auto;
    left: 50%;
    width: max-content;
    max-width: min(280px, calc(100vw - 32px));
    transform: translate(-50%, -3px);
  }

  .auth-mfa-lockout-popover::after {
    top: auto;
    bottom: 100%;
    right: auto;
    left: 50%;
    border-right-color: transparent;
    border-bottom-color: #e7edff;
    transform: translateX(-50%);
  }

  .auth-mfa-lockout-help.is-open .auth-mfa-lockout-popover {
    transform: translate(-50%, 0);
  }
}

body.auth-active .container {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  /* The 15px gutter is only on the right, so centered content sits 7.5px
     left of the card. Keep the same horizontal padding total and move that
     7.5px to the left side. */
  padding-left: calc(22px + 7.5px);
  padding-right: calc(22px - 7.5px);
}

@media (max-height: 720px) {
  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) .container {
    padding-bottom: 8px;
  }
}

@media (max-height: 820px) {
  body.auth-active .container {
    padding-left: calc(16px + 7.5px);
    padding-right: calc(16px - 7.5px);
  }
}

body.auth-mfa-active:has(#authMfaForm:not(.hidden)) .auth-status-message,
body.auth-active:has(#authMfaForm:not(.hidden)) .auth-status-message {
  min-height: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  line-height: 0;
}

body.auth-mfa-active .container,
body.auth-active:has(#authMfaForm:not(.hidden)) .container {
  transform: scale(0.9) !important;
  transform-origin: center;
}

body.auth-mfa-active .auth-logo,
body.auth-active:has(#authMfaForm:not(.hidden)) .auth-logo {
  margin-bottom: 4px;
}

body.auth-mfa-active .auth-mfa-form .auth-setup-copy,
body.auth-active:has(#authMfaForm:not(.hidden)) .auth-mfa-form .auth-setup-copy {
  margin-bottom: 6px;
}

body.auth-mfa-active .auth-mfa-enrollment,
body.auth-active:has(#authMfaForm:not(.hidden)) .auth-mfa-enrollment {
  gap: 4px;
  margin-bottom: 6px;
}

#authStatusMessage.auth-status-message--with-check {
  white-space: nowrap;
}

#authStatusMessage.auth-status-message--with-check::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 6px;
  vertical-align: -3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ef4c1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l2.5 2.5L16 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.auth-recovery-codes {
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px solid #cbd9e7;
  border-radius: 7px;
  background: #f5f8fb;
  color: #18344f;
  font: 600 14px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: center;
  user-select: all;
}

.auth-recovery-panel button + button {
  margin-top: 8px;
}

#authRecoveryCodesCopy,
#authRecoveryCodesDownload,
#authRecoveryCodesContinue {
  gap: 8px;
}

.auth-recovery-btn__icon {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

#authRecoveryCodesContinue::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 5.5L15.5 12 8 18.5'/%3E%3C/svg%3E");
}

/* The loading spinner uses this same ::after. Drop the chevron so the ring stays empty. */
#authRecoveryCodesContinue.auth-btn-loading::after {
  width: 1.25rem;
  height: 1.25rem;
  background-image: none;
}

.auth-modal.auth-modal--manage-users.auth-modal--backup-codes {
  width: min(460px, calc(100vw - 360px));
  position: relative;
  z-index: 2;
}

.auth-backup-codes-copy {
  margin: 0 0 14px;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
}

.auth-backup-codes-list {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #cbd9e7;
  border-radius: 7px;
  background: #f5f8fb;
  color: #18344f;
  font: 600 14px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: center;
  user-select: all;
  white-space: pre-wrap;
}

#authBackupCodesCopy,
#authBackupCodesDownload {
  gap: 8px;
}

#authBackupCodesDownload {
  margin-top: 8px;
}

.auth-modal-title-group {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.auth-backup-codes-help-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 2px solid #1677ff;
  border-radius: 50%;
  background: #ffffff;
  color: #126ee8;
  font: 800 14px/1 "Segoe UI", system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.auth-backup-codes-help-trigger:hover {
  background: #eaf4ff;
  color: #075cc9;
}

.auth-backup-codes-help-trigger:active {
  background: #d8ebff;
}

.auth-backup-codes-help-trigger:focus-visible {
  outline: 3px solid rgba(22, 119, 255, 0.3);
  outline-offset: 2px;
}

.auth-modal-overlay--backup-codes {
  --auth-profile-drawer-width: min(340px, calc(100vw - 18px));
  --auth-backup-drawer-width: min(460px, calc(100vw - 360px));
}

.auth-backup-codes-help {
  container-name: auth-backup-help;
  container-type: inline-size;
  position: fixed;
  top: 0;
  right: calc(var(--auth-profile-drawer-width) + var(--auth-backup-drawer-width));
  z-index: 3;
  width: min(
    920px,
    calc(100vw - var(--auth-profile-drawer-width) - var(--auth-backup-drawer-width))
  );
  height: 100vh;
  height: 100dvh;
  padding: 24px 26px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  border-left: 1px solid #d6deed;
  border-right: 1px solid #d6deed;
  background: #fbfdff;
  color: #172554;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.2);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  animation: authBackupHelpSlideIn 0.2s ease-out;
}

@keyframes authBackupHelpSlideIn {
  from {
    transform: translateX(30px);
    opacity: 0.65;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.auth-backup-help-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.auth-backup-help-header h2 {
  margin: 0;
  color: #0b1739;
  font-size: clamp(25px, 2vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.auth-backup-codes-help .auth-backup-help-close {
  flex: 0 0 auto;
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: #667085;
}

.auth-backup-codes-help .auth-backup-help-close:hover {
  background: #eaf4ff;
  color: #1d4ed8;
}

.auth-backup-codes-help .auth-backup-help-close::before {
  top: -2px;
  font-size: 28px;
  font-weight: 300;
}

.auth-backup-help-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(260px, 1fr);
  gap: 26px;
}

.auth-backup-help-column {
  min-width: 0;
}

.auth-backup-help-column--uses {
  padding-left: 22px;
  border-left: 1px solid #d8e1ee;
}

.auth-backup-help-section {
  margin-top: 18px;
}

.auth-backup-help-section:first-child {
  margin-top: 0;
}

.auth-backup-help-section h3,
.auth-backup-help-safe h3,
.auth-backup-help-warning h3 {
  margin: 0;
  color: #101d47;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: left;
}

.auth-backup-help-section > p,
.auth-backup-help-safe p,
.auth-backup-help-intro {
  margin: 5px 0 0;
  color: #52617f;
  font-size: 14px;
  line-height: 1.48;
}

.auth-backup-help-intro strong {
  color: #111f4d;
}

.auth-backup-help-safe {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e8f5ff 0%, #dff1ff 100%);
}

.auth-backup-help-safe h3 {
  color: #12256b;
  font-size: 16px;
}

.auth-backup-help-safe p {
  margin-top: 4px;
  color: #50658b;
  font-size: 12px;
  line-height: 1.45;
}

.auth-backup-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dff1ff;
  color: #075dcc;
}

.auth-backup-help-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-backup-help-icon--shield {
  width: 46px;
  height: 46px;
  background: #cceaff;
  color: #0794f5;
}

.auth-backup-help-icon--battery {
  color: #e11d2e;
}

.auth-backup-help-use-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.auth-backup-help-use {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 9px 12px;
  box-sizing: border-box;
  border-radius: 9px;
  background: linear-gradient(135deg, #eef8ff 0%, #e5f3ff 100%);
}

.auth-backup-help-use .auth-backup-help-icon {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.58);
}

.auth-backup-help-use .auth-backup-help-icon svg {
  width: 22px;
  height: 22px;
}

.auth-backup-help-use h4 {
  margin: 0;
  color: #12256b;
  font-size: 13px;
  line-height: 1.25;
}

.auth-backup-help-use p {
  margin: 2px 0 0;
  color: #647494;
  font-size: 11px;
  line-height: 1.35;
}

.auth-backup-help-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.auth-backup-help-step {
  min-width: 0;
}

.auth-backup-help-screen {
  display: flex;
  flex-direction: column;
  min-height: 224px;
  padding: 14px 13px 11px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid #243963;
  border-radius: 6px;
  background: #010515;
  color: #f8fbff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

.auth-backup-help-screen-logo {
  width: 76%;
  height: 48px;
  margin: 0 auto 8px;
  background: url("../Logo1.5.png") center / contain no-repeat;
}

.auth-backup-help-screen-title {
  margin: 0 0 3px;
  text-align: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
}

.auth-backup-help-screen-copy {
  margin: 0 0 8px;
  text-align: center;
  color: #a9b8d8;
  font-size: 6px;
  line-height: 1.35;
}

.auth-backup-help-screen-field {
  margin-top: 6px;
}

.auth-backup-help-screen-field span {
  display: block;
  margin-bottom: 3px;
  color: #f4f7ff;
  font-size: 7px;
  font-weight: 700;
  line-height: 1.2;
}

.auth-backup-help-screen-field b {
  display: block;
  min-height: 23px;
  padding: 6px 7px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid #1d4f9d;
  border-radius: 3px;
  background: #0a1737;
  color: #8ea1cd;
  font-size: 7px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.auth-backup-help-screen-link {
  margin-top: 7px;
  color: #23a7ff;
  font-size: 7px;
  font-weight: 650;
  line-height: 1.2;
}

.auth-backup-help-screen-link--center {
  margin-top: auto;
  text-align: center;
}

.auth-backup-help-screen-lockout {
  margin-top: 6px;
  margin-bottom: 8px;
  color: #8ea0cf;
  text-align: center;
  font-size: 6px;
  font-weight: 400;
  line-height: 1.2;
}

.auth-backup-help-screen-button {
  margin-top: 7px;
  padding: 6px;
  border-radius: 3px;
  background: #0798f8;
  color: #ffffff;
  text-align: center;
  font-size: 7px;
  font-weight: 700;
  line-height: 1.2;
}

.auth-backup-help-screen-button--outline {
  border: 1px solid #6d7e9e;
  background: transparent;
}

.auth-backup-help-screen-footer {
  margin-top: auto;
  padding-top: 7px;
  color: #8190ad;
  text-align: center;
  font-size: 7px;
  font-weight: 650;
}

.auth-backup-help-arrow {
  width: 34px;
  color: #147de8;
}

.auth-backup-help-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-backup-help-step-caption {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin-top: 9px;
}

.auth-backup-help-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1677ed;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
}

.auth-backup-help-step-caption p {
  margin: 2px 0 0;
  color: #506182;
  font-size: 12px;
  line-height: 1.35;
}

.auth-backup-help-warning {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid #f2bcc4;
  border-radius: 8px;
  background: #fff0f2;
}

.auth-backup-help-warning-icon {
  color: #e11d2e;
}

.auth-backup-help-warning-icon svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-backup-help-warning h3 {
  color: #c51f30;
  font-size: 16px;
}

.auth-backup-help-warning ul {
  margin: 6px 0 0;
  padding-left: 19px;
  color: #46577d;
  font-size: 12px;
  line-height: 1.45;
}

.auth-backup-help-warning li + li {
  margin-top: 5px;
}

@container auth-backup-help (max-width: 740px) {
  .auth-backup-help-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .auth-backup-help-column--uses {
    padding: 20px 0 0;
    border-top: 1px solid #d8e1ee;
    border-left: 0;
  }
}

@container auth-backup-help (max-width: 470px) {
  .auth-backup-help-flow {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 10px;
  }

  .auth-backup-help-step {
    width: 100%;
  }

  .auth-backup-help-arrow {
    transform: rotate(90deg);
  }

  .auth-backup-help-warning {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1120px) {
  .auth-modal.auth-modal--manage-users.auth-modal--backup-codes {
    width: min(480px, 100vw);
    margin-right: 0;
  }

  .auth-modal-overlay--backup-codes .auth-backup-codes-help {
    right: 0;
    width: 100vw;
  }
}

@media (max-width: 740px) {
  .auth-backup-help-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .auth-backup-help-column--uses {
    padding: 20px 0 0;
    border-top: 1px solid #d8e1ee;
    border-left: 0;
  }
}

@media (max-width: 520px) {
  .auth-backup-codes-help {
    padding: 18px 16px;
  }

  .auth-backup-help-header h2 {
    font-size: 24px;
  }

  .auth-backup-help-flow {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 10px;
  }

  .auth-backup-help-step {
    width: 100%;
  }

  .auth-backup-help-arrow {
    transform: rotate(90deg);
  }

  .auth-backup-help-warning {
    grid-template-columns: minmax(0, 1fr);
  }
}

#authRecoveryCodesDownload {
  margin-top: calc(8px / 0.9);
}

#authRecoveryCodesContinue {
  margin-top: calc(16px / 0.9);
}

body.auth-active:has(#authRecoveryCodesPanel:not(.hidden)) .container {
  padding-bottom: calc(16px / 0.9 - 1px);
}

.auth-mfa-error-dialog {
  width: min(340px, calc(100vw - 32px));
  border-color: #f1b7b7;
  padding: 16px;
}

.auth-mfa-error-dialog h4 {
  color: #991b1b;
  font-size: 17px;
}

.auth-mfa-error-dialog p {
  font-size: 13px;
}

.auth-mfa-error-dialog .auth-users-row-btn {
  min-width: 84px;
}

@media (max-height: 720px) {
  body.auth-active {
    padding: 8px;
  }

  body.auth-active .container {
    max-height: calc(100vh - 16px);
    padding: 10px calc(14px - 7.5px) 10px calc(14px + 7.5px);
    transform: none;
  }

  .auth-logo {
    width: min(380px, 82vw);
    max-height: 112px;
    margin-bottom: 4px;
    object-fit: contain;
  }

  .auth-logo.auth-logo-other {
    width: min(304px, 65.6vw);
    max-height: 89.6px;
  }

  .auth-logo.auth-logo-signin {
    width: min(307px, 66.2vw);
    max-height: 90px;
    margin-bottom: 0;
  }

  .auth-mfa-form .auth-setup-title {
    margin: 0 0 3px;
    font-size: 17px;
  }

  .auth-mfa-form .auth-setup-copy {
    margin-bottom: 5px;
    font-size: 12px;
  }

  .auth-mfa-enrollment {
    gap: 4px;
    margin-bottom: 5px;
    font-size: 12px;
  }

  .auth-mfa-qr {
    width: calc(148.5px * 1.04);
  }

  .auth-mfa-manual-panel {
    padding: 8px 10px;
  }

  .auth-mfa-secret {
    font-size: 13px;
  }

  .auth-mfa-form .auth-field {
    margin-bottom: 4px;
  }

  .auth-mfa-form .auth-field span {
    font-size: 11px;
  }

  .auth-mfa-form .auth-field input {
    padding: 6px 8px;
    font-size: 13px;
  }

  .auth-mfa-form button {
    padding: 7px 10px;
    font-size: 13px;
  }
}

/* 110%+ browser zoom lowers the CSS viewport into the rules above and would
   shrink the initial sign-in logo. Put that logo back to its 100% size
   (75.9% of the card content box at 22px side padding). The subtracted
   amounts are 75.9% of the extra content width from the tighter 16px and
   14px side padding. Short windows at 100% zoom are unchanged. */
@media (max-height: 820px) and (min-resolution: 1.09dppx) {
  .auth-logo.auth-logo-signin {
    width: min(420px, calc(75.9% - 9.108px));
    max-height: none;
    margin-bottom: 6px;
  }
}

@media (max-height: 720px) and (min-resolution: 1.09dppx) {
  .auth-logo.auth-logo-signin {
    width: min(420px, calc(75.9% - 12.144px));
    max-height: none;
    margin-bottom: 6px;
  }
}

@media (max-height: 580px) {
  body.auth-mfa-active,
  body.auth-active:has(#authMfaForm:not(.hidden)) {
    padding: 6px;
  }

  body.auth-mfa-active .container,
  body.auth-active:has(#authMfaForm:not(.hidden)) .container {
    max-height: calc(100vh - 12px);
    padding: 8px 12px;
    overflow-y: hidden;
    scrollbar-gutter: auto;
  }

  body.auth-mfa-active .auth-logo,
  body.auth-active:has(#authMfaForm:not(.hidden)) .auth-logo {
    width: min(232px, 57.6vw);
    max-height: 64px;
    margin-bottom: 0;
  }

  .auth-mfa-form .auth-setup-title {
    margin-bottom: 2px;
    font-size: 16px;
  }

  .auth-mfa-form .auth-setup-copy {
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 1.2;
  }

  .auth-mfa-qr {
    width: calc(115.2px * 1.04);
    border-radius: 5px;
  }

  .auth-mfa-enrollment {
    gap: 2px;
    margin-bottom: 3px;
    font-size: 11px;
  }

  .auth-mfa-enrollment p {
    margin: 0;
    line-height: 1.2;
  }

  .auth-mfa-manual-panel {
    padding: 6px 8px;
  }

  .auth-mfa-manual-panel__label {
    font-size: 12px;
  }

  .auth-mfa-secret {
    font-size: 12px;
  }

  .auth-mfa-form .auth-field {
    gap: 2px;
    margin-bottom: 2px;
  }

  .auth-mfa-form .auth-field span {
    font-size: 10px;
  }

  .auth-mfa-form .auth-field input {
    padding: 5px 7px;
    font-size: 12px;
  }

  .auth-mfa-form button {
    padding: 6px 9px;
    font-size: 12px;
  }

  #authMfaBack {
    min-height: 22px;
    margin-top: 3px !important;
    padding: 2px 8px !important;
    font-size: 12px;
  }

  .auth-mfa-lockout-help {
    margin-top: 2px;
  }

  .auth-mfa-form .auth-mfa-lockout-toggle {
    min-height: 0;
    padding: 0 8px !important;
    font-size: 10.5px;
    line-height: 1.2;
  }

  .auth-mfa-lockout-popover {
    max-width: min(280px, calc(100vw - 32px));
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.25;
  }
}

@media (max-height: 470px) {
  body.auth-mfa-active .container,
  body.auth-active:has(#authMfaForm:not(.hidden)) .container {
    overflow-y: auto;
  }
}

.auth-idle-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(18 31 45 / 58%);
}

.auth-session-lock {
  position: fixed;
  z-index: 11000;
  inset: 0;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: #526579;
  font: 600 15px/1.5 "Segoe UI", system-ui, sans-serif;
}

.auth-idle-dialog {
  width: min(440px, 100%);
  padding: 22px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 60px rgb(0 0 0 / 30%);
  color: #172b40;
}

.auth-idle-dialog h2 {
  margin: 0 0 8px;
}

.auth-idle-dialog p {
  margin: 0;
  line-height: 1.45;
}

.auth-idle-dialog p + p {
  margin-top: 2px;
}

.auth-idle-countdown {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 10px;
  margin-top: 16px;
  padding: 16px 24px 14px;
  border: 1px solid #d6e3f0;
  border-radius: 10px;
  background: #f4f8fc;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-idle-countdown__label {
  grid-column: 1;
  grid-row: 1;
  color: #3a5370;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
}

.auth-idle-countdown__track {
  grid-column: 1 / -1;
  grid-row: 2;
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1eaf3;
}

.auth-idle-countdown__track > span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1677df, #42a5ff);
  transition: width 0.25s linear, background 0.2s ease;
}

.auth-idle-countdown__value {
  grid-column: 2;
  grid-row: 1;
  color: #164e86;
  font: 600 22px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-align: right;
  transition: color 0.2s ease;
}

.auth-idle-countdown--urgent {
  border-color: #f2cf92;
  background: linear-gradient(135deg, #fffdf8 0%, #fff5df 100%);
}

.auth-idle-countdown--urgent .auth-idle-countdown__track > span {
  background: linear-gradient(90deg, #d97706, #f3ad3d);
}

.auth-idle-countdown--urgent .auth-idle-countdown__value {
  color: #9a4e05;
}

.auth-idle-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.auth-idle-actions button {
  flex: 1;
  margin: 0;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: #218cf0;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.auth-idle-actions button:last-child {
  background: #34547d;
}

/* Authenticator setup only. Logo is 5% smaller and the QR is 4% larger.
   On a normal window the visible gaps are 24, 24, 16, 16, 16, 12, 20, 8, 16, 12, 24. */
body.auth-active:has(.auth-mfa-form--enrollment:not(.hidden)) .auth-logo.auth-logo-other {
  width: min(calc(416px * 0.95), calc(75.2% * 0.95));
}

@media (max-height: 820px) {
  body.auth-active:has(.auth-mfa-form--enrollment:not(.hidden)) .auth-logo.auth-logo-other {
    width: min(calc(368px * 0.95), calc(72% * 0.95));
  }
}

@media (max-height: 720px) {
  body.auth-active:has(.auth-mfa-form--enrollment:not(.hidden)) .auth-logo.auth-logo-other {
    width: min(calc(304px * 0.95), calc(65.6vw * 0.95));
    max-height: calc(89.6px * 0.95);
  }
}

@media (max-height: 580px) {
  body.auth-active:has(.auth-mfa-form--enrollment:not(.hidden)) .auth-logo.auth-logo-other {
    width: min(calc(232px * 0.95), calc(57.6vw * 0.95));
    max-height: calc(64px * 0.95);
  }
}

@media (min-height: 721px) {
  /* Values are on-screen pixels divided by the card's 0.9 scale, then
     reduced by the logo's dark matte and by padding inside the text controls
     so the visible gap is the listed target. The card is scaled, so its
     layout box is taller than the card you see; let that box extend into
     the margin the scale already hides instead of scrolling. */
  body.auth-active:has(#authMfaForm.auth-mfa-form--enrollment:not(.hidden)) {
    height: 100vh;
    max-height: 100vh;
  }

  body.auth-active:has(#authMfaForm.auth-mfa-form--enrollment:not(.hidden)) .container {
    max-height: calc((100vh - 24px) / 0.9 + 32px);
    padding-top: calc(17px / 0.9);
    padding-bottom: calc(16.4px / 0.9);
  }

  body.auth-active:has(#authMfaForm.auth-mfa-form--enrollment:not(.hidden)) .auth-logo.auth-logo-other {
    margin-bottom: calc(17.9px / 0.9);
  }

  body.auth-active:has(.auth-mfa-form--enrollment:not(.hidden)) #authMfaTitle {
    margin: 0 0 calc(15.3px / 0.9);
  }

  body.auth-active:has(#authMfaForm.auth-mfa-form--enrollment:not(.hidden)) .auth-mfa-enrollment {
    gap: 0;
    margin-bottom: 0;
  }

  body.auth-active:has(.auth-mfa-form--enrollment:not(.hidden)) .auth-mfa-enrollment p {
    margin: calc(16px / 0.9) 0 0;
  }

  body.auth-active:has(.auth-mfa-form--enrollment:not(.hidden)) .auth-mfa-form .auth-mfa-manual-toggle {
    margin: calc(13.5px / 0.9) auto 0;
  }

  body.auth-active:has(.auth-mfa-form--enrollment:not(.hidden)) #authMfaManualPanel {
    margin-top: calc(8.5px / 0.9);
  }

  .auth-mfa-form--enrollment:has(#authMfaManualPanel:not(.hidden)) > .auth-field {
    margin-top: calc(20px / 0.9);
  }

  .auth-mfa-form--enrollment > .auth-field {
    gap: calc(7.3px / 0.9);
    margin-bottom: calc(16px / 0.9);
  }

  .auth-mfa-form--enrollment > #authMfaSubmit {
    margin-top: 0;
  }

  body.auth-active:has(.auth-mfa-form--enrollment:not(.hidden)) #authMfaBack {
    margin-top: calc(6.4px / 0.9) !important;
  }
}

/* 110%+ browser zoom lowers the CSS viewport and would shrink the
   authenticator logo. Keep the normal-window size, 95% of 75.2% of the
   card content box at 22px side padding. The subtracted amounts are that
   same percentage of the extra content width from the tighter side
   padding (and, below 580px, from dropping the scrollbar gutter). Short
   windows at 100% zoom are unchanged. */
@media (max-height: 820px) and (min-resolution: 1.09dppx) {
  body.auth-active:has(#authMfaForm.auth-mfa-form--enrollment:not(.hidden)) .auth-logo.auth-logo-other {
    width: min(calc(416px * 0.95), calc(75.2% * 0.95 - 8.573px));
    max-height: none;
  }
}

@media (max-height: 720px) and (min-resolution: 1.09dppx) {
  body.auth-active:has(#authMfaForm.auth-mfa-form--enrollment:not(.hidden)) .auth-logo.auth-logo-other {
    width: min(calc(416px * 0.95), calc(75.2% * 0.95 - 11.43px));
    max-height: none;
  }
}

@media (max-height: 580px) and (min-resolution: 1.09dppx) {
  body.auth-active:has(#authMfaForm.auth-mfa-form--enrollment:not(.hidden)) .auth-logo.auth-logo-other {
    width: min(calc(416px * 0.95), calc(75.2% * 0.95 - 25.004px));
    max-height: none;
  }
}

/* Verification Code only. Authenticator Setup keeps the enrollment rules
   above, and Sign In keeps its own logo. Visible gaps are measured after
   the 0.9 scale, so the CSS values are those targets divided by 0.9 with
   the logo matte and text-line insets removed. The logo is 6% smaller
   than the shared other-logo size. 110%+ zoom keeps that size. */
@media (min-height: 721px) {
  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) .container {
    padding-top: 19.2px;
    padding-bottom: 16.5px;
  }

  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) .auth-logo.auth-logo-other {
    width: min(calc(416px * 0.94), calc(75.2% * 0.94));
    margin-bottom: 20px;
  }

  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) .auth-setup-title {
    margin: 0 0 10.3px;
  }

  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) #authMfaCopy {
    margin: 0 0 25.9px;
  }

  #authMfaForm:not(.auth-mfa-form--enrollment) > .auth-field {
    gap: 8.1px;
    margin-bottom: 17.8px;
  }

  #authMfaForm:not(.auth-mfa-form--enrollment) #authMfaSubmit {
    margin-top: 0;
  }

  #authMfaForm:not(.auth-mfa-form--enrollment) #authMfaBack {
    margin-top: 11.6px !important;
  }
}

@media (max-height: 820px) and (min-height: 721px) {
  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) .auth-logo.auth-logo-other {
    width: min(calc(368px * 0.94), calc(72% * 0.94));
  }
}

@media (max-height: 820px) and (min-resolution: 1.09dppx) {
  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) .auth-logo.auth-logo-other {
    width: min(calc(416px * 0.94), calc(75.2% * 0.94 - 8.483px));
    max-height: none;
  }
}

@media (max-height: 720px) and (min-resolution: 1.09dppx) {
  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) .auth-logo.auth-logo-other {
    width: min(calc(416px * 0.94), calc(75.2% * 0.94 - 11.31px));
    max-height: none;
  }
}

@media (max-height: 580px) and (min-resolution: 1.09dppx) {
  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) .auth-logo.auth-logo-other {
    width: min(calc(416px * 0.94), calc(75.2% * 0.94 - 24.741px));
    max-height: none;
  }
}

/* 110%+ zoom can drop the CSS height below 721px, where the compact rules
   close the Verification Code gaps. Keep this screen's spacing and control
   size. A short window at 100% zoom still uses the compact layout. */
@media (max-height: 720px) and (min-resolution: 1.09dppx) {
  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) .container {
    padding-top: 19.2px;
    padding-bottom: 16.5px;
  }

  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) .auth-logo.auth-logo-other {
    margin-bottom: 20px;
  }

  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) .auth-setup-title {
    margin: 0 0 10.3px;
    font-size: 20px;
  }

  body.auth-active:has(#authMfaForm:not(.auth-mfa-form--enrollment):not(.hidden)) #authMfaCopy {
    margin: 0 0 25.9px;
    font-size: 14px;
    line-height: normal;
  }

  #authMfaForm:not(.auth-mfa-form--enrollment) > .auth-field {
    gap: 8.1px;
    margin-bottom: 17.8px;
  }

  #authMfaForm:not(.auth-mfa-form--enrollment) > .auth-field span {
    font-size: 13px;
  }

  #authMfaForm:not(.auth-mfa-form--enrollment) #authMfaCode {
    padding: 9px 11px;
    font-size: 14px;
  }

  #authMfaForm:not(.auth-mfa-form--enrollment) #authMfaSubmit {
    margin-top: 0;
    padding: 10px 12px;
    font-size: 14px;
  }

  #authMfaForm:not(.auth-mfa-form--enrollment) #authMfaBack {
    margin-top: 11.6px !important;
    min-height: 28px;
    padding: 4px 10px !important;
    font-size: 13px;
  }
}
