:root {
  --font-ui:
    "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
    sans-serif;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;

  --ink-strong: #284677;
  --ink-primary: #3a5e93;
  --ink-secondary: #7b90b9;
  --ink-muted: rgba(89, 111, 153, 0.8);

  --line-soft: rgba(198, 217, 247, 0.45);
  --line-strong: rgba(175, 206, 247, 0.55);

  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-shell: 0 26px 70px rgba(56, 77, 134, 0.2);

  --brand-start: #1f63d9;
  --brand-end: #17d4f5;
  --focus: #3f87ff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body.slashmdKcBody {
  margin: 0;
  color: var(--ink-primary);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: var(--font-regular);
  background: #eff4ff;
}

html.slashmdMfaPreselectPending .slashmdMethodSwitcherTrigger,
html.slashmdMfaPreselectPending .slashmdMethodSwitcherOption {
  pointer-events: none;
}

html.slashmdMfaPreselectPending .slashmdMethodSwitcherTrigger {
  opacity: 0.72;
}

html.slashmdMfaHandoffActive .slashmdKcForm > :not(#slashmd-mfa-handoff):not(.slashmdTryAnotherWayForm) {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ambientBackground,
.ambientNoise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.ambientBackground::before,
.ambientBackground::after {
  content: "";
  position: absolute;
  inset: 0;
}

.ambientBackground--auth-light {
  background:
    radial-gradient(1200px 700px at 20% 12%, rgba(184, 174, 255, 0.36), transparent 62%),
    radial-gradient(900px 560px at 80% 24%, rgba(123, 220, 255, 0.3), transparent 65%),
    linear-gradient(180deg, #f2f6ff 0%, #f8fbff 38%, #eff5ff 100%);
}

.ambientBackground::before {
  background-image: url("../img/slashmd-welcome.webp");
  background-image: image-set(
    url("../img/slashmd-welcome.webp") type("image/webp") 1x,
    url("../img/slashmd-welcome.png") type("image/png") 1x
  );
  background-size: cover;
  background-position: center;
  opacity: 0.82;
  mix-blend-mode: soft-light;
}

.ambientBackground::after {
  background:
    radial-gradient(1600px 900px at 50% -15%, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 58%),
    radial-gradient(1000px 620px at 50% 110%, rgba(141, 164, 214, 0.15), rgba(141, 164, 214, 0) 70%);
}

.ambientNoise {
  z-index: -1;
  opacity: 0.06;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8) 0 2px, transparent 2px),
    radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.72) 0 2px, transparent 2px),
    radial-gradient(circle at 60% 80%, rgba(255, 255, 255, 0.75) 0 2px, transparent 2px),
    radial-gradient(circle at 12% 72%, rgba(255, 255, 255, 0.7) 0 2px, transparent 2px),
    repeating-linear-gradient(
      0deg,
      rgba(18, 37, 74, 0.1),
      rgba(18, 37, 74, 0.1) 1px,
      rgba(255, 255, 255, 0) 2px,
      rgba(255, 255, 255, 0) 3px
    );
  background-size:
    300px 300px,
    340px 340px,
    360px 360px,
    410px 410px,
    4px 4px;
}

.screen--auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
}

.authContainer {
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.brandMark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.brandMark img:first-child {
  filter: drop-shadow(0 14px 28px rgba(30, 91, 178, 0.24));
}

.brandMarkWordmark {
  width: min(360px, 78vw);
  height: auto;
}

.adminLoginBadge {
  margin: -2px 0 4px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(203, 82, 82, 0.42);
  background: rgba(255, 235, 235, 0.72);
  color: #b13a3a;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.authCard {
  width: min(560px, 100%);
  border-radius: 28px;
  padding: 24px 24px 26px;
  background:
    radial-gradient(780px 420px at 18% 0%, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0) 58%),
    radial-gradient(520px 360px at 92% 18%, rgba(170, 220, 255, 0.26), rgba(170, 220, 255, 0) 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.42));
  border: 1px solid rgba(175, 206, 247, 0.7);
  box-shadow:
    0 44px 110px rgba(38, 60, 112, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(38px) saturate(1.24);
  -webkit-backdrop-filter: blur(38px) saturate(1.24);
  overflow: hidden;
}

