/* Authentication screens only; monitoring and editor layouts are unchanged. */
.auth-masthead,
.auth-theme-toggle {
  display: none;
}

body.auth-screen {
  background-color: #fff;
  background-image: none;
  color: #243f53;
}

.auth-screen .sidebar {
  display: none;
}

.auth-screen .shell {
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(min-content, 1fr);
}

.auth-screen .auth-masthead {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  margin-bottom: 38px;
  text-align: center;
}

.auth-masthead img {
  display: block;
  width: 248px;
  height: 36px;
  object-fit: contain;
}

.auth-masthead span {
  color: #587188;
  font-size: 12px;
  letter-spacing: 0;
}

.auth-screen .content {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 76px 0 24px;
  min-width: 0;
  background: transparent;
}

.auth-screen .login-panel {
  min-height: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 24px;
  background: transparent;
}

.auth-screen .login-form {
  width: min(360px, 100%);
  min-width: 0;
  padding: 0;
  gap: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-screen .login-form h1 {
  margin: 0 0 10px;
  color: #243f53;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.auth-screen .login-form label,
.auth-screen .auth-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #405b70;
  font-size: 13px;
}

.auth-screen .login-form input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid #bbcbd7;
  border-radius: 4px;
  background: #fff;
  color: #243f53;
  font-family: inherit;
  font-size: 16px;
}

.auth-screen .login-form input:focus-visible,
.auth-screen .login-form button:focus-visible {
  outline: 2px solid #005b96;
  outline-offset: 3px;
}

.auth-screen .password-field {
  position: relative;
  min-width: 0;
}

.auth-screen .password-field input {
  padding-right: 76px;
}

.auth-screen .password-field button {
  position: absolute;
  top: 1px;
  right: 1px;
  height: 42px;
  width: 68px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #005b96;
  font-size: 12px;
}

.auth-screen .login-form button[type="submit"] {
  min-height: 44px;
  margin: 4px 0 0;
  padding: 10px 12px;
  border: 1px solid #005b96;
  border-radius: 4px;
  background: #005b96;
  color: #fff;
  font-size: 14px;
}

.auth-screen .login-form button[type="submit"]:hover:not(:disabled) {
  background: #004779;
}

.auth-screen .login-form button:disabled {
  cursor: wait;
}

