:root {
  --pf-v5-global--FontFamily--text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --pf-v5-global--primary-color--100: #2563eb;
  --pf-v5-global--primary-color--200: #1d4ed8;
  --yunshao-blue: #2563eb;
  --yunshao-blue-hover: #1d4ed8;
  --yunshao-text: #0f172a;
  --yunshao-muted: #64748b;
  --yunshao-border: rgba(148, 163, 184, 0.28);
  --yunshao-ring: rgba(37, 99, 235, 0.18);
}

* {
  box-sizing: border-box;
}

body,
.login-pf body,
.pf-v5-c-login {
  min-width: 1024px;
  min-height: max(768px, 100vh);
  min-height: max(768px, 100dvh);
  margin: 0;
  color: var(--yunshao-text);
  background: #f7f8fa !important;
  font-family: var(--pf-v5-global--FontFamily--text) !important;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
}

.pf-v5-c-login {
  display: block;
  padding: 0;
}

.pf-v5-c-login__container {
  position: static !important;
  display: flex !important;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  min-height: max(768px, 100vh);
  min-height: max(768px, 100dvh);
  max-width: none !important;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.pf-v5-c-login__main {
  position: relative;
  flex: none;
  width: 100%;
  max-width: 480px;
  min-width: 0;
  margin: auto;
  overflow-wrap: anywhere;
  overflow: visible;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 64px -32px rgba(15, 23, 42, 0.22), 0 8px 24px -16px rgba(15, 23, 42, 0.12);
}

#kc-header,
.pf-v5-c-login__header,
.pf-v5-c-login__main-footer-band {
  display: none;
}

.pf-v5-c-login__main-header {
  padding: 48px 48px 24px !important;
}

.pf-v5-c-login__main-body {
  padding: 0 48px 48px !important;
}

.pf-v5-c-login__main-footer:empty {
  display: none;
}

#kc-page-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: var(--yunshao-text);
  text-align: center;
}

.yunshao-title-text {
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.yunshao-segmented {
  position: relative;
  display: flex;
  width: 100%;
  margin: 0 0 22px;
  padding: 4px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(226, 232, 240, 0.54);
}

.yunshao-segmented a,
.yunshao-segmented span {
  display: flex;
  min-height: 36px;
  flex: 1;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #64748b !important;
  font-size: 12px;
  font-weight: 550;
  line-height: 1;
  text-decoration: none !important;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.yunshao-segmented a:hover {
  color: #334155 !important;
  background: rgba(255, 255, 255, 0.42);
}

.yunshao-segmented .is-active {
  border-color: rgba(15, 23, 42, 0.05);
  color: var(--yunshao-text) !important;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.yunshao-segmented a:focus-visible {
  outline: 3px solid var(--yunshao-ring);
  outline-offset: 2px;
}

.yunshao-field {
  position: relative;
  margin-bottom: 16px;
}

#kc-register-form {
  display: block;
}

.pf-v5-c-form__label,
.pf-v5-c-form__label-text,
label {
  color: #64748b;
  font-size: 14px;
  font-weight: 560;
}

.yunshao-field > label {
  display: block;
  margin: 0 0 7px 4px;
  line-height: 20px;
}

.yunshao-input-shell {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--yunshao-border);
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.74);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.yunshao-input-shell:hover {
  border-color: rgba(100, 116, 139, 0.38);
}

.yunshao-input-shell:focus-within {
  border-color: var(--yunshao-blue);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px var(--yunshao-ring);
}

.yunshao-input-shell:has(input[aria-invalid="true"]) {
  border-color: #dc2626;
}

.yunshao-field-icon {
  position: absolute;
  left: 14px;
  z-index: 1;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
  transition: color 180ms ease;
}

.yunshao-input-shell:focus-within .yunshao-field-icon {
  color: var(--yunshao-blue);
}

.yunshao-input-shell .pf-v5-c-form-control,
.yunshao-input-shell input[type="text"],
.yunshao-input-shell input[type="email"],
.yunshao-input-shell input[type="password"] {
  width: 100%;
  min-height: 42px;
  padding: 0 46px 0 40px !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  color: var(--yunshao-text);
  background: transparent !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 16px;
  line-height: 42px;
}

/* Shared with inherited password-update and other Keycloak form pages. */
.pf-v5-c-login input[type="text"],
.pf-v5-c-login input[type="email"],
.pf-v5-c-login input[type="password"],
.pf-v5-c-login select,
.pf-v5-c-login textarea {
  font-size: 16px;
}

.yunshao-input-shell input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.yunshao-input-shell input:-webkit-autofill,
.yunshao-input-shell input:-webkit-autofill:hover,
.yunshao-input-shell input:-webkit-autofill:focus,
.yunshao-input-shell input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--yunshao-text) !important;
  caret-color: var(--yunshao-text);
  background-color: #fff !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
}

.yunshao-password-toggle {
  position: absolute;
  right: 0;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
}

.yunshao-password-toggle:hover {
  color: #475569;
  background: rgba(226, 232, 240, 0.62);
}

.yunshao-password-toggle:focus-visible {
  outline: 3px solid var(--yunshao-ring);
  outline-offset: -3px;
}