.authCard--login {
  width: min(480px, 100%);
  padding: 28px 28px 26px;
  overflow: visible;
}

.authForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.authForm--login {
  width: min(360px, 100%);
  margin: 0 auto;
  padding-top: 18px;
  gap: 12px;
}

.slashmdMfaHandoff {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px 0 6px;
  padding: 28px 18px;
  border-radius: 20px;
  border: 1px solid rgba(184, 214, 252, 0.72);
  background:
    radial-gradient(180px 70px at 18% 18%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.54));
  box-shadow:
    0 18px 46px rgba(45, 74, 124, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  text-align: center;
}

.slashmdMfaHandoffTitle {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 700;
  color: #365b91;
}

.authCard--login .slashmdMfaHandoffTitle {
  font-size: 17px;
}

.authFieldGroup {
  position: relative;
}

.authFieldGroup > label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.authField {
  border: 1px solid rgba(184, 214, 252, 0.72);
  border-radius: 16px;
  min-height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background:
    radial-gradient(180px 70px at 18% 18%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.54));
  box-shadow:
    0 18px 46px rgba(45, 74, 124, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.22);
  -webkit-backdrop-filter: blur(18px) saturate(1.22);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.authCard--login .authField {
  min-height: 56px;
  border-radius: 12px;
  padding: 0 14px;
  gap: 10px;
}

.authField:focus-within {
  border-color: rgba(63, 135, 255, 0.7);
  box-shadow:
    0 18px 46px rgba(45, 74, 124, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 0 0 4px rgba(63, 135, 255, 0.14);
}

.authField--error {
  border-color: rgba(222, 90, 90, 0.55);
}

.authField--readonly {
  opacity: 0.92;
}

.kcAuthIcon {
  color: #7da5d8;
  display: inline-flex;
}

.authField input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: var(--text-md);
  font-weight: var(--font-regular);
  color: #3e6197;
}

.authField input::placeholder {
  color: #6f8cb8;
}

.authFieldTrailing {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

.iconGhostButton {
  border: 0;
  background: transparent;
  color: #7ba3d7;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kcHelperText {
  margin-top: 6px;
  text-align: right;
  font-size: var(--text-sm);
  color: #607ea8;
}

.kcFieldError {
  margin-top: 6px;
  font-size: var(--text-sm);
  color: rgba(176, 60, 60, 0.92);
  text-align: left;
}

.kcFieldErrorIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(176, 60, 60, 0.92);
  vertical-align: middle;
}

.kcMessage {
  width: min(360px, 100%);
  margin: 6px auto 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(175, 206, 247, 0.7);
  background: rgba(255, 255, 255, 0.72);
  color: #355a90;
  font-size: var(--text-sm);
  line-height: 1.45;
}

.kcMessage--error {
  border-color: rgba(222, 90, 90, 0.35);
  background: rgba(255, 240, 240, 0.72);
  color: rgba(176, 60, 60, 0.95);
}

.kcMessage--warning {
  border-color: rgba(230, 170, 70, 0.35);
  background: rgba(255, 248, 232, 0.72);
  color: rgba(139, 96, 19, 0.95);
}

.kcMessage--success {
  border-color: rgba(62, 170, 120, 0.35);
  background: rgba(235, 255, 246, 0.72);
  color: rgba(34, 122, 84, 0.96);
}

.authPrimaryButton {
  width: 100%;
  border: 0;
  border-radius: 14px;
  min-height: 62px;
  color: #fff;
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  background: linear-gradient(98deg, var(--brand-start), var(--brand-end));
  box-shadow: 0 14px 28px rgba(32, 97, 191, 0.26);
}

.authCard--login .authPrimaryButton {
  min-height: 54px;
  border-radius: 12px;
}

