#app {
  display: flex;
  height: 100vh;
}

#app main {
  flex: 1;
  order: 1;
  transition: transform 350ms ease;
}

#app aside {
  order: 2;
  width: 300px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e0e4e8;
  height: 100vh;
  transition: transform 350ms ease,
    box-shadow 350ms ease;
}

#app aside .toggle-sidebar {
  width: 40px;
  height: 40px;
  background: rgb(35, 40, 55);
  color: #fff;
  display: none;
  position: absolute;
  top: 10px;
  left: -40px;
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
  box-shadow: -3px 2px 9px 1px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  #app main {
    z-index: 1;
  }

  #app aside {
    position: fixed;
    right: 0;
    top: 0;
    transform: translate3d(100%, 0, 0);
    box-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
    z-index: 3;
  }

  #app .screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgb(0, 0, 0);
    z-index: 0;
    opacity: 0;
    transition: opacity 350ms ease 100ms,
      z-index 100ms ease;
  }

  #app aside.show {
    border: none;
    transform: translate3d(0, 0, 0);
    box-shadow: -1px 0px 20px rgba(0, 0, 0, 0.3);
  }

  #app aside.show + main {
    transform: translate3d(-10%, 0,  0);
  }

  #app aside.show ~ .screen {
    opacity: 0.15;
    z-index: 2;
  }

  #app aside .toggle-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #app aside .toggle-sidebar i {
    transition: transform 350ms ease;
  }

  #app aside.show .toggle-sidebar i {
    transform: rotate(180deg);
  }
}
