/* Desk Navbar css updated */
.page-head {
  background-color: #fff !important;
  background-image: none !important;
  border-bottom: 1px solid #ebebec;
  box-shadow: none !important;
}

.page-head .title-text {
  color: #1f272e !important;
  font-weight: 600;
}

/* Sidebar Logo Injection & Switcher */
.body-sidebar::before {
  content: "";
  display: block;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: left center;
  height: 40px;
  width: 190px;
  margin: 0 0 10px 0;
  transition: all 0.3s ease;
}


.body-sidebar .standard-items-sections {
  margin-top: 8px !important;
  border-top: 1px solid #D9D9D9 !important;
}

.body-sidebar .body-sidebar-top {
  border-top: 1px solid #D9D9D9 !important;
  margin-top: 8px !important;
  scrollbar-width: none !important;

}

/* Expanded State - Full Logo */
.body-sidebar-container.expanded .body-sidebar::before {
  background-image: url("/assets/theme/images/erp3sixty_logo.svg");
  width: 190px;
}

/* Collapsed State - Fav Icon */
.body-sidebar-container:not(.expanded) .body-sidebar::before {
  background-image: url("/assets/theme/images/erp3sixty_fav_icon.svg");
  width: 40px;
  /* Square size for fav icon */
  margin-left: -4px;
}

/* Global Sidebar Styling */
.body-sidebar {
  background-color: #fff !important;
  border-right: 1px solid #ebebec;
  transition: width 0.3s ease;
}

/* .body-sidebar,
.body-sidebar .sidebar-item-label,
.body-sidebar .sidebar-item-icon,
.body-sidebar .sidebar-item-icon svg,
.body-sidebar .item-anchor,
.body-sidebar .collapse-sidebar-link,
.body-sidebar .collapse-sidebar-link span {
  color: #02367B !important;
  fill: #02367B !important;
  font-weight: 500;
} */

/* Sidebar Item Hover State */
.body-sidebar .sidebar-item-container:hover {
  background-color: #0396C733 !important;
  border-radius: 0px;
}

/* .body-sidebar .standard-sidebar-item:hover {
  background-color: #0396C733 !important;
  border-radius: 0px;
} */

/* Remove default gray background from inner elements on hover */
.body-sidebar .sidebar-item-container:hover .item-anchor,
.body-sidebar .sidebar-item-container:hover .standard-sidebar-item {
  background-color: transparent !important;
}

/* Sidebar Active State Design */
.body-sidebar .sidebar-item-container.active-sidebar,
.body-sidebar .sidebar-item-container.active-sidebar:hover {
  background-color: #02367B !important;
  border-radius: 0px;
  margin: 2px 10px !important;
  padding: 2px 0;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(226, 176, 78, 0.2);
}

.body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-label {
  color: #fff !important;
}

.body-sidebar .standard-sidebar-item.active-sidebar .item-anchor .sidebar-item-icon .icon-sm {
  stroke: #fff !important;
  stroke-width: 3px !important;
}

/* Sidebar Search Bar Styling */
.body-sidebar .navbar-search-bar {
  background-color: #f3f4f6 !important;
  border: 1px solid transparent !important;
  border-radius: 0px !important;
  margin: 8px 0px 15px 0px !important;
  padding: 4px 0px !important;
  display: flex !important;
  align-items: center;
  cursor: text;
  transition: border-color 0.2s;
}

.body-sidebar .navbar-search-bar:hover {
  border-color: #e2e8f0 !important;
}

.body-sidebar .navbar-search-bar .sidebar-item-label {
  color: #64748b !important;
  font-size: 13px !important;
  margin-left: 10px !important;
}

/* Sidebar Header (Module Icon) */
.sidebar-header {
  margin-top: 5px;
  padding: 0 15px;
  /* margin-bottom: 15px; */
  position: relative;
}

/* Sidebar Dropdown Menu (Flyout Style) */
/* Sidebar Dropdown Menu (Flyout Style) - Fallback/Override */
/* Sidebar Dropdown Menu (Flyout Style) - Fallback/Override */
.sidebar-header .dropdown-menu {
  position: absolute !important;
  top: 0px !important;
  left: 100% !important;
  min-width: 205px;
  border: 1px solid #ebebec;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 10px;
  background-color: #fff;
  z-index: 1050;
  transform: none !important;
  margin-left: 10px !important;
  display: none;
}

.sidebar-header .dropdown-menu.show {
  display: block;
}

.sidebar-header .dropdown-menu.show {
  display: block;
}

.frappe-menu {
  /* position: fixed !important; */
  min-width: 205px;
  border: 1px solid #ebebec;
  border-radius: 0px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 10px;
  background-color: #fff;
  z-index: 1050;
  transform: none !important;
}

.body-sidebar-container.expanded .frappe-menu {
  top: 60px !important;
  left: 225px !important;
}

.body-sidebar-container:not(.expanded) .frappe-menu {
  top: 60px !important;
  left: 60px !important;
}