.authSecondaryButton {
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  padding: 0 16px;
  border: 1px solid rgba(186, 209, 245, 0.66);
  background: rgba(255, 255, 255, 0.68);
  color: #496c9f;
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
}

.authSecondaryLine {
  margin: 4px 0 0;
  text-align: center;
  color: #6884b1;
  font-size: var(--text-sm);
  font-weight: var(--font-regular);
  line-height: 1.56;
}

.slashmdRecoveryLine {
  margin-top: 14px;
  margin-bottom: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

#kc-error-message,
#kc-info-message {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.slashmdRecoveryState {
  width: min(360px, 100%);
  margin: 2px auto 0;
  padding: 4px 0 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.slashmdRecoveryState--alert {
  margin-top: 4px;
}

#kc-error-message .instruction,
#kc-info-message .instruction {
  margin: 0;
  text-align: center;
}

.slashmdRedirectTitle {
  margin-bottom: 0 !important;
  color: #345a8f;
}

.slashmdRedirectText {
  max-width: 300px;
  color: #5e7ca8;
  line-height: 1.5;
}

.slashmdRedirectActionRow {
  margin-top: 4px !important;
}

.slashmdRedirectLink {
  margin: 0 2px;
}

.slashmdRecoveryAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 2px 8px;
  border-radius: 8px;
}

.slashmdRecoveryAction:hover,
.slashmdRecoveryAction:focus-visible {
  background: rgba(184, 215, 255, 0.32);
}

.authCard--login #kc-form-webauthn,
.authCard--login #kc-form {
  width: 100%;
}

.authCard--login #kc-form-webauthn {
  padding-top: 0;
  gap: 4px;
}

.authCard--login #kc-form-webauthn::before {
  content: none;
  display: none;
}

.authCard--login #authn_select {
  display: none;
}

.authCard--login #kc-form-webauthn .pf-v5-c-data-list {
  margin: 0;
  border: 0;
  background: transparent;
}

/* Passkey challenge UI: hide credential detail tiles; keep only action button. */
.authCard--login #kc-form-webauthn .pf-v5-c-data-list,
.authCard--login #kc-form-webauthn .select-auth-box-parent,
.authCard--login #kc-form-webauthn .select-auth-box {
  display: none !important;
}

.authCard--login #kc-form-webauthn #kc-form-options {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.authCard--login #kc-form-webauthn .pf-v5-c-data-list__item {
  border: 0 !important;
  margin: 0;
  padding: 0;
  background: transparent !important;
}

.authCard--login #kc-form-webauthn .pf-v5-c-data-list__item + .pf-v5-c-data-list__item {
  margin-top: 8px;
}

.authCard--login #kc-form-webauthn .pf-v5-c-data-list__item-row,
.authCard--login .select-auth-box-parent {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  margin: 0;
  min-height: 96px;
  padding: 14px 16px 12px 64px;
  border-radius: 12px;
  border: 1px solid rgba(184, 214, 252, 0.72) !important;
  background:
    radial-gradient(180px 70px at 18% 18%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.54)) !important;
  box-shadow:
    0 18px 46px rgba(45, 74, 124, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  color: #355a90 !important;
}

.authCard--login .select-auth-box-parent + .select-auth-box-parent {
  margin-top: 8px;
}

.authCard--login #kc-form-webauthn .pf-v5-c-data-list__item-content,
.authCard--login #kc-form-webauthn .pf-v5-c-data-list__cell {
  background: transparent !important;
}

.authCard--login .select-auth-box-icon,
.authCard--login .select-auth-box-icon i {
  color: #7399cb;
}

.authCard--login .select-auth-box-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.authCard--login .select-auth-box-icon i {
  display: none;
}

.authCard--login .select-auth-box-icon::before {
  content: "";
  width: 22px;
  height: 22px;
  background: url("../img/passkey-credential-v2.png") center / contain no-repeat;
}

