:root {
  color-scheme: light;
  --text: #333333;
  --muted: #8a8f96;
  --line: #dddddd;
  --primary: #5d9cec;
  --primary-hover: #4c8cde;
  --danger: #d04437;
  --success: #2d7a62;
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

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

body {
  color: var(--text);
  background: #ffffff;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(420px, 1fr);
  width: 100%;
  min-height: 100dvh;
  background: #ffffff;
}

.login-visual {
  position: relative;
  min-width: 0;
  min-height: 100dvh;
  overflow: hidden;
  background: #dce5e7;
}

.login-visual__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  object-fit: cover;
  object-position: center;
}

.login-visual__copyright {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(24, 31, 35, 0.48);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.login-panel {
  display: flex;
  min-width: 0;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: #ffffff;
}

.login-card {
  width: min(100%, 367px);
  transform: translateY(-1vh);
}

.brand-logo {
  display: block;
  width: 292px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 32px;
}

.login-form {
  width: 100%;
}

.login-field {
  display: flex;
  width: 100%;
  height: 56px;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
}

.login-field + .login-field {
  margin-top: 30px;
}

.login-field:focus-within {
  border-bottom-color: #b6c0cd;
}

.login-field__icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: #b1b5bb;
}

.login-field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 14px;
}

.login-field input::placeholder {
  color: #9ea3a9;
}

.visibility-button {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 0;
  place-items: center;
  border: 0;
  color: #9ba1a8;
  background: transparent;
}

.visibility-button:hover {
  color: #6f7780;
}

.visibility-button svg {
  width: 19px;
  height: 19px;
}

.form-message {
  min-height: 0;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.55;
}

.form-message:not(:empty) {
  min-height: 18px;
  margin: 8px 0 0;
}

.form-message.is-success {
  color: var(--success);
}

.submit-button {
  display: grid;
  width: 100%;
  height: 40px;
  margin-top: 25px;
  padding: 0 18px;
  place-items: center;
  border: 0;
  border-radius: 15px;
  color: #ffffff;
  background: var(--primary);
  font-size: 16px;
  transition:
    background 160ms ease,
    opacity 160ms ease;
}

.submit-button:hover {
  background: var(--primary-hover);
}

.submit-button:focus-visible,
.visibility-button:focus-visible {
  outline: 2px solid rgba(93, 145, 227, 0.38);
  outline-offset: 2px;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.submit-button.is-loading .submit-button__label::after {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 50%;
  content: "";
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 1fr);
  }

  .login-panel {
    padding: 40px;
  }

  .brand-logo {
    width: 292px;
  }
}

@media (max-width: 760px) {
  .login-shell {
    display: block;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100dvh;
    padding: 36px 24px;
  }

  .login-card {
    transform: translateY(-4vh);
  }

  .brand-logo {
    width: min(100%, 260px);
    margin-bottom: 32px;
  }
}

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