:root {
  --sw-bg-color: #EEF0F4;
  --sw-main-color: #5B5B5B;
  --sw-dark-color: #272727;
  --sw-light-color: #66B3FF;

  --sw-body-color: rgb(240, 240, 240);
  --sw-nav-height: 40px;
  --sw-sidebar-width: 200px;
  --sw-sidebar-sm-width: 45px;
  --sw-footer-height: 35px;
  --sw-frame-bg-color: var(--sw-main-color);
  --sw-frame-color: #FFF;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

body {
  background-color: var(--sw-bg-color);
}

body>.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.breadcrumb-item+.breadcrumb-item:before  {
  color: var(--sw-frame-color);
}

/**************************** header ****************************/
#sweb-header {
  position: fixed;
  top: 0;
  left: 0;
  height: var(--sw-nav-height);
  width: 100%;
  z-index: 1000;

  background-color: var(--sw-frame-bg-color);
  color: var(--sw-frame-color);
}

#sweb-header a {
  color: var(--sw-frame-color);
  text-decoration: none;
}

.sidebar-width {
  width: var(--sw-sidebar-width);
}

/**************************** sidebar ****************************/
#sweb-sidebar {
  position: fixed;
  top: var(--sw-nav-height);
  bottom: 0;
  width: var(--sw-sidebar-width);
  z-index: 900;
  background-color: var(--sw-frame-bg-color);
  overflow-y: auto;
  scrollbar-width: none;
  transition: transform 0.3s ease;
}

.menu-item {
  position: relative;
  background-color: var(--sw-frame-bg-color);
  align-items: center;
  width: 100%;
}

.menu-item>a {
  display: block;
  padding: 10px;
  width: 100%;
  text-decoration: none;
  color: var(--sw-frame-color);
}

.menu-item>a:hover {
  color: var(--sw-light-color);
}

.menu-item>a .menu-icon {
  margin-right: 8px;
  min-width: 20px;
  text-align: center;
}

.menu-item.active>a {
  color: var(--sw-light-color);
}

.menu-item .submenu {
  background: var(--sw-dark-color);
}

.menu-item .submenu a {
  display: none;
  padding: 5px 10px 5px 20px;
  color: #fff;
  text-decoration: none;
}

.menu-item.active .submenu a {
  display: block;
}

.menu-item .submenu a:hover {
  color: var(--sw-light-color);
}

.menu-item .submenu-tip {
  position: fixed;
  display: none;
  left: var(--sw-sidebar-width);
  top: var(--submenu-top, 0);
  min-width: 150px;
  background-color: #F9F9F9;

  white-space: nowrap;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}

.menu-item .submenu-tip.show {
  display: block;
}

.menu-item .submenu-tip a {
  display: block;
  padding: 8px 20px;
  color: black;
  text-decoration: none;
}

.menu-item .submenu-tip a:hover {
  background-color: #e9e9e9;
}

#sweb-sidebar .divider {
  border-top: 1px solid var(--sw-frame-color);
  margin: 8px 0;
}

#sweb-sidebar .agent_meta {
  /* position: absolute; */
  /* bottom:0; */
  width:100%;
  padding:10px;
  font-size: 0.75rem;
  background-color: rgba(0, 0, 0, 0.5);
}

/**************************** container ****************************/
#sweb-container {
  margin-top: var(--sw-nav-height);
  margin-bottom: var(--sw-footer-height);
  padding: 0.75rem;
  flex: 1;
  position: relative;
}

#sweb-container.has-sidebar {
  margin-left: var(--sw-sidebar-width);
  transition: margin-left 0.3s ease;
}


/**************************** footer ****************************/
#sweb-footer {
  position: relative;
  height: var(--sw-footer-height);
  width: 100%;
  margin-top: auto;
}

#sweb-footer.has-sidebar {
  padding-left: var(--sw-sidebar-width);
  transition: padding-left 0.3s ease;
}

/**************************** others ****************************/

/* 側邊欄折疊狀態 */
.sidebar-collapsed #sweb-sidebar {
  transform: translateX(-100%);
}

.sidebar-collapsed #sweb-container.has-sidebar {
  margin-left: 0;
}

.sidebar-collapsed #sweb-footer.has-sidebar {
  padding-left: 0;
}

@media (max-width: 768px) {
  #sweb-container.has-sidebar {
    margin-left: var(--sw-sidebar-sm-width);
  }

  #sweb-sidebar {
    width: var(--sw-sidebar-sm-width);
  }

  .menu-item>a {
    text-align: center;
  }

  .menu-item>a .menu-icon {
    margin-right: 0;
  }

  .menu-item span {
    display: none;
  }

  .menu-item.active .submenu a {
    display: none;
  }

  .menu-item .submenu-tip {
    left: var(--sw-sidebar-sm-width);
  }

  #sweb-footer.has-sidebar {
    padding-left: var(--sw-sidebar-sm-width);
  }

  #sweb-sidebar .agent_meta {
    display: none;
  }

  /* 手機版側邊欄折疊 */
  .sidebar-collapsed #sweb-sidebar {
    transform: translateX(calc(-1 * var(--sw-sidebar-sm-width)));
  }

  /* 手機版隱藏 breadcrumb */
  .breadcrumb {
    display: none !important;
  }
}