.auth-screen .login-form .ghost {
  min-height: 36px;
  padding: 6px 0;
  margin: -6px 0;
  border: 0;
  border-radius: 4px;
  color: #005b96;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

.auth-screen .login-form .ghost:hover:not(:disabled),
.auth-screen .password-field button:hover:not(:disabled) {
  text-decoration: underline;
}

.auth-screen .login-form .muted,
.auth-screen .password-policy-note {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #526d7f;
  font-size: 13px;
  line-height: 1.55;
}

.auth-screen .login-form .form-message {
  min-height: 60px;
  margin: 0;
  padding: 0;
  color: #276847;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.auth-screen .login-form .form-message.error {
  color: #a52424;
}

@media (max-width: 600px) {
  .auth-screen .auth-masthead {
    margin-bottom: 32px;
  }
  .auth-screen .auth-masthead img {
    width: 208px;
    height: 30px;
  }
  .auth-screen .auth-masthead span {
    font-size: 11px;
  }
  .auth-screen .content {
    padding: 76px 0 20px;
  }
  .auth-screen .login-panel {
    padding: 0 24px;
  }
}

@media (max-height: 600px) {
  .auth-screen .content {
    padding: 76px 0 16px;
  }
  .auth-screen .auth-masthead {
    margin-bottom: 24px;
  }
}

.auth-screen .auth-theme-toggle:not([hidden]) {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 0;
  padding: 0;
  border: 1px solid #bbcbd7;
  border-radius: 4px;
  background: #fff;
  color: #005b96;
  box-shadow: none;
  font-size: 26px;
  line-height: 1;
}

.auth-screen .auth-theme-toggle:hover { border-color: #005b96; }
.auth-screen .auth-theme-toggle:focus-visible { outline: 2px solid #005b96; outline-offset: 3px; }
.auth-screen .auth-logo-dark,
.auth-screen .auth-theme-sun { display: none; }

html[data-auth-theme="dark"] body.auth-screen {
  background-color: #0b1012;
  color: #e4edef;
  color-scheme: dark;
}

html[data-auth-theme="dark"] .auth-screen .auth-logo-light,
html[data-auth-theme="dark"] .auth-screen .auth-theme-moon { display: none; }

html[data-auth-theme="dark"] .auth-screen .auth-logo-dark,
html[data-auth-theme="dark"] .auth-screen .auth-theme-sun { display: block; }

html[data-auth-theme="dark"] .auth-screen .auth-masthead span { color: #9aafb5; }
html[data-auth-theme="dark"] .auth-screen .login-form h1 { color: #e4edef; }
html[data-auth-theme="dark"] .auth-screen .login-form label,
html[data-auth-theme="dark"] .auth-screen .auth-field { color: #b8c8cb; }
html[data-auth-theme="dark"] .auth-screen .login-form input {
  border-color: #455658;
  background: #10181b;
  color: #edf4f4;
}
html[data-auth-theme="dark"] .auth-screen .login-form input:focus-visible,
html[data-auth-theme="dark"] .auth-screen .login-form button:focus-visible,
html[data-auth-theme="dark"] .auth-screen .auth-theme-toggle:focus-visible { outline-color: #69cec1; }
html[data-auth-theme="dark"] .auth-screen .login-form button[type="submit"] {
  border-color: #69cec1;
  background: #69cec1;
  color: #0b2020;
}
html[data-auth-theme="dark"] .auth-screen .login-form button[type="submit"]:hover:not(:disabled) {
  background: #85ded3;
}
html[data-auth-theme="dark"] .auth-screen .password-field button,
html[data-auth-theme="dark"] .auth-screen .login-form .ghost { color: #69cec1; }
html[data-auth-theme="dark"] .auth-screen .login-form .muted,
html[data-auth-theme="dark"] .auth-screen .password-policy-note { color: #acbebf; }
html[data-auth-theme="dark"] .auth-screen .login-form .form-message { color: #8cdbc5; }
html[data-auth-theme="dark"] .auth-screen .login-form .form-message.error { color: #ffa69a; }
html[data-auth-theme="dark"] .auth-screen .auth-theme-toggle {
  border-color: #455658;
  background: #10181b;
  color: #69cec1;
}
html[data-auth-theme="dark"] .auth-screen .auth-theme-toggle:hover { border-color: #69cec1; }

.mfa-dialog { width: 470px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); box-sizing: border-box; overflow-y: auto; padding: 24px; border: 1px solid #bdcbd5; border-radius: 8px; background: #fff; color: #183349; }
.mfa-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.mfa-dialog h2 { margin: 0 0 16px; font-size: 20px; }
.mfa-dialog form, .mfa-dialog label, .mfa-dialog [data-mfa-enrollment] { display: grid; gap: 12px; }
.mfa-dialog [hidden] { display: none !important; }
.mfa-dialog input { min-width: 0; max-width: 100%; box-sizing: border-box; }
.mfa-dialog [name="code"] { font-family: monospace; font-size: 18px; }
.mfa-dialog [data-mfa-message] { min-height: 1.4em; margin: 4px 0; overflow-wrap: anywhere; }
.mfa-dialog .form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mfa-dialog .form-actions button { white-space: normal; }
.mfa-dialog .mfa-qr { width: 220px; height: 220px; max-width: 100%; margin: 0 auto; background: #fff; }
.mfa-secret { display: block; overflow-wrap: anywhere; margin-top: 8px; user-select: all; }
.mfa-recovery-codes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 0; list-style: none; }
.mfa-recovery-codes code { user-select: all; overflow-wrap: anywhere; }
.mfa-dialog .mfa-ack { display: flex; align-items: center; margin: 16px 0; }