.authCard--login .select-auth-box-headline {
  color: #284a7b !important;
  font-size: calc(var(--text-md) + 1px) !important;
  font-weight: var(--font-semibold);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.authCard--login .select-auth-box-desc {
  color: #5f7fae !important;
  font-size: calc(var(--text-sm) - 1px);
  font-weight: var(--font-medium);
  line-height: 1.25;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.authCard--login [id^="kc-webauthn-authenticator-transport-"],
.authCard--login [id^="kc-webauthn-authenticator-createdlabel-"],
.authCard--login [id^="kc-webauthn-authenticator-created-"] {
  color: #5f7fae !important;
  font-size: calc(var(--text-sm) - 1px);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.authCard--login [id^="kc-webauthn-authenticator-createdlabel-"] i,
.authCard--login [id^="kc-webauthn-authenticator-created-"] i {
  display: none !important;
}

.authCard--login #kc-form-webauthn #kc-form-buttons,
.authCard--login #kc-form-webauthn #kc-form-passkey-button {
  width: min(292px, 100%);
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
}

.authCard--login #authenticateWebAuthnButton,
.authCard--login #authenticateWebAuthnButtonConditionalUI {
  width: 100%;
  border: 0;
  border-radius: 11px;
  min-height: 48px;
  color: #fff;
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  background: linear-gradient(98deg, var(--brand-start), var(--brand-end));
  box-shadow: 0 14px 28px rgba(32, 97, 191, 0.26);
  text-align: center;
  padding-inline: 16px;
}

.authCard--login #authenticateWebAuthnButton::before,
.authCard--login #authenticateWebAuthnButtonConditionalUI::before {
  content: none;
}

.authCard--login #kc-form-webauthn .slashmdOtpAlternateLine--trailing {
  margin-top: 6px;
}

.authCard--login #kc-form-webauthn .slashmdPasskeyFooterRow {
  width: min(292px, 100%);
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.authCard--login #kc-form-webauthn .slashmdOtpTrustRow--passkey {
  margin-top: 0;
  justify-content: flex-start;
  flex: 0 1 auto;
}

.authCard--login #kc-form-webauthn .slashmdOtpAlternateLine--passkey {
  margin-top: 0;
  width: auto;
  flex: 0 1 auto;
}

.slashmdKcInfo {
  margin-top: 14px;
  width: min(360px, 100%);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.slashmdKcInfo .instruction,
.slashmdKcInfo p {
  margin: 0;
  text-align: center;
  color: #5f7fae;
  font-size: calc(var(--text-md) + 1px);
  line-height: 1.62;
}

.slashmdKcInfo .instruction + .instruction,
.slashmdKcInfo p + p,
.slashmdKcInfo form {
  margin-top: 14px;
}

.slashmdVerifyEmailInstruction {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 2px;
}

.slashmdVerifyEmailLead {
  display: block;
  color: #4f71a0;
  font-weight: var(--font-medium);
}

.slashmdVerifyEmailValue {
  display: block;
  text-align: center;
  font-size: calc(var(--text-md) + 4px);
  font-weight: var(--font-semibold);
  color: #4587e8;
  line-height: 1.4;
  word-break: break-word;
}

.slashmdKcInfo a {
  color: #4587e8;
  font-weight: var(--font-semibold);
}

.authFooterLinks {
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(193, 216, 248, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: var(--font-regular);
  color: #607ea8;
}

.inlineLink {
  color: #4f8ee6;
}

.inlineLinkButton {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline;
}

.inlineLink:hover {
  text-decoration: underline;
}

.inlineLink.strong {
  font-weight: var(--font-semibold);
}

.glassPanel {
  position: relative;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.34);
  box-shadow:
    var(--shadow-shell),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(30px) saturate(1.24);
  -webkit-backdrop-filter: blur(30px) saturate(1.24);
}

.glassPanel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0) 45%);
}

.dialogCloseButton {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #86a0c9;
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dialogCloseButton:hover {
  background: rgba(179, 205, 246, 0.25);
}

.modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  background: rgba(12, 24, 52, 0.42);
}

