.body {
  display: grid;
  grid-template-areas: "nav content";
  grid-template-rows: none;
  grid-template-columns: var(--sidebar-size) 1fr;
}

.main {
  grid-area: content;
  height: 100dvh;
  overflow: auto;
  background: var(--main-background);
}

.sidebar {
  background-color: var(--grey-color-6);
  box-shadow: var(--bs-06);
  color: white;
  display: flex;
  flex-direction: column;
  gap: var(--sidebar-gap);
  grid-area: nav;
  height: 100dvh;
  height: 100vh;
  overflow-y: auto;
  padding: var(--sidebar-padding);
  position: sticky;
  top: 0;
  transition: transform var(--main-transition) ease-in-out;
  width: var(--sidebar-size);
  z-index: var(--sidebar-z-index);
}

.sidebar__header {
  align-content: center;
  display: flex;
  font-size: 1rem;
  justify-content: space-between;
  position: relative;
}

.sidebar__list {
  color: var(--grey-color-2);
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  gap: 1.5rem;

  & > li {
    position: relative;
  }
}

.sidebar__link {
  color: white;
  display: grid;
  width: fit-content;

  & > a {
    color: white;
  }
}

.sidebar__link:hover {
  text-decoration: underline;
}

.sidebar__sublist {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 1rem;
}

.sidebar__footer {
  align-items: center;
  color: var(--grey-color-2);
  display: flex;
  font-size: 1rem;
  justify-content: space-between;
  margin-top: auto;
}

.sidebar__user {
  color: var(--grey-color-3);
  font-size: 1rem;
}

#id_sidebar_toggle {
  display: none;
}
#id_sidebar_toggle:checked + .sidebar {
  transform: translateX(0);
}

#id_sidebar_toggle:checked ~ .navbar .bar1 {
  transform: translate(0, 7px) rotate(-45deg);
}
#id_sidebar_toggle:checked ~ .navbar .bar2 {
  opacity: 0;
}
#id_sidebar_toggle:checked ~ .navbar .bar3 {
  transform: translate(0, -7px) rotate(45deg);
}

.navbar {
  align-items: center;
  background-color: var(--grey-color-7);
  bottom: 0;
  box-shadow: var(--bs-12);
  display: flex;
  grid-area: footer;
  justify-content: space-between;
  max-height: var(--sidebar-size);
  padding: var(--footer-padding);
  position: sticky;
  z-index: var(--footer-z-index);
}

.navbar__option {
  touch-action: manipulation;
  display: flex;
  flex-direction: column;
  fill: var(--grey-color-1);
  stroke: var(--grey-color-1);
  height: 50px;
  justify-content: space-between;
  padding: 0.1rem;
  width: 50px;
}

.navbar__hamburguer {
  margin: auto;
}

.navbar svg {
  padding: 0.2rem;
}

.navbar__text {
  font-size: 0.8rem;
  text-align: center;
  width: 100%;
  color: var(--grey-color-4);
}

.navbar .bar1,
.bar2,
.bar3 {
  width: 25px;
  height: 2px;
  background-color: var(--grey-color-1);
  margin: 5px 0;
  transition: 0.4s;
  border-radius: 1rem;
}

.collapsible {
}

.collapsible label {
  cursor: pointer;
}

.collapsible label::after {
  position: absolute;
  content: "\276F";
  width: 1em;
  height: 1em;
  text-align: center;
  transform: rotate(90deg);
  transition: all 0.35s;
  right: 0rem;
  top: 0;
}

.collapsible input:checked + .collapsible__label::after {
  transform: rotate(270deg);
  right: 0.45rem;
}

.collapsible__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.35s;
  padding-left: 1rem;
}
.collapsible input:checked ~ .collapsible__content {
  max-height: 10rem;
  padding-top: 1rem;
}

.grid-columns {
  display: grid;
  justify-items: center;
  grid-auto-flow: column;
  width: 100%;
  overflow-x: auto;
  gap: 1rem;
  min-height: 0;
  height: 100%;
}

.nav-horizontal {
  display: flex;
  overflow-x: auto;
  height: calc(var(--input-height));
  align-items: center;
  white-space: nowrap;
  width: 100%;
  gap: .5rem;
  margin: auto;
  padding: 0rem .5rem;

  & > a {
    background-color: var(--grey-color-5);
    color: white;
    text-decoration: none;
    font-size: .9rem;
    padding: 0.5rem 1rem;
    transition: all var(--main-transition);
    border-radius: var(--border-radius);

    &:hover {
      box-shadow: var(--bs-02);
    }
  }

  & > a.active {
    background-color: var(--grey-color-7);
  }
}


@media (min-width: 769px) {
  .navbar {
    display: none;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .body {
    grid-template-areas:
      "content"
      "footer";
    grid-template-rows: 1fr 50px;
    grid-template-columns: none;
  }

  .main {
    height: 100vh;
    height: 100dvh;
    max-height: calc(100vh - 50px);
    max-height: calc(100dvh - 50px);
    overflow: auto;
  }

  .sidebar {
    height: calc(-webkit-fill-available; - var(--navbar-size));
    height: calc(100vh - var(--navbar-size));
    height: calc(100dvh - var(--navbar-size));
    position: fixed;
    width: 100%;
    transform: translateX(-110%);
  }
}

.login {
  display:flex;
  flex-direction: column;
  padding-top: 3rem;
  gap: 2rem;
  align-items: center;
  width: 100%;
  height: 100dvh;
}