:root {
  color: #17211e;
  background: #f4f5ee;
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

body {
  min-width: 320px;
  margin: 0;
  background: #f4f5ee;
}

button,
input {
  font: inherit;
}

.login-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-content: center;
  padding: 48px 20px;
  overflow: hidden;
  border-top: 12px solid #0d3b31;
  border-bottom: 8px solid #f2c94c;
  background: #f4f5ee;
}

.login-shell::before,
.login-shell::after {
  position: fixed;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.login-shell::before {
  top: 12px;
  right: 0;
  width: clamp(70px, 14vw, 180px);
  height: 10px;
  background: #68b6c3;
}

.login-shell::after {
  bottom: 8px;
  left: 0;
  width: clamp(110px, 24vw, 300px);
  height: 10px;
  background: #e56b55;
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(calc(100vw - 40px), 430px);
  overflow: hidden;
  border: 1px solid #17211e;
  border-radius: 4px;
  background: #fffef9;
  box-shadow: 10px 10px 0 #0d3b31;
}

.login-masthead {
  display: flex;
  min-height: 88px;
  align-items: stretch;
  justify-content: space-between;
  color: #fffef9;
  background: #0d3b31;
}

.login-masthead > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 17px 20px;
}

.login-masthead strong {
  font-family: "STHeiti", "PingFang SC", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.login-masthead span {
  margin-top: 5px;
  color: #bcd4ca;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 9px;
}

.login-masthead b {
  display: grid;
  width: 88px;
  flex: 0 0 88px;
  place-items: center;
  color: #0d3b31;
  background: #f2c94c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.login-body {
  padding: 32px 30px 24px;
}

.login-kicker {
  margin: 0;
  color: #176149;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
}

.login-body h1 {
  margin: 8px 0 0;
  font-family: "STHeiti", "PingFang SC", sans-serif;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.25;
}

.signal-rule {
  display: grid;
  height: 5px;
  grid-template-columns: 1.6fr 0.8fr 0.5fr;
  gap: 4px;
  margin-top: 18px;
}

.signal-rule span:nth-child(1) { background: #176149; }
.signal-rule span:nth-child(2) { background: #e56b55; }
.signal-rule span:nth-child(3) { background: #68b6c3; }

form {
  margin-top: 28px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #495750;
  font-size: 12px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #8c9992;
  border-radius: 3px;
  outline: 0;
  color: #17211e;
  background: #f4f5ee;
  font-size: 17px;
}

input:hover {
  border-color: #176149;
}

input:focus {
  border-color: #0d3b31;
  box-shadow: 0 0 0 3px rgb(23 97 73 / 0.16);
}

.login-error {
  min-height: 36px;
  margin: 0;
  padding-top: 8px;
  color: #a84032;
  font-size: 12px;
  line-height: 1.4;
}

button {
  width: 100%;
  height: 52px;
  border: 1px solid #0d3b31;
  border-radius: 3px;
  color: #fffef9;
  background: #0d3b31;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease;
}

button:hover:not(:disabled) {
  color: #0d3b31;
  background: #f2c94c;
}

button:focus-visible {
  outline: 3px solid #68b6c3;
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding-top: 13px;
  border-top: 1px solid #c5cdc4;
  color: #66736d;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 8px;
}

.login-domain {
  position: absolute;
  right: 20px;
  bottom: 24px;
  left: 20px;
  z-index: 1;
  margin: 0;
  color: #66736d;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 9px;
  text-align: center;
}

@media (max-width: 480px) {
  .login-shell {
    padding: 32px 16px;
  }

  .login-panel {
    width: min(calc(100vw - 32px), 430px);
    box-shadow: 7px 7px 0 #0d3b31;
  }

  .login-body {
    padding: 28px 22px 22px;
  }

  .login-masthead > div {
    padding-inline: 18px;
  }

  .login-masthead b {
    width: 76px;
    flex-basis: 76px;
  }

  .login-body h1 {
    font-size: 27px;
  }
}

@media (max-height: 590px) {
  .login-shell {
    place-content: start center;
    overflow: auto;
    padding-block: 24px;
  }

  .login-domain {
    position: static;
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
