:root {
  color: #18231f;
  background: #f3f5f2;
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  background: #eef2ef;
}

.login-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

.login-panel {
  width: min(100%, 400px);
  padding: 32px;
  background: #ffffff;
  border: 1px solid #cdd6d1;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgb(23 42 35 / 10%);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 5px;
  margin-bottom: 28px;
  border: 1px solid #b8c6bf;
  border-radius: 6px;
}

.brand-mark span {
  display: block;
  background: #0f766e;
  border-radius: 2px;
}

.brand-mark span:nth-child(2) {
  background: #d18a2d;
}

.brand-mark span:nth-child(3) {
  background: #c15d47;
}

.brand-mark span:nth-child(4) {
  background: #315e70;
}

.product-kicker {
  margin: 0 0 8px;
  color: #5d6c66;
  font-size: 12px;
  font-weight: 750;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.login-intro {
  margin: 8px 0 28px;
  color: #68766f;
  font-size: 15px;
}

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

label {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: #18231f;
  background: #fbfcfb;
  border: 1px solid #aebbb5;
  border-radius: 6px;
  font: inherit;
  outline: none;
}

input:focus-visible {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgb(15 118 110 / 18%);
}

.login-error {
  margin: 4px 0 0;
  padding: 10px 12px;
  color: #842e20;
  background: #fff3ef;
  border: 1px solid #e8b8ad;
  border-radius: 5px;
  font-size: 14px;
}

button {
  min-height: 48px;
  margin-top: 12px;
  padding: 0 18px;
  color: #ffffff;
  background: #0f6b64;
  border: 1px solid #0f6b64;
  border-radius: 6px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #0a5751;
}

button:focus-visible {
  outline: 3px solid rgb(15 118 110 / 28%);
  outline-offset: 2px;
}

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

.button-progress {
  display: none;
  width: 17px;
  height: 17px;
  margin: 0 auto;
  border: 2px solid rgb(255 255 255 / 45%);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

button[aria-busy="true"] .button-label {
  display: none;
}

button[aria-busy="true"] .button-progress {
  display: block;
}

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

@media (max-width: 480px) {
  .login-shell {
    align-items: start;
    padding-inline: 14px;
  }

  .login-panel {
    margin-top: 8vh;
    padding: 26px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button-progress {
    animation-duration: 1.8s;
  }
}
