:root {
  --forest: #245b43;
  --forest-dark: #173e2e;
  --rail: #a83932;
  --ink: #1f2a25;
  --muted: #68746d;
  --line: #d7ded9;
  --canvas: #f5f7f5;
  --surface: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  margin: 0;
  min-height: 100%;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

.login-page {
  background: var(--surface);
  min-height: 100vh;
}

.login-visual {
  height: min(42vh, 350px);
  min-height: 260px;
  overflow: hidden;
  position: relative;
}

.login-visual > img,
.login-visual__shade {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.login-visual > img {
  object-fit: cover;
  object-position: 53% 62%;
}

.login-visual__shade {
  background: linear-gradient(180deg, rgba(10, 36, 26, 0.08), rgba(10, 34, 25, 0.8));
}

.login-brand {
  align-items: center;
  bottom: 25px;
  color: #fff;
  display: flex;
  gap: 13px;
  left: 20px;
  position: absolute;
  right: 20px;
}

.login-brand__mark {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(20, 66, 48, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  display: flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.login-brand__mark svg {
  height: 24px;
  width: 24px;
}

.login-brand p,
.login-brand h1,
.login-brand span {
  margin: 0;
}

.login-brand p {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.8;
}

.login-brand h1 {
  font-family: "Songti SC", "STSong", serif;
  font-size: 27px;
  line-height: 1.18;
}

.login-brand span {
  font-size: 12px;
  opacity: 0.84;
}

.login-panel {
  margin: 0 auto;
  max-width: 460px;
  padding: 28px 20px calc(32px + env(safe-area-inset-bottom, 0px));
}

.login-panel__heading {
  margin-bottom: 25px;
}

.login-panel__heading p {
  color: var(--forest);
  font-size: 10px;
  font-weight: 800;
  margin: 0 0 5px;
}

.login-panel__heading h2 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0;
}

form {
  display: grid;
  gap: 10px;
}

form > label:not(.remember-row) {
  color: #4b5951;
  font-size: 12px;
  font-weight: 700;
  margin-top: 3px;
}

.input-shell {
  align-items: center;
  background: #fafbfa;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 9px;
  grid-template-columns: 20px minmax(0, 1fr);
  height: 50px;
  padding: 0 13px;
}

.input-shell:focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(36, 91, 67, 0.12);
}

.input-shell > svg {
  color: #77837c;
  height: 18px;
  width: 18px;
}

.input-shell input {
  background: transparent;
  border: 0;
  color: var(--ink);
  height: 100%;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.input-shell:has(.password-toggle) {
  grid-template-columns: 20px minmax(0, 1fr) 38px;
  padding-right: 5px;
}

.password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: #66736b;
  cursor: pointer;
  display: flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

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

.remember-row {
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 12px;
  gap: 9px;
  margin: 4px 0;
  min-height: 30px;
}

.remember-row input {
  accent-color: var(--forest);
  height: 18px;
  width: 18px;
}

.login-error {
  color: var(--rail);
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  min-height: 17px;
}

.login-button {
  align-items: center;
  background: var(--forest);
  border: 0;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 9px;
  height: 50px;
  justify-content: center;
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.login-button svg {
  height: 18px;
  width: 18px;
}

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

@media (min-width: 760px) {
  body {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: 32px;
  }

  .login-page {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(22, 48, 36, 0.14);
    display: grid;
    grid-template-columns: minmax(340px, 1.08fr) minmax(360px, 0.92fr);
    max-width: 920px;
    min-height: 580px;
    overflow: hidden;
    width: 100%;
  }

  .login-visual {
    height: 100%;
    min-height: 580px;
  }

  .login-panel {
    align-self: center;
    padding: 48px;
    width: 100%;
  }
}

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