.LMleftmenubar {
  width: 15%;
  min-width: 200px;
  height: 100%;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(0deg, #A08978 30%, #6F4F37 100%);
}


.LMlogo {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Hide desktop logo by default, show only on desktop */
.LMdesktopLogo {
    display: none;
}

/* Hide mobile top bar by default, show only on mobile/tablet */
.LMmobileTopBar {
    display: none;
}
.LMuseravatar {
  width: 72%;
  max-width: 140px;
  border-radius: 50%;
  border: 1px solid #000;
  display: block;
  margin: 0 auto 12px;
}

.LMusername {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  text-align: center;
  display: block;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.LMleftmenubar button {
    width: 100%;
    height: 48px;
    background-color: transparent;
    color: white;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
    padding: 0 14px;
    margin: 6px 0;
    cursor: pointer;
    font-weight: 700;
}

/* Ensure all specific button classes inherit the same width and height */
.LMdashboardBtn,
.LMsalesBtn,
.LMprofileBtn,
.LMordersBtn,
.LMpaymentsBtn {
    width: 100%;
    height: 48px;
}

.LMdashboardBtn img,
.LMsalesBtn img,
.LMprofileBtn img,
.LMordersBtn img,
.LMpaymentsBtn img {
    width: 25px;
    height: 25px;
}

/* Hover effects for admin buttons - matching EMP layout */
.LMleftmenubar button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* Active state for admin buttons */
.LMleftmenubar button.active {
    background: #fff;
    color: #6F4F37;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}



.LMsettingsbtn{
    width: 100%;
    border: none;
    border-radius: 100%;
    background-color: #603B39;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.LMsettingsbtn img {
    width: 25px;
    height: 25px;
}

/* Tablet (≤1024px): implement dropdown menu system */
@media (max-width: 1024px) {
  .LMleftmenubar {
    width: 100%;
    height: 60px;
    padding: 0;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  }

  /* Hide desktop logo on tablet and mobile */
  .LMdesktopLogo {
    display: none !important;
  }

  /* Show mobile top bar on tablet */
  .LMmobileTopBar {
    display: flex !important;
    width: 100%;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    background: linear-gradient(0deg, #6F4F37 30%, #A08978 100%);
  }

  .LMlogo {
    width: 50px;
    height: 50px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .LMlogo img {
    margin: 0;
  }

  .LMleftmenubar .LMlogo img {
    width: 50px;
    height: 50px;
  }

  /* Show hamburger on tablet */
  .LMhamburger {
    display: flex !important;
    width: 35px;
    height: 30px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
  }

  .LMhamburger span {
    height: 4px;
    width: 100%;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Hamburger animation when menu is open */
  .LMhamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .LMhamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .LMhamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
  }

  .LMusername {
    display: none; /* Hide text on tablet to save space */
  }

  /* Dropdown menu for tablet - hide by default, show when active */
  .LMleftmenubarbox {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease;
    
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: #6F4F37;
    display: none; /* Hide by default */
    flex-direction: column;
    align-items: flex-start;
    padding: 0 10px;
    gap: 15px;
    border-radius: 0;
    z-index: 9999;
  }
  
  .LMleftmenubarbox.active {
    max-height: 600px !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    padding: 10px !important;
    display: flex !important;
  }

  .LMleftmenubarbox a {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .LMleftmenubarbox button {
    width: 100% !important;
    height: 45px !important;
    justify-content: flex-start;
    padding-left: 15px;
    gap: 5px;
    margin: 2px 0 !important;
    box-sizing: border-box !important;
  }

  .LMleftmenubarbox p {
    display: inline;
  }

  /* Tablet dropdown styles */
  .LMcustomersDropdown {
    position: static;
  }

  .LMdropdownMenu {
    position: static;
    margin-top: 0;
    box-shadow: none;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 5px 0;
  }

  .LMdropdownItem {
    margin: 2px 0;
    border-radius: 6px;
  }

  .LMbottommenubuttonscont {
    position: static;
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
  }

  /* Add body margin to account for fixed header */
  body {
    margin-top: 60px;
  }
}

/* Hide mobile elements on larger screens (desktop only) */
@media (min-width: 1025px) {
  .LMmobileTopBar {
    display: none;
  }

  .LMhamburger {
    display: none;
  }
}

/* Show desktop logo on larger screens (desktop only) */
@media (min-width: 1025px) {
  .LMdesktopLogo {
    display: flex;
  }
}

/* Mobile (≤768px): collapse into top bar with hamburger */
@media (max-width: 768px) {
    /* Hide desktop logo on mobile */
    .LMdesktopLogo {
      display: none !important;
    }

    .LMleftmenubar {
      background: linear-gradient(0deg, #6F4F37 30%, #A08978 100%);
      width: 100%;
      height: 60px;
      position: fixed;
      top: 0;
      left: 0;
      z-index: 1000;
      display: flex;
      flex-direction: column;
      padding: 0;
      border-radius: 0;
      box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }

    .LMmobileTopBar {
      width: 100%;
      height: 60px;
      display: flex !important;
      align-items: center;
      justify-content: space-between;
      padding: 0 15px;
      background: linear-gradient(0deg, #6F4F37 30%, #A08978 100%);
    }
  
    .LMlogo {
      margin: 0;
      width: 40px;
      height: 40px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
    }
  
    .LMlogo img {
      width: 40px;
      height: 40px;
    }
  
    /* hamburger button */
    .LMhamburger {
      width: 35px;
      height: 30px;
      cursor: pointer;
      display: flex !important;
      flex-direction: column;
      justify-content: space-between;
      transition: all 0.3s ease;
    }
  
    .LMhamburger span {
      height: 4px;
      width: 100%;
      background: white;
      border-radius: 2px;
      transition: all 0.3s ease;
    }

    /* Hamburger animation when menu is open */
    .LMhamburger.active span:nth-child(1) {
      transform: rotate(45deg) translate(8px, 8px);
    }

    .LMhamburger.active span:nth-child(2) {
      opacity: 0;
    }

    .LMhamburger.active span:nth-child(3) {
      transform: rotate(-45deg) translate(8px, -8px);
    }
  
    /* move menu items into dropdown */
    .LMleftmenubarbox {
        max-height: 0;                /* collapsed by default */
        overflow: hidden;             /* hide content when collapsed */
        opacity: 0;
        transform: translateY(-10px); /* small slide up */
        transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease;
      
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: #6F4F37;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0 10px;              /* start collapsed with no vertical padding */
        gap: 15px;
        border-radius: 0;
        z-index: 9999;
      }
      
      .LMleftmenubarbox.active {
        max-height: 600px !important;            /* expand enough for all items */
        opacity: 1 !important;
        transform: translateY(0) !important;
        padding: 10px !important;                /* restore padding when expanded */
        display: flex !important;
      }

      .LMleftmenubarbox a{
        width: 100%;
        display: flex;
        justify-content: center;
      }
  
    .LMleftmenubarbox button {
      width: 100% !important;
      height: 45px !important;
      justify-content: flex-start;
      padding-left: 15px;
      gap: 5px;
      margin: 2px 0 !important;
      box-sizing: border-box !important;
    }
  
    .LMleftmenubarbox p {
      display: inline;
    }


    /* Mobile dropdown styles */
    .LMcustomersDropdown {
      position: static;
    }

    .LMdropdownMenu {
      position: static;
      margin-top: 0;
      box-shadow: none;
      border: none;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      margin: 5px 0;
    }

    .LMdropdownItem {
      margin: 2px 0;
      border-radius: 6px;
    }
  
    /* right side buttons */
    .LMbottommenubuttonscont {
      position: static;            /* inline inside top bar */
      margin-left: auto;           /* push to far right */
      display: flex;
      gap: 10px;
      align-items: center;
    }

    .LMuseravatar {
  
      margin: 0 auto;
    }



    /* Add body margin to account for fixed header */
    body {
      margin-top: 60px;
    }
  }

/* Logout button styling to match EMP layout */
.LMlogoutBtn {
    width: 100%;
    height: 48px;
    border-radius: 28px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-top: 8px;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
}

.LMlogoutBtn:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.5);
    color: #ff6b6b;
    transform: translateY(-1px);
}

/* Make the logout icon white */
.LMlogoutBtn img {
  filter: brightness(0) invert(1);
}

/* Orders button - updated to match EMP layout */
.LMordersBtn {
  width: 100%;
  height: 48px;
  background-color: transparent;
  color: white;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  margin: 6px 0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 700;
}

.LMordersBtn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Payments button - updated to match EMP layout */
.LMpaymentsBtn {
  width: 100%;
  height: 48px;
  background-color: transparent;
  color: white;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  margin: 6px 0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 700;
}

.LMpaymentsBtn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Customers Dropdown Styles */
.LMcustomersDropdown {
  position: relative;
  width: 100%;
}

.LMcustomersDropdown .LMprofileBtn {
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

.LMcustomersDropdown .LMprofileBtn p {
  margin: 0;
}

.LMcustomersDropdown .LMprofileBtn img {
  margin: 0;
}

.LMdropdownArrow {
  position: absolute;
  right: 15px;
  font-size: 12px;
  transition: transform 0.3s ease;
  color: white;
}

.LMdropdownMenu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #6F4F37;
  border-radius: 12px;
  margin-top: 5px;
  padding: 8px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.LMdropdownItem {
  width: 100%;
  height: 40px;
  background-color: transparent;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 0 15px;
  margin: 2px 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
}

.LMdropdownItem:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.LMdropdownItem.active {
  background: rgba(255, 184, 77, 0.2);
  border: 1px solid rgba(255, 184, 77, 0.3);
}

.LMdropdownItem img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.LMdropdownItem p {
  margin: 0;
  font-size: 14px;
}