.modalPanel {
  width: min(920px, calc(100vw - 32px));
  max-height: min(82vh, 820px);
  border-radius: 24px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modalPanel--legal {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(175, 206, 247, 0.62);
  box-shadow:
    0 34px 86px rgba(28, 48, 84, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modalHeader {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 12px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid rgba(193, 216, 248, 0.55);
}

.modalHeaderLeading {
  display: inline-flex;
  align-items: center;
}

.modalTitle {
  margin: 0;
  color: #31588f;
  font-size: calc(var(--text-md) + 2px);
  font-weight: var(--font-semibold);
  text-align: center;
}

.legalModalMark {
  justify-self: start;
  opacity: 0.92;
  filter: drop-shadow(0 10px 18px rgba(34, 60, 108, 0.16));
}

.modalHeader .dialogCloseButton {
  justify-self: end;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 18px;
  color: rgba(47, 78, 126, 0.92);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(185, 210, 245, 0.75);
  box-shadow: 0 14px 32px rgba(40, 66, 112, 0.12);
}

.modalHeader .dialogCloseButton:hover,
.modalHeader .dialogCloseButton:focus-visible {
  background: rgba(182, 223, 255, 0.38);
  border-color: rgba(137, 185, 252, 0.85);
}

.modalBody {
  margin-top: 12px;
  overflow: auto;
  padding-right: 6px;
  flex: 1;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.legalModalBody .legalIntro {
  margin: 0;
  text-align: left;
  font-size: var(--text-sm);
  line-height: 1.7;
  color: rgba(70, 98, 142, 0.92);
}

.legalModalBody .legalLead {
  margin: 6px auto 0;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 18px;
  border: 1px solid rgba(186, 211, 245, 0.66);
  background:
    radial-gradient(240px 130px at 14% 0%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 72%),
    linear-gradient(180deg, rgba(250, 253, 255, 0.92), rgba(244, 249, 255, 0.88));
  box-shadow:
    0 14px 30px rgba(44, 71, 118, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  padding: 14px 16px;
}

.legalModalBody .legalMeta {
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(182, 211, 248, 0.72);
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: rgba(93, 121, 166, 0.95);
}

.legalModalBody .legalIntroList {
  margin: 0;
  padding-left: 22px;
  color: rgba(70, 98, 142, 0.92);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.legalModalBody .legalTocCard {
  margin: 16px auto 0;
  max-width: 660px;
  border-radius: 22px;
  padding: 18px 18px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(185, 210, 245, 0.65);
  box-shadow: 0 18px 50px rgba(40, 66, 112, 0.12);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  max-height: 280px;
  overflow: auto;
  overscroll-behavior: contain;
}

.legalModalBody .legalTocCard h2 {
  margin: 0;
  text-align: center;
  font-size: calc(var(--text-md) + 1px);
  font-weight: var(--font-semibold);
  color: #486692;
}

.legalModalBody .legalTocCard ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.legalModalBody .legalTocCard li {
  border-radius: 12px;
  border-bottom: 1px solid rgba(187, 210, 245, 0.46);
}

.legalModalBody .legalTocCard li button {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: var(--text-md);
  color: #43699f;
  font-weight: var(--font-medium);
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 12px;
}

.legalModalBody .legalTocCard li button:hover,
.legalModalBody .legalTocCard li button:focus-visible {
  background: rgba(182, 223, 255, 0.45);
}

.legalModalBody .legalSections {
  margin: 18px auto 0;
  max-width: 780px;
  gap: 14px;
}

.legalModalBody .legalSections h2 {
  font-size: calc(var(--text-md) + 6px);
}

.legalSections {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.legalSections section {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(191, 214, 248, 0.52);
}

.legalSections h2 {
  margin: 0;
  font-size: 25px;
  font-weight: var(--font-semibold);
  color: #3b5e8d;
}

.legalSections p,
.legalSections li {
  margin: 10px 0 0;
  color: #607da8;
  font-size: var(--text-md);
  font-weight: var(--font-regular);
  line-height: 1.56;
}

.legalSections ul {
  padding-left: 22px;
}

/* Keycloak update-password flow: "Sign out from other devices" checkbox row */
#kc-form-options {
  margin-top: 10px;
  margin-bottom: 14px;
  padding: 8px 0 10px;
}

#kc-form-options > div {
  display: flex;
  justify-content: center;
}

#kc-form-options .pf-v5-c-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 12px;
}

#kc-form-options .pf-v5-c-check__input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #88bbfb;
  border: 1px solid rgba(170, 202, 244, 0.95);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 8px 20px rgba(47, 79, 133, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  cursor: pointer;
  flex: 0 0 auto;
}

#kc-form-options .pf-v5-c-check__label {
  margin: 0;
  color: #6c8db8;
  font-size: var(--text-md);
  font-weight: var(--font-medium);
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
}

.kcCheckboxRow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: #607ea8;
}

.kcFormOptionsRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding-top: 2px;
}

.kcCheckboxRow input {
  width: 16px;
  height: 16px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(152, 186, 236, 0.92);
  border-radius: 4px;
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(36, 62, 106, 0.16);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
}

.kcCheckboxRow input::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(145deg, #2564d6, #2ec4ea);
  transform: scale(0);
  transition: transform 120ms ease;
}

.kcCheckboxRow input:checked::before {
  transform: scale(1);
}

.kcCheckboxRow input:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(63, 135, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(36, 62, 106, 0.16);
}

#kc-form-login .kcHelperText {
  margin-top: 8px;
  min-height: 18px;
}