/* Fix for nested submenu positioning */
.sidebar-header .dropdown-menu .dropdown-menu,
.sidebar-header .dropdown-menu .frappe-menu,
.frappe-menu .frappe-menu,
.frappe-menu .dropdown-menu {
  position: absolute !important;
  top: 0 !important;
  left: 100% !important;
  margin-left: 2px !important;
}

/* Ensure sub-menus open to the right and don't overlay */
.sidebar-header .dropdown-menu .dropdown-menu-item,
.frappe-menu .dropdown-menu-item {
  position: relative;
  border-bottom: 1px solid #F5F7FA !important;
  border-radius: 0 !important;
  padding: 1px 0 !important;
}

.sidebar-header .dropdown-menu .dropdown-menu-item,
.frappe-menu .dropdown-menu-item:hover {
  background-color: #0396C733 !important;
  border-radius: 0px !important;
}

.body-sidebar .standard-sidebar-item:hover {
  background-color: #0396C733 !important;
  border-radius: 0px !important;
}

.sidebar-header:hover {
  background-color: #0396C733 !important;
  border-radius: 0px !important;
}

/* Use JS-friendly CSS fallback just in case */
.sidebar-header .dropdown-menu .dropdown-menu-item:hover>.dropdown-menu,
.sidebar-header .dropdown-menu .dropdown-menu-item:hover>.frappe-menu,
.frappe-menu .dropdown-menu-item:hover>.frappe-menu {
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 100% !important;
  margin-left: 2px !important;
  z-index: 1060;
}

.sidebar-header .dropdown-menu-item a {
  padding: 10px 15px;
  display: flex;
  align-items: center;
  color: #02367B;
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.2s;
}

.sidebar-header .dropdown-menu-item:hover a {
  background-color: #f4f5f6;
  color: #02367B;
}

.sidebar-header .sidebar-item-icon {
  margin-right: 12px;
}

.sidebar-header .menu-item-title {
  font-size: 14px;
}


.body-sidebar-container.expanded .body-sidebar .nav-item {
  border-top: 1px solid #D9D9D9 !important;
  margin-left: 0px !important;
}


.sidebar-header button {
  /* transform: rotate(270deg); */
  background: #02367b;
  border-radius: 50%;
}

.sidebar-header .icon .es-icon {
  stroke: #fff !important;
}

.active-sidebar {
  background: #02367B !important;
  box-shadow: none !important;
  border-radius: 0px !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
}

.body-sidebar .standard-sidebar-item.active {
  height: 35px !important;
}

.sidebar-item-container {
  padding: 4px 0 !important;
}



/* Reposition Original Collapse Button */
/* .collapse-sidebar-link {
  display: flex !important;
  position: absolute !important;
  bottom: 12px !important;
  right: 15px !important;
  width: 18px !important;
  height: 18px !important;
  background-color: #02367b !important;
  border-radius: 50% !important;
  align-items: center;
  justify-content: center;
  z-index: 9999 !important;
  cursor: pointer;
  /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); */
/* top: 36px; */
/* left: 210px; */
/* } */

/* .collapse-sidebar-link:hover {
  background-color: #012a61 !important;
  transform: scale(1.05);
} */

/* Ensure svg/img inside is correctly sized */
/* .collapse-sidebar-link img,
.collapse-sidebar-link svg {
  width: 8px !important;
  height: 8px !important;
  pointer-events: none;
  display: block !important;
} */

/* Ensure module button arrow is white */
.sidebar-header .btn-reset .icon use {
  /* fill: #fff !important; */
  stroke: #fff !important;
}



/* Fixed Collapsed State Position */
/* .body-sidebar-container:not(.expanded) .collapse-sidebar-link {
  top: 36px !important;
  left: 42px !important;
}
 */

.body-sidebar-container:not(.expanded) .standard-sidebar-item .sidebar-item-label {
  display: none !important;
}

.body-sidebar-container:not(.expanded) .standard-sidebar-item .sidebar-item-suffix {
  display: none !important;
}


.body-sidebar-container.expanded .body-sidebar .nav-item .nav-link {
  margin-top: 10px !important;
}

/* .collapse-sidebar-link {
  display: flex !important;
} */


.icon-sm {
  stroke: #6B7280 !important;
  stroke-width: 3px !important;
}



/* Change the primary button color */
.btn.btn-primary {
  background-color: #02367B !important;
}

.btn .btn-sm .btn-primary .btn-block .btn-login {
  background-color: #02367B !important;
}

.for-login .page-card .page-card-body .btn-login-option,
.for-forgot .page-card .page-card-body .btn-login-option,
.for-login-with-email-link .page-card .page-card-body .btn-login-option,
.for-signup .page-card .page-card-body .btn-login-option,
.for-email-login .page-card .page-card-body .btn-login-option {
  background-color: #02367B !important;
  color: #fff !important;
  color: #fff !important;
}

/* Login Screen Logo Replacement */
.page-card-head .app-logo {
  content: url("/assets/theme/images/erp3sixty_logo.svg");
  width: auto;
  height: 48px;
  max-width: 100%;
}