/* 布局样式切换选项 */
.menustyle-options {
  margin-top: 8px;
}
.menustyle-options .menustyle-option {
  display: block;
  font-weight: normal;
  margin: 0 0 8px 0;
  cursor: pointer;
}
.menustyle-options .menustyle-option input {
  margin-right: 6px;
  vertical-align: middle;
}

/* ========== 图片样式布局 ========== */
body.menustyle-picture {
  overflow-x: hidden;
}

/* 选项卡行：左侧已打开标签按钮 + 页签 */
body.menustyle-picture #secondnav.picture-secondnav,
body.menustyle-picture #secondnav {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  position: fixed !important;
  left: 0 !important;
  right: 0;
  top: 40px;
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 6px 0 0;
  background: #f5f6f8;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: none;
  box-sizing: border-box;
  overflow: visible;
  z-index: 1001;
}
body.menustyle-picture #secondnav .picture-tab-list-wrap {
  position: relative;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 32px;
  flex: 0 0 32px;
  width: 32px;
  height: 36px;
  z-index: 1100;
}
body.menustyle-picture #secondnav .picture-tab-toggle {
  display: block;
  width: 32px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  color: #666;
  background: transparent;
  border: none;
  border-right: 1px solid #e5e5e5;
  text-decoration: none;
  cursor: pointer;
  float: none;
}
body.menustyle-picture #secondnav .picture-tab-toggle:hover,
body.menustyle-picture #secondnav .picture-tab-list-wrap.open .picture-tab-toggle {
  color: #333;
  background: #ebebeb;
}
body.menustyle-picture #secondnav .picture-tab-toggle .fa {
  font-size: 12px;
}
body.menustyle-picture #secondnav .picture-opened-tabs {
  display: none;
  position: absolute;
  left: 0;
  top: 36px;
  min-width: 160px;
  max-width: 260px;
  max-height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 2px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #cfcfcf;
  border-top: none;
  box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.12);
  z-index: 1200;
}
body.menustyle-picture #secondnav .picture-tab-list-wrap.open .picture-opened-tabs {
  display: block;
}
body.menustyle-picture #secondnav .picture-opened-tabs > li {
  margin: 0;
  padding: 0;
  border: none;
}
body.menustyle-picture #secondnav .picture-opened-tabs > li > a {
  display: block;
  padding: 5px 12px 5px 16px;
  color: #333;
  font-size: 12px;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: none;
  background: transparent;
}
body.menustyle-picture #secondnav .picture-opened-tabs > li > a:hover {
  background: #e8f4fc;
  color: #333;
}
body.menustyle-picture #secondnav .picture-opened-tabs > li.active > a {
  background: #d9eef9;
  color: #1a6fb5;
  font-weight: 600;
}
body.menustyle-picture #secondnav .picture-opened-tabs > li.empty > span {
  display: block;
  padding: 8px 12px;
  color: #999;
  font-size: 12px;
}
body.menustyle-picture #secondnav .nav-addtabs {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  display: block;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 3px 0 0 4px;
  left: 0 !important;
  top: auto !important;
  position: relative !important;
  height: 100%;
  overflow: hidden;
  white-space: nowrap;
}
body.menustyle-picture #secondnav .nav-addtabs > li {
  display: inline-block;
  float: none;
  vertical-align: top;
  position: relative;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0 20px 0 12px;
  height: 28px;
  line-height: 28px;
  margin: 0 4px 0 0;
  background: #fff;
}
body.menustyle-picture #secondnav .nav-addtabs > li > a {
  display: block;
  height: 28px !important;
  line-height: 26px !important;
  padding: 0 !important;
  font-size: 12px;
  color: #495060 !important;
  background: none !important;
  border: none !important;
}
body.menustyle-picture #secondnav .nav-addtabs > li .close-tab {
  right: 2px;
}
body.menustyle-picture #secondnav .nav-addtabs > li.active {
  border-color: #3c8dbc;
  background-color: #fff;
}
body.menustyle-picture #secondnav .nav-addtabs > li.active > a {
  color: #3c8dbc !important;
}
/* 图片样式顶栏不再预留汉堡按钮位置 */
body.menustyle-picture #firstnav {
  padding-left: 0;
}
body.menustyle-picture #firstnav .navbar-custom-menu {
  left: auto;
}
body.menustyle-picture .content-wrapper,
body.menustyle-picture .right-side {
  padding-top: 76px;
}
/* 顶栏整行底色 + 高度缩小；功能列表与右侧区分色 */
body.menustyle-picture .main-header {
  max-height: 40px;
  background: #3c8dbc !important;
  box-shadow: none;
  border: none !important;
}
body.menustyle-picture .main-header .logo,
body.menustyle-picture .main-header .logo:hover,
body.menustyle-picture .main-header .logo:focus,
body.menustyle-picture .main-header .logo:active,
body.menustyle-picture.picture-menu-open .main-header .logo {
  background: #367fa9 !important;
  color: #fff !important;
  width: 180px;
  height: 40px !important;
  line-height: 40px !important;
  text-align: center;
  padding: 0 8px;
  font-size: 13px;
  cursor: pointer;
  border: none !important;
  border-right: none !important;
  box-shadow: none !important;
  outline: none;
}
body.menustyle-picture .main-header .navbar {
  margin-left: 180px;
  min-height: 40px !important;
  height: 40px;
  background: #3c8dbc !important;
  border: none !important;
  box-shadow: none !important;
}
body.menustyle-picture .main-header #firstnav {
  height: 40px;
  border: none !important;
  border-bottom: none !important;
}
/* 去掉功能列表右侧分隔黑线 */
body.menustyle-picture.skin-black-blue .main-header .logo,
body.menustyle-picture .main-header .logo {
  border-right-color: transparent !important;
  border-right-width: 0 !important;
}
body.menustyle-picture .main-header .navbar .org-current-name {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.dept-select-box {
  padding: 12px 16px 0;
  height: 100%;
  box-sizing: border-box;
}
.dept-select-search {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.dept-select-search .form-control {
  flex: 1;
}
.dept-select-list {
  height: 430px;
  overflow: auto;
  border: 1px solid #e5e5e5;
  background: #fff;
}
.dept-select-item {
  display: block;
  margin: 0;
  padding: 8px 12px;
  font-weight: normal;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.dept-select-item:hover {
  background: #f5f9fc;
}
.dept-select-item input {
  margin-right: 8px;
  vertical-align: middle;
}
.dept-select-item span {
  vertical-align: middle;
}
.dept-select-empty {
  padding: 24px;
  text-align: center;
  color: #999;
}
/* 图一默认：标题/搜索跟系统弹窗深色一致 */
.layui-layer-dept-select .layui-layer-title {
  background: #2c3e50 !important;
  color: #fff !important;
}
.dept-select-search .dept-select-search-btn,
.dept-select-search .btn-primary {
  background-color: #2c3e50 !important;
  border-color: #2c3e50 !important;
  color: #fff !important;
}
.dept-select-search .dept-select-search-btn:hover,
.dept-select-search .dept-select-search-btn:focus,
.dept-select-search .btn-primary:hover,
.dept-select-search .btn-primary:focus {
  background-color: #1a252f !important;
  border-color: #1a252f !important;
  color: #fff !important;
}
.selectdept-head {
  background: #2c3e50 !important;
}
/* 第二种图片布局：红框内标题、搜索跟顶栏蓝一致 */
body.menustyle-picture .layui-layer-dept-select .layui-layer-title {
  background: #3c8dbc !important;
}
body.menustyle-picture .layui-layer-dept-select .layui-layer-btn .layui-layer-btn0 {
  background-color: #3c8dbc !important;
  border-color: #3c8dbc !important;
}
body.menustyle-picture .layui-layer-dept-select .layui-layer-btn .layui-layer-btn0:hover {
  background-color: #367fa9 !important;
  border-color: #367fa9 !important;
}
body.menustyle-picture .dept-select-search .dept-select-search-btn,
body.menustyle-picture .dept-select-search .btn-primary {
  background-color: #3c8dbc !important;
  border-color: #3c8dbc !important;
}
body.menustyle-picture .dept-select-search .dept-select-search-btn:hover,
body.menustyle-picture .dept-select-search .dept-select-search-btn:focus,
body.menustyle-picture .dept-select-search .btn-primary:hover,
body.menustyle-picture .dept-select-search .btn-primary:focus {
  background-color: #367fa9 !important;
  border-color: #367fa9 !important;
}
body.menustyle-picture .main-header .navbar .nav > li > a,
body.menustyle-picture .main-header .navbar-custom-menu .navbar-nav > li > a {
  color: #fff !important;
  height: 40px;
  line-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  background: transparent !important;
}
body.menustyle-picture .main-header .navbar .nav > li > a:hover,
body.menustyle-picture .main-header .navbar .nav > li > a:focus,
body.menustyle-picture .main-header .navbar .nav .open > a {
  background: rgba(0, 0, 0, 0.12) !important;
  color: #fff !important;
}
body.menustyle-picture .main-header .navbar .nav > li > a > .user-image {
  float: left;
  width: 24px;
  height: 24px;
  margin-top: 8px !important;
  margin-right: 8px;
}
body.menustyle-picture.sidebar-mini.sidebar-collapse .main-header .logo {
  width: 180px;
}
body.menustyle-picture.sidebar-mini.sidebar-collapse .main-header .navbar {
  margin-left: 180px;
}
body.menustyle-picture .main-header .logo .logo-lg {
  display: block;
  line-height: 40px;
}
body.menustyle-picture .main-header .logo .logo-mini {
  display: none;
}
body.menustyle-picture .main-header .logo .fa-th-large {
  margin-right: 4px;
}
body.menustyle-picture .main-header .logo .fa-caret-down {
  margin-left: 4px;
  font-size: 12px;
}

/* 功能列表侧栏：贴顶栏下方，宽度与上方功能列表对齐 */
body.menustyle-picture .main-sidebar,
body.menustyle-picture.fixed .main-sidebar {
  width: 180px !important;
  left: -180px;
  top: 40px !important;
  bottom: 0;
  height: auto !important;
  padding-top: 0 !important;
  z-index: 1040;
  background: #2f3b47 !important;
  -webkit-transition: left 0.18s ease;
  transition: left 0.18s ease;
  box-shadow: none;
  border: none;
}
body.menustyle-picture .content-wrapper,
body.menustyle-picture .main-footer {
  margin-left: 0 !important;
}
body.menustyle-picture.sidebar-mini.sidebar-collapse .content-wrapper,
body.menustyle-picture.sidebar-mini.sidebar-collapse .main-footer {
  margin-left: 0 !important;
}

/* 点击功能列表后展开侧栏 */
body.menustyle-picture.picture-menu-open .main-sidebar {
  left: 0;
}
body.menustyle-picture .picture-menu-backdrop {
  display: none;
  position: fixed;
  left: 0;
  top: 40px;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.12);
  z-index: 1035;
}
body.menustyle-picture.picture-menu-open .picture-menu-backdrop {
  display: block;
}

/* 侧栏一级菜单：贴顶，选中项与白面板连成一体 */
body.menustyle-picture .main-sidebar .sidebar {
  padding-top: 0 !important;
  margin-top: 0 !important;
  background: transparent !important;
}
body.menustyle-picture .sidebar-menu.menustyle-picture {
  margin: 0;
  padding: 0;
  background: transparent;
}
body.menustyle-picture .sidebar-menu.menustyle-picture > li {
  margin: 0;
  border: none;
}
body.menustyle-picture .sidebar-menu.menustyle-picture > li > a {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 10px 8px;
  line-height: 20px;
  font-size: 14px;
  color: #fff;
  border: none;
  border-left: 0;
  border-radius: 0;
  text-align: left;
  position: relative;
}
body.menustyle-picture .sidebar-menu.menustyle-picture > li > a > .fa {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 16px;
  flex: 0 0 16px;
  width: 16px;
  margin-right: 4px;
  text-align: center;
  color: #cfd6dc;
}
body.menustyle-picture .sidebar-menu.menustyle-picture > li > a > span {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 6.5em;
  flex: 0 0 6.5em;
  width: 6.5em;
  text-align: left;
  vertical-align: middle;
}
/* 隐藏 hot/new 等角标 */
body.menustyle-picture .sidebar-menu.menustyle-picture > li > a > .pull-right-container {
  display: none !important;
}
/* 不记忆选中态：仅悬浮/展开时高亮，并与右侧白面板衔接 */
body.menustyle-picture .sidebar-menu.menustyle-picture > li.active > a {
  background: transparent;
  color: #fff;
}
body.menustyle-picture .sidebar-menu.menustyle-picture > li.active > a > .fa {
  color: #cfd6dc;
}
body.menustyle-picture .sidebar-menu.menustyle-picture > li.hover > a,
body.menustyle-picture .sidebar-menu.menustyle-picture > li.open > a {
  background: #fff !important;
  color: #333 !important;
  border: none;
}
body.menustyle-picture .sidebar-menu.menustyle-picture > li.hover > a > .fa,
body.menustyle-picture .sidebar-menu.menustyle-picture > li.open > a > .fa {
  color: #555 !important;
}
body.menustyle-picture .sidebar-menu.menustyle-picture > li.hover > a > .pull-right-container > .label,
body.menustyle-picture .sidebar-menu.menustyle-picture > li.open > a > .pull-right-container > .label {
  color: #fff;
}

/* 右侧子菜单容器：全高灰色热区，避免移出侧栏即关闭 */
body.menustyle-picture .megamenu-container {
  position: fixed;
  left: 180px;
  top: 40px;
  bottom: 0;
  width: 960px;
  max-width: calc(100vw - 180px);
  height: auto;
  z-index: 1041;
  pointer-events: none;
  display: none;
  background: #ececec;
  border-right: 1px solid #d0d0d0;
  box-sizing: border-box;
}
body.menustyle-picture.picture-menu-open .megamenu-container {
  display: block;
  pointer-events: auto;
}
body.menustyle-picture .megamenu-panel {
  display: none;
  pointer-events: auto;
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  overflow: auto;
  background: #fff;
  border: none;
  box-shadow: none;
  margin: 0;
}
body.menustyle-picture .megamenu-panel.active {
  display: block;
}
body.menustyle-picture .megamenu-row {
  display: table;
  table-layout: fixed;
  width: 100%;
  border-bottom: 1px solid #e8e8e8;
  min-height: 42px;
  background: #fff;
}
body.menustyle-picture .megamenu-row:last-child {
  border-bottom: 1px solid #e8e8e8;
}
body.menustyle-picture .megamenu-group-title {
  display: table-cell;
  width: 168px;
  vertical-align: middle;
  padding: 10px 8px 10px 16px;
  color: #222;
  font-size: 13px;
  font-weight: 600;
  border-right: 1px solid #e8e8e8;
  white-space: nowrap;
  background: #fff;
  -webkit-transition: color 0.15s ease;
  transition: color 0.15s ease;
}
body.menustyle-picture .megamenu-group-title span {
  display: inline-block;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  color: inherit;
}
body.menustyle-picture .megamenu-group-title .fa {
  margin-left: 8px;
  color: #666;
  font-size: 12px;
  vertical-align: middle;
}
body.menustyle-picture .megamenu-group-links {
  display: table-cell;
  vertical-align: middle;
  padding: 6px 8px 6px 4px;
  background: #fff;
}
body.menustyle-picture .megamenu-group-links .megamenu-link {
  display: inline-block;
  padding: 4px 14px;
  margin: 2px 0;
  color: #333;
  font-size: 13px;
  line-height: 20px;
  text-decoration: none !important;
  white-space: nowrap;
  border-right: 1px solid #d9d9d9;
  background: transparent;
  -webkit-transition: color 0.15s ease;
  transition: color 0.15s ease;
}
body.menustyle-picture .megamenu-group-links .megamenu-link:last-child {
  border-right: none;
}
body.menustyle-picture .megamenu-group-links .megamenu-link:hover,
body.menustyle-picture .megamenu-group-links .megamenu-link:focus {
  color: #2f6fed;
  text-decoration: none !important;
  background: transparent;
}
/* 悬浮右侧链接时，左侧二级标题同步变色 */
body.menustyle-picture .megamenu-row:hover .megamenu-group-title,
body.menustyle-picture .megamenu-row:hover .megamenu-group-title span {
  color: #2f6fed;
  background: #fff;
}
body.menustyle-picture .megamenu-row:hover .megamenu-group-title .fa {
  color: #2f6fed;
}

/* 顶栏布局下拉当前项 */
.navbar-custom-menu .dropdown-menu > li.active > a {
  background: #f5f5f5;
  color: #3c8dbc;
  font-weight: bold;
}

@media (max-width: 767px) {
  body.menustyle-picture .main-header .logo {
    width: 100%;
  }
  body.menustyle-picture .main-header .navbar {
    margin-left: 0;
  }
  body.menustyle-picture .megamenu-container {
    left: 0;
    right: auto;
    top: 100px;
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    margin: 0 8px;
  }
  body.menustyle-picture .megamenu-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border-left: none;
  }
  body.menustyle-picture .megamenu-group-title,
  body.menustyle-picture .megamenu-group-links {
    display: block;
    width: auto;
    border-right: none;
  }
  body.menustyle-picture .megamenu-group-title {
    border-bottom: 1px solid #eee;
  }
}