#kc-form-login .pf-v5-c-form__group {
  margin: 12px 0 4px;
  padding: 0;
}

#kc-form-login .pf-v5-c-form__group .kcFormOptionsRow {
  min-height: 22px;
}

#kc-form-login .pf-v5-c-form__group .kcCheckboxRow {
  min-height: 18px;
}

/* Reduce any upstream Keycloak/PatternFly layout interference in our card. */
#kc-form,
#kc-form-wrapper {
  margin: 0;
  padding: 0;
}

#kc-form-login,
#kc-otp-login-form,
#kc-register-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#kc-otp-login-form {
  gap: 12px;
}

.authFieldGroup--otp {
  gap: 14px;
}

.slashmdOtpInstruction {
  margin: 8px auto 4px;
  max-width: 520px;
  color: #3a5f97;
  font-size: calc(var(--text-md) + 2px);
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.slashmdOtpSetupDescription {
  margin-top: 2px;
  max-width: 100%;
}

.slashmdOtpCodeArea {
  margin-top: 10px;
  margin-bottom: 8px;
}

.slashmdOtpBoxes {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.slashmdOtpDigit {
  width: 44px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(184, 214, 252, 0.72);
  background:
    radial-gradient(120px 56px at 22% 18%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.54));
  box-shadow:
    0 18px 38px rgba(45, 74, 124, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 24px;
  font-weight: var(--font-semibold);
  color: #3a5f97;
  line-height: 1;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.slashmdOtpDigit:focus {
  border-color: rgba(63, 135, 255, 0.78);
  box-shadow:
    0 18px 38px rgba(45, 74, 124, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 0 0 4px rgba(63, 135, 255, 0.14);
}

.slashmdOtpCodeArea--error .slashmdOtpDigit {
  border-color: rgba(222, 90, 90, 0.5);
}

.authFieldGroup--otp .kcFieldError {
  margin: 8px 0 2px;
  color: #c24f4f;
  font-size: var(--text-sm);
  text-align: center;
}

.slashmdOtpTrustRow {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.slashmdOtpFooterRow {
  width: min(320px, 100%);
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.slashmdOtpTrustRow--footer {
  margin-top: 0;
  justify-content: flex-start;
  flex: 0 1 auto;
}

.slashmdOtpTrustLabel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4f6e9f;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.slashmdOtpTrustLabel input {
  width: 14px;
  height: 14px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(148, 187, 240, 0.92);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(45, 74, 124, 0.12);
  display: inline-grid;
  place-content: center;
  transition:
    border-color 120ms ease,
    background-color 120ms ease,
    box-shadow 120ms ease;
}

.slashmdOtpTrustLabel input::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(145deg, #2d6adf, #30c3e9);
  transform: scale(0);
  transition: transform 120ms ease;
}

.slashmdOtpTrustLabel input:checked {
  border-color: rgba(72, 149, 235, 0.95);
  background: rgba(233, 245, 255, 0.98);
}

.slashmdOtpTrustLabel input:checked::before {
  transform: scale(1);
}

.slashmdOtpTrustLabel input:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(63, 135, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(45, 74, 124, 0.12);
}

#kc-otp-login-form #kc-form-options {
  display: none;
}

.slashmdOtpActions {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.95fr;
  gap: 10px;
  align-items: stretch;
}

.slashmdOtpActions--single {
  grid-template-columns: 1fr;
  width: min(320px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.slashmdOtpActions .authPrimaryButton,
.slashmdOtpActions .authSecondaryButton {
  min-height: 52px;
  width: 100%;
  border-radius: 12px;
}

.slashmdOtpActions--setup {
  grid-template-columns: 1fr;
}

.slashmdOtpActions--setupAia {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 520px) {
  .authCard--login #kc-form-webauthn .slashmdPasskeyFooterRow {
    gap: 10px;
  }

  .authCard--login #kc-form-webauthn .slashmdOtpTrustLabel {
    font-size: 11px;
  }

  .authCard--login #kc-form-webauthn .slashmdMethodSwitcherTrigger {
    font-size: 13px;
  }

  .slashmdOtpFooterRow {
    gap: 10px;
    flex-direction: column;
  }

  .slashmdOtpTrustRow--footer,
  .slashmdOtpAlternateLine--footer {
    width: 100%;
    justify-content: center;
  }
}

.slashmdOtpResendLine {
  margin-top: 10px;
  text-align: center;
}

.slashmdOtpResendLine .inlineLinkButton {
  font-weight: var(--font-semibold);
  font-size: var(--text-md);
}

.slashmdOtpResendLine .inlineLinkButton[disabled],
.slashmdOtpResendLine .inlineLinkButton[aria-disabled="true"] {
  opacity: 0.58;
  cursor: not-allowed;
  text-decoration: none;
}

.slashmdTryAnotherWayForm {
  display: none;
}

.slashmdOtpAlternateLine {
  margin-top: 4px;
}

.slashmdOtpAlternateLine--inline {
  margin-top: -2px;
}

.slashmdOtpAlternateLine--trailing {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 10px;
}

.slashmdOtpAlternateLine--footer {
  margin-top: 0;
  width: auto;
  flex: 0 1 auto;
}

.slashmdMethodSwitcher {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.slashmdMethodSwitcherTrigger {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 2px;
  min-height: 24px;
  background: transparent;
  color: #5d7ea9;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease;
}

.slashmdMethodSwitcherTrigger:hover,
.slashmdMethodSwitcherTrigger:focus-visible {
  color: #395f98;
  border-color: rgba(174, 204, 243, 0.78);
  background: rgba(250, 253, 255, 0.62);
}

.slashmdMethodSwitcherGlyph {
  width: 12px;
  height: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
}

.slashmdMethodSwitcherGlyph span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7a9fd5;
  box-shadow: 0 0 0 0.5px rgba(114, 151, 208, 0.45);
}

.slashmdMethodSwitcherMenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, calc(100vw - 52px));
  border-radius: 14px;
  border: 1px solid rgba(181, 210, 245, 0.86);
  background:
    radial-gradient(260px 120px at 16% 0%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(252, 254, 255, 0.94), rgba(244, 249, 255, 0.9));
  box-shadow:
    0 20px 48px rgba(44, 70, 118, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px) saturate(1.14);
  -webkit-backdrop-filter: blur(14px) saturate(1.14);
  overflow: hidden;
  z-index: 60;
}

.slashmdMethodSwitcher.isAbove .slashmdMethodSwitcherMenu {
  top: auto;
  bottom: calc(100% + 8px);
}

.slashmdMethodSwitcher.alignStart .slashmdMethodSwitcherMenu {
  left: 0;
  transform: none;
}

.slashmdMethodSwitcher.alignEnd .slashmdMethodSwitcherMenu {
  left: auto;
  right: 0;
  transform: none;
}

.slashmdMethodSwitcherOption {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(189, 213, 243, 0.72);
  background: transparent;
  color: #31578f;
  text-align: left;
  padding: 12px 13px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slashmdMethodSwitcherOption:last-child {
  border-bottom: 0;
}

.slashmdMethodSwitcherOption:hover,
.slashmdMethodSwitcherOption:focus-visible {
  background: rgba(194, 224, 255, 0.38);
}

.slashmdMethodSwitcherOptionTitle {
  font-size: 14px;
  font-weight: var(--font-semibold);
  line-height: 1.2;
}

.slashmdMethodSwitcherOptionDescription {
  color: #6883ac;
  font-size: 12px;
  line-height: 1.3;
}

.slashmdOtpResendStatus {
  margin-top: 6px;
  font-size: var(--text-xs);
  color: #3f83d8;
  min-height: 18px;
}

.slashmdOtpToast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  z-index: 1200;
  min-width: min(320px, calc(100vw - 28px));
  max-width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(176, 214, 255, 0.86);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  color: #2e5e9f;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  background:
    radial-gradient(260px 90px at 18% 20%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 248, 255, 0.92));
  box-shadow:
    0 18px 48px rgba(46, 74, 124, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.slashmdOtpToast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

#kc-select-credential-form ul,
#kc-select-credential-form [role="list"] {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

#kc-select-credential-form li,
#kc-select-credential-form [role="listitem"] {
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(183, 211, 246, 0.78);
  background:
    radial-gradient(220px 92px at 14% 0%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(252, 254, 255, 0.92), rgba(244, 249, 255, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 16px rgba(44, 72, 116, 0.08);
  overflow: hidden;
}

#kc-select-credential-form [name="authenticationExecution"] {
  width: 100%;
  border: 0;
  margin: 0;
  background: transparent;
  color: #31578f;
  text-align: left;
  padding: 12px 13px;
}

#kc-select-credential-form [name="authenticationExecution"]:hover,
#kc-select-credential-form [name="authenticationExecution"]:focus-visible {
  background: rgba(189, 220, 255, 0.34);
}

#kc-select-credential-form h2,
#kc-select-credential-form [role="heading"] {
  margin: 0;
  color: #31578f;
  font-size: 14px;
  line-height: 1.2;
  font-weight: var(--font-semibold);
}

#kc-select-credential-form p,
#kc-select-credential-form .kcSelectAuthDescription {
  margin: 4px 0 0;
  color: #6883ac;
  font-size: 12px;
  line-height: 1.3;
}

@media (max-width: 560px) {
  .slashmdOtpActions {
    grid-template-columns: 1fr;
  }

  .slashmdOtpInstruction {
    white-space: nowrap;
  }

  .slashmdOtpBoxes {
    gap: 8px;
  }

  .slashmdOtpDigit {
    width: 40px;
    height: 50px;
    border-radius: 10px;
    font-size: 22px;
  }
}

#kc-registration {
  margin-top: 8px;
}

#kc-reset-password-form .kcActionGroup {
  margin-top: 12px;
}

#kc-passwd-update-form .kcActionGroup {
  margin-top: 18px;
  padding: 8px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#kc-passwd-update-form .authPrimaryButton {
  width: 100%;
  padding: 0 24px;
}

#kc-passwd-update-cancel.authSecondaryButton {
  width: auto;
  min-width: 140px;
  min-height: 42px;
  padding: 0 22px;
  margin: 0 auto;
  align-self: center;
}

.authField textarea,
.authField select {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: var(--text-md);
  font-weight: var(--font-regular);
  color: #3e6197;
}

.authField textarea::placeholder {
  color: #6f8cb8;
}

.authField textarea {
  resize: vertical;
  min-height: 96px;
  padding: 16px 0;
}

.authField select {
  appearance: none;
}
