header {
  display: block;
  height: 10ex;
  border-bottom: 1px solid #f1f1f1;
  .logo {
  position: absolute;
  top: 1ex;
  left: 1em;
  font-size: 2em;
  color:royalblue;
} //.logo
  .search {
    display: block;
    width: auto;
    position: absolute;
    top: 1ex;
    right: 1em;
    a {
      display: inline-block;
      margin-right: 3em;
      padding: 2ex 2em;
      text-decoration: none;
      background-color: #4e1bb4;
      color: black;
    }
  } //.search
  .menu {
    display: none;
    &.active {
      display: block;
    }
  } //.login-menu
} // header

header {
  display: block;
  height: 10ex;
  border-bottom: 1px solid #f1f1f1;
  .logo {
  position: absolute;
  top: 1ex;
  left: 1em;
  font-size: 2em;
  color:royalblue;
} //.logo
  .search {
    display: block;
    width: auto;
    position: absolute;
    top: 1.5ex;
    right: 2em;
    a {
      display: inline-block;
      margin-right: 2.5em;
      padding: 2ex 2em;
      text-decoration: none;
      background-color: #4e1bb4;
      color: black;
    }
  } //.search
  .menu {
    display: none;
    &.active {
      display: block;
    }
  } //.login-menu
} // header

Adjust margin of header features to give more margin on left and less margin between items.
Adjust margin of header features to give more margin on left and less margin between items.