.yunshao-password-toggle svg {
  width: 16px;
  height: 16px;
}

.yunshao-password-toggle .yunshao-eye-off,
.yunshao-password-toggle.is-visible .yunshao-eye {
  display: none;
}

.yunshao-password-toggle.is-visible .yunshao-eye-off {
  display: block;
}

.yunshao-password-field > .yunshao-reset-help {
  position: absolute;
  z-index: 4;
  top: -8px;
  right: 0;
}

.yunshao-reset-help summary {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: #2563eb;
  font-size: 11px;
  font-weight: 520;
  list-style: none;
  cursor: pointer;
}

.yunshao-reset-help summary::-webkit-details-marker {
  display: none;
}

.yunshao-reset-help summary:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yunshao-reset-help summary:focus-visible {
  border-radius: 5px;
  outline: 3px solid var(--yunshao-ring);
  outline-offset: 2px;
}

.yunshao-reset-note {
  position: absolute;
  z-index: 6;
  top: 34px;
  right: 0;
  width: 240px;
  padding: 11px 13px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  color: #334155;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.13);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}

a {
  color: #2563eb !important;
  font-weight: 520;
  text-decoration: none;
}

a:hover {
  color: #1d4ed8 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#kc-login,
#kc-register,
.pf-v5-c-button.pf-m-primary {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--yunshao-blue) !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

#kc-login svg,
#kc-register svg {
  width: 14px;
  height: 14px;
  transition: transform 180ms ease;
}

#kc-login:hover,
#kc-register:hover {
  background: var(--yunshao-blue-hover) !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

#kc-login:hover svg,
#kc-register:hover svg {
  transform: translateX(2px);
}

#kc-login:active,
#kc-register:active {
  transform: scale(0.99);
}

#kc-login:focus-visible,
#kc-register:focus-visible {
  outline: 4px solid var(--yunshao-ring);
  outline-offset: 2px;
}

.yunshao-register-actions {
  margin-top: 20px;
}

.yunshao-auth-links {
  position: relative;
  display: flex;
  min-height: 44px;
  margin-top: 12px;
  align-items: center;
  justify-content: space-between;
}

.yunshao-auth-link,
.yunshao-forgot-password,
.yunshao-back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  color: #334155 !important;
  font-size: 13px;
  font-weight: 520;
  cursor: pointer;
}

.yunshao-forgot-password {
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
}

.yunshao-forgot-password:hover {
  color: var(--yunshao-blue) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yunshao-forgot-password:focus-visible {
  border-radius: 5px;
  outline: 3px solid var(--yunshao-ring);
  outline-offset: 2px;
}

.yunshao-auth-link svg,
.yunshao-forgot-password svg {
  width: 16px;
  height: 16px;
}

.yunshao-dialog {
  width: 424px;
  max-width: calc(100% - 32px);
  max-height: calc(100svh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  color: var(--yunshao-text);
  background: #fff;
  box-shadow: 0 24px 56px -20px rgba(15, 23, 42, 0.32), 0 8px 20px -12px rgba(15, 23, 42, 0.16);
  font-family: inherit;
}

.yunshao-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.yunshao-dialog-content {
  position: relative;
  padding: 24px;
}

.yunshao-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.yunshao-dialog-close:hover {
  color: var(--yunshao-text);
  background: rgba(226, 232, 240, 0.62);
}

.yunshao-dialog-close:focus-visible,
.yunshao-dialog-confirm:focus-visible {
  outline: 3px solid var(--yunshao-ring);
  outline-offset: 2px;
}

.yunshao-dialog-close svg {
  width: 16px;
  height: 16px;
}

.yunshao-dialog-header {
  padding-right: 32px;
}

.yunshao-dialog h2 {
  margin: 0 0 8px;
  color: var(--yunshao-text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.yunshao-dialog p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.yunshao-dialog-actions {
  display: flex;
  margin-top: 24px;
  justify-content: flex-end;
}

.yunshao-dialog-confirm {
  min-width: 72px;
  min-height: 40px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--yunshao-blue);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.yunshao-dialog-confirm:hover {
  background: var(--yunshao-blue-hover);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.yunshao-registration-note {
  margin: 16px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.yunshao-back-link {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.pf-v5-c-alert {
  margin-bottom: 16px;
  border: 1px solid rgba(220, 38, 38, 0.16);
  border-radius: 12px;
  background: rgba(254, 242, 242, 0.9);
  box-shadow: none;
}

.pf-v5-c-form__helper-text,
.pf-v5-c-form__helper-text .pf-m-error,
#input-error,
[id^="input-error-"] {
  display: block;
  margin-top: 6px;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.45;
}

.pf-v5-c-alert__title {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.yunshao-icp-footer {
  flex: none;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--yunshao-muted);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.yunshao-icp-footer a {
  display: inline-flex;
  min-height: 24px;
  padding: 4px 8px;
  align-items: center;
  border-radius: 8px;
  color: inherit !important;
  text-decoration: none;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.yunshao-icp-footer a:hover {
  color: #475569 !important;
  text-decoration: underline;
}

.yunshao-icp-footer a:focus-visible {
  outline: 3px solid var(--yunshao-ring);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
