/* ==========================================================================
   layout/header.css — Global layout: header, sidebar, footer.
   Imported on every authenticated page (via helpers/header.php).
   ========================================================================== */

/* --- Dark overlay (closes the mobile menu) -------------------------------- */
#dark {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  background-color: rgba(0, 0, 0, 0);
  transition: all 0.3s ease-in-out;
}

/* --- Top header ----------------------------------------------------------- */
header {
  display: flex;
  width: 100%;
  height: 80px;
  top: 0;
  right: 0;
  margin: 0;
  background-color: #c5c5c5;

  nav {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 20px;
  }

  div {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
  }

  #username {
    margin: 0 10px;
    text-align: end;
    text-decoration: none;
    color: #464646;
    font-weight: bold;
  }

  #page-name {
    margin: 0 10px;
    color: #464646;
    font-size: 1.5em;
    font-weight: bold;
    white-space: nowrap;
  }

  #navicon {
    display: none;
    width: 50px;
    height: 50px;
  }
}

#account {
  font-size: larger;
}

/* --- Header / sidebar corner joint ---------------------------------------- */
.corner-back {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 175px;
  height: 80px;
  background-color: #c5c5c5;
}

/* --- Sidebar (menu) ------------------------------------------------------- */
#side-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: 175px;
  height: 100vh;
  margin: 0;
  padding: 0;
  padding-top: 90px;
  background-color: #33334c;
  transition: all 0.3s ease-in-out;

  .corner {
    position: absolute;
    top: 0;
    width: 175px;
    height: 80px;
    background-color: #212147;
  }

  a {
    display: block;
    padding: 20px 43.75px;
    color: #fff;
    text-decoration: none;
  }

  li {
    list-style: none;
  }

  li:last-child {
    margin-top: auto;
    margin-bottom: 110px;
    height: auto;
  }

  #settings-menu {
    font-size: 2em;
  }
}

/* --- Footer --------------------------------------------------------------- */
footer {
  margin-top: auto;
  box-sizing: border-box;
  width: 100%;
  padding: 5px 10px;
  background-color: #d4d4d4;
  z-index: 10;
}

/* --- Responsive ----------------------------------------------------------- */
@media all and (max-width: 767px) {
  #side-menu {
    left: -175px;
  }

  #navicon {
    display: block !important;
  }
}
