:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #172033;
  background: #f2f6fe;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  background: #f2f6fe;
}

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

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
}

.login-panel {
  width: min(100%, 460px);
  padding: 46px 48px 40px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 56px rgba(55, 77, 115, 0.13);
}

.brand-header {
  margin-bottom: 36px;
  text-align: center;
}

.brand-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 8px;
  background: #2f6fed;
  color: #ffffff;
  font-size: 24px;
  font-weight: 750;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(47, 111, 237, 0.22);
}

.brand-header h1 {
  margin: 0;
  color: #172033;
  font-size: 28px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0;
}

.brand-header p {
  margin: 14px 0 0;
  color: #8a98b3;
  font-size: 15px;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 22px;
}

.form-field {
  display: grid;
  gap: 9px;
}

.form-field label {
  color: #394963;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
}

.form-field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #dce3ee;
  border-radius: 6px;
  outline: none;
  background: #ffffff;
  color: #172033;
  font-size: 15px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field input::placeholder {
  color: #a1aabb;
}

.form-field input:hover {
  border-color: #c2cddd;
}

.form-field input:focus {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.13);
}

.login-button {
  width: 100%;
  height: 50px;
  margin-top: -2px;
  border: 0;
  border-radius: 6px;
  background: #2f6fed;
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(47, 111, 237, 0.24);
  transition: background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.login-button:hover:not(:disabled) {
  background: #245fd3;
  box-shadow: 0 10px 22px rgba(47, 111, 237, 0.3);
  transform: translateY(-1px);
}

.login-button:focus-visible {
  outline: 3px solid rgba(47, 111, 237, 0.25);
  outline-offset: 3px;
}

.login-button:active:not(:disabled) {
  transform: translateY(0);
}

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

.login-message {
  min-height: 20px;
  margin: -10px 0 0;
  color: #247252;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}

.login-message:empty {
  min-height: 0;
}

.login-message.is-error {
  color: #c53542;
}

@media (max-width: 520px) {
  .login-page {
    align-items: start;
    padding: 10vh 16px 24px;
  }

  .login-panel {
    padding: 38px 24px 30px;
  }

  .brand-header {
    margin-bottom: 30px;
  }

  .brand-header h1 {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-field input,
  .login-button {
    transition: none;
  }
}
