:root {
  color-scheme: light dark;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background: #f4f6f8;
  color: #18212f;
}
main {
  width: min(380px, calc(100vw - 32px));
  background: white;
  border: 1px solid #d8dee7;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(20, 31, 47, 0.12);
}
h1 {
  margin: 0 0 20px;
  font-size: 24px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 8px;
}
.password-field {
  position: relative;
}
input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #b8c1cc;
  border-radius: 6px;
  padding: 12px 46px 12px 12px;
  font-size: 16px;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #4a596b;
  background: transparent;
  cursor: pointer;
}
.password-toggle:hover {
  background: #eef2f7;
  color: #18212f;
}
.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button[type="submit"] {
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 700;
  color: white;
  background: #126f68;
  cursor: pointer;
}
p {
  min-height: 20px;
  margin: 0 0 14px;
  color: #b42318;
  font-size: 14px;
}
@media (prefers-color-scheme: dark) {
  body {
    background: #10151d;
    color: #eef2f7;
  }
  main {
    background: #171f2b;
    border-color: #2a3645;
  }
  input {
    background: #0f1520;
    color: #eef2f7;
    border-color: #425168;
  }
  .password-toggle {
    color: #b8c1cc;
  }
  .password-toggle:hover {
    background: #243144;
    color: #eef2f7;
  }
}
