:root {
  --page: #e9eaf7;
  --ink: #242434;
  --muted: #6e6a86;
  --line: #e5e6f2;
  --active: #5b64ff;
  --danger: #d6177a;
  --button: #cfd4ff;
  --shadow: 0 1px 2px rgba(29, 31, 57, .06), 0 10px 30px rgba(48, 48, 86, .06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.login-card {
  width: min(100%, 432px);
  min-height: 453px;
  background: #fbfbfe;
  border: 1px solid #dfe1f0;
  border-radius: 11px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 38px 46px 0 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #252532;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 4.5px;
  line-height: 1;
}

.mark {
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  color: #050508;
}

.open-account {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #504c61;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.open-account svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.6;
}

.form-section {
  width: min(100% - 80px, 352px);
  padding: 38px 0 40px;
  margin-left: 40px;
}

h1 {
  margin: 0 0 19px;
  color: #262637;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 430;
  letter-spacing: 0;
}

.field {
  margin-bottom: 17px;
}

.field.password {
  margin-bottom: 7px;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--active);
  font-size: 13px;
  line-height: 1.15;
  font-weight: 520;
}

.field.password label {
  color: var(--danger);
}

input {
  width: 100%;
  height: 41px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: #4a485e;
  font: inherit;
  font-size: 15.5px;
  outline: none;
  padding: 0 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus {
  border-color: #dfe2fb;
  box-shadow: 0 3px 0 var(--active), 0 0 13px rgba(91, 100, 255, .12);
}

.password-control {
  display: flex;
  height: 40px;
}

.password-control input {
  height: 40px;
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.password-control input:focus {
  position: relative;
  z-index: 1;
  border-color: #ee9dcb;
  box-shadow: 0 0 0 1px #ee9dcb;
}

.show-password {
  width: 41px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 3px 3px 0;
  background: #fff;
  color: #69667f;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.show-password svg {
  width: 16px;
  height: 16px;
}

.login-error {
  display: none;
  margin: 2px 0 4px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.3;
}

.login-error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  vertical-align: 2px;
}

.login-error.visible {
  display: block;
}

.forgot {
  display: inline-block;
  margin-bottom: 27px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 111px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  padding: 0 21px;
}

.login-button:hover {
  background: #c3c9ff;
}

@media (max-width: 760px) {
  .page {
    padding: 12px;
  }

  .login-card {
    min-height: calc(100vh - 24px);
    border-radius: 18px;
  }

  .card-header {
    padding: 42px 30px 0;
  }

  .brand {
    gap: 16px;
    font-size: 20px;
    letter-spacing: 5px;
  }

  .mark {
    width: 44px;
    height: 44px;
  }

  .open-account {
    font-size: 18px;
    gap: 5px;
  }

  .open-account svg {
    width: 16px;
    height: 16px;
  }

  .form-section {
    width: auto;
    margin: 0;
    padding: 58px 30px 52px;
  }

  h1 {
    font-size: 44px;
    margin-bottom: 32px;
  }

  label,
  .login-error,
  .forgot,
  .login-button {
    font-size: 20px;
  }

  input {
    height: 64px;
    font-size: 22px;
    padding: 0 20px;
  }

  .password-control,
  .password-control input {
    height: 64px;
  }

  .show-password {
    width: 64px;
  }

  .show-password svg {
    width: 25px;
    height: 25px;
  }

  .forgot {
    margin-bottom: 42px;
  }

  .login-button {
    width: 172px;
    height: 64px;
  }
}

@media (max-width: 430px) {
  .card-header {
    align-items: flex-start;
    padding: 32px 22px 0;
  }

  .brand {
    gap: 11px;
    font-size: 16px;
    letter-spacing: 4px;
  }

  .mark {
    width: 38px;
    height: 38px;
  }

  .open-account {
    font-size: 15px;
  }

  .form-section {
    padding-left: 22px;
    padding-right: 22px;
  }
}
