:root {
  color-scheme: light;
  --canvas: #f3f7f5;
  --paper: #fff;
  --ink: #183c32;
  --text: #3f5d50;
  --muted: #71847a;
  --green: #18765b;
  --green-dark: #115d46;
  --line: #dfe8e2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(32px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  color: var(--text);
  background: radial-gradient(ellipse at 50% 0, #e8f1eb 0, transparent 62%), var(--canvas);
  font-size: 15px;
  line-height: 1.6;
}

.login {
  width: 100%;
  max-width: 456px;
  padding: 38px 40px 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 16px 48px rgb(24 60 50 / 6%), 0 2px 6px rgb(24 60 50 / 2%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
  color: var(--green);
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -.8px;
  line-height: 1.3;
}

.brand span {
  padding-left: 14px;
  border-left: 1px solid #cdded3;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  line-height: 1.6;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
}

h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -.8px;
  line-height: 1.35;
}

.intro {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

form { margin: 0; }

.login-success {
  margin: 0 0 20px;
  padding: 10px 12px;
  border: 1px solid #cfe2d6;
  border-radius: 11px;
  color: var(--green-dark);
  background: #edf6f0;
  font-size: 13px;
  line-height: 1.7;
}

label {
  display: block;
  margin: 18px 0 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

form > label:first-child { margin-top: 0; }

input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #d4e1d9;
  border-radius: 11px;
  color: var(--ink);
  background: #fbfdfb;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

input::placeholder { color: #8a9b91; opacity: 1; }
input:hover { border-color: #b1c8b9; }
input:focus {
  border-color: var(--green);
  outline: none;
  background: var(--paper);
  box-shadow: 0 0 0 3px rgb(24 118 91 / 10%);
}

.password-row { position: relative; }
.password-row input { padding-right: 72px; }

button {
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

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

.password-row button {
  position: absolute;
  top: 3px;
  right: 3px;
  bottom: 3px;
  min-width: 58px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--green);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}

.password-row button:hover { background: #edf5ef; }
.password-row button:focus-visible { outline-offset: -2px; }

.submit {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid var(--green);
  border-radius: 11px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 3px 8px rgb(24 118 91 / 12%);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: background .16s, border-color .16s, box-shadow .16s;
}

.submit:hover:not(:disabled) {
  border-color: var(--green-dark);
  background: var(--green-dark);
  box-shadow: 0 4px 10px rgb(24 118 91 / 16%);
}

.submit:active:not(:disabled) { box-shadow: none; }
.submit:disabled { opacity: .65; cursor: wait; }

#error {
  min-height: 22px;
  margin: 11px 0;
  color: #ad493c;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.footnote {
  margin: 20px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
  text-align: center;
}

.device-note {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

@media (max-width: 480px) {
  body {
    padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }
  .login { padding: 30px 24px 24px; border-radius: 20px; }
  .brand { margin-bottom: 28px; font-size: 25px; }
  h1 { font-size: 27px; }
  .intro { margin-bottom: 24px; }
  .footnote { margin-bottom: 20px; }
  .device-note { padding-top: 18px; }
}

@media (max-height: 680px) {
  body { place-items: start center; }
}

@media (prefers-reduced-motion: reduce) {
  input, .submit { transition: none; }
}
