/* ============================================
   【UI美化 - 草木深绿主题】主框架样式
   主题色：草木深绿 #117C0D | 雅典绿 #1E3B1A
   修改内容：侧边栏、导航栏、菜单、Logo 区域配色与视觉
   ============================================ */

/* --- 根容器 --- */
.app {
  height: 100%;
  width: 100%;
}

.app-wrapper {
  position: relative;
  height: 100%;
  width: 100%;
  overflow-y: hidden;
  overflow-x: auto;
  display: flex;
}
.drawer-bg {
  background: #000;
  opacity: 0.3;
  width: 100%;
  top: 0;
  height: 100%;
  position: absolute;
  z-index: 999;
}

/* --- 主内容区 --- */
.main-container {
  height: 100%;
  background: #F1ECE0; /* 麻纸米白背景，替代原冷灰 #f3f4f7 */
  position: relative;
  flex: 1; /* 自适应填充剩余宽度 */
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* --- 侧边栏容器 --- */
.sidebar-container {
  transition: width 0.28s;
  width: 190px !important;
  height: 100%;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  background: #1E3B1A; /* 雅典绿侧边栏背景 */
  box-shadow: 2px 0 12px rgba(30, 59, 26, 0.15); /* 新增右侧阴影 */
  overflow: hidden; /* 防止内容溢出 */
}
.hideSidebar .sidebar-container {
  width: 54px !important;
  flex: 0 0 54px;
}

.sidebar-container .horizontal-collapse-transition {
  transition: 0s width ease-in-out, 0s padding-left ease-in-out,
    0s padding-right ease-in-out;
}

.sidebar-container .scrollbar-wrapper {
  overflow-x: hidden !important;
}

.sidebar-container .el-scrollbar__view {
  height: 100%;
}

.sidebar-container .el-scrollbar__bar.is-vertical {
  right: 0px;
}

.sidebar-container .el-scrollbar__bar.is-horizontal {
  display: none;
}

/* --- 顶部导航栏 --- */
.navbar {
  height: 64px;
  overflow: hidden;
  position: relative;
  background: #fff;
  box-shadow: 0 2px 8px rgba(30, 59, 26, 0.06); /* 优化阴影，替代原 rgba(0,21,41,0.08) */
  border-bottom: 1px solid #EADFCB; /* 新增底部田园绿调边框 */
}
.navbar .hamburger-container {
  line-height: 46px;
  height: 100%;
  float: left;
  padding: 0 15px;
  cursor: pointer;
  transition: background 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.navbar .hamburger-container:hover {
  background: rgba(17, 124, 13, 0.05); /* 草木深绿悬停色，替代原 rgba(0,0,0,0.025) */
}
.navbar .breadcrumb-container {
  float: left;
}
.navbar .right-menu {
  float: right;
  display: flex;
  margin-right: 34px;
  height: 100%;
  line-height: 64px;
  color: #2E3B2B; /* 深绿文字，替代原 #333333 */
  font-size: 14px;
}

.navbar .right-menu .logout {
  margin-left: 20px;
  width: 28px;
  font-size: 14px;
  color: #117C0D; /* 草木深绿，替代原 #00FA9A */
  cursor: pointer;
}

.navbar .right-menu img {
  margin-top: 20px;
  margin-left: 10px;
  width: 25px;
  height: 25px;
}
.navbar .right-menu .outLogin {
  cursor: pointer;
  transition: opacity 0.2s;
}
.navbar .right-menu .outLogin:hover {
  opacity: 0.7; /* 新增悬停效果 */
}
.navbar .right-menu:focus {
  outline: none;
}
.navbar .right-menu .right-menu-item {
  display: inline-block;
  padding: 0 8px;
  height: 100%;
  font-size: 18px;
  color: #6F7A6B; /* 灰绿文字，替代原 #5a5e66 */
  vertical-align: text-bottom;
}
.navbar .right-menu .right-menu-item.hover-effect {
  cursor: pointer;
  transition: background 0.3s;
}
.navbar .right-menu .right-menu-item.hover-effect:hover {
  background: rgba(17, 124, 13, 0.05); /* 草木深绿悬停色 */
}
.navbar .right-menu .avatar-container {
  margin-right: 30px;
}
.navbar .right-menu .avatar-container .avatar-wrapper {
  margin-top: 5px;
  position: relative;
  font-weight: 500; /* 新增字重 */
}
.navbar .right-menu .avatar-container .avatar-wrapper .user-avatar {
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.navbar .right-menu .avatar-container .avatar-wrapper .el-icon-caret-bottom {
  cursor: pointer;
  position: absolute;
  right: -20px;
  top: 25px;
  font-size: 12px;
}

/* --- 头部标题 --- */
.navbar .head-lable {
  color: #2E3B2B; /* 深绿文字，替代原 #333333 */
  height: 64px;
  font-size: 16px;
  width: 300px;
  padding-left: 22px;
  line-height: 64px;
  font-weight: 600; /* 优化字重，原 700 改为 600 */
  opacity: 0;
  float: left;
  animation: opacity 500ms ease-out 800ms forwards;
}
.navbar .head-lable .goBack {
  border-right: solid 1px #E2D8C4; /* 灰绿边框，替代原 #d8dde3 */
  padding-right: 14px;
  margin-right: 14px;
  font-size: 14px;
  color: #6F7A6B; /* 灰绿文字，替代原 #333333 */
  cursor: pointer;
  font-weight: 400;
  transition: color 0.25s;
}
.navbar .head-lable .goBack:hover {
  color: #117C0D; /* 新增草木深绿悬停色 */
}
.navbar .head-lable .goBack img {
  position: relative;
  top: 24px;
  margin-right: 5px;
  width: 18px;
  height: 18px;
  float: left;
}
@keyframes opacity {
  0% {
    opacity: 0;
    left: 80px;
  }
  100% {
    opacity: 1;
    left: 0;
  }
}

/* --- Logo 区域 --- */
.logo {
  text-align: center;
  background-color: #1E3B1A; /* 雅典绿 */
  padding: 60px 20px 50px;
  flex: 0 0 auto;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.logo span {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 20px;
  background: linear-gradient(135deg, #fff 0%, #3E9A38 100%); /* 渐变文字 */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  position: relative;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}
.logo span::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #117C0D, transparent);
  border-radius: 2px;
}

.img {
  display: inline-block;
}

.el-scrollbar {
  height: 100%;
}

.el-menu {
  border: none;
  height: 100%;
  width: 100% !important;
  background: transparent !important; /* 透明背景，继承侧边栏 */
  padding: 8px 0; /* 上下内边距 */
  box-sizing: border-box;
}

.el-submenu.is-active > .el-submenu__title {
  color: #fff !important; /* 白色激活文字，替代原 #f4f4f5 */
}

/* --- 子菜单背景 --- */
.el-submenu > .el-submenu__title,
.el-submenu .el-menu-item {
  min-width: 190px !important;
  background-color: #26201D !important; /* 深雅典绿，替代原 #272a36 */
}

/* --- 菜单项样式 --- */
.el-menu .el-menu-item {
  color: #9AA58F; /* 灰绿文字 */
  height: 48px;
  line-height: 48px;
  transition: all 0.25s ease;
}
.el-menu .el-menu-item {
  padding: 0 0 0 25px !important;
  border-radius: 0 24px 24px 0 !important;
  margin: 2px 0;
}
.el-menu .el-menu-item:hover {
  color: #ffffff !important;
  background-color: rgba(17, 124, 13, 0.15) !important;
}
.el-menu .el-menu-item:hover span {
  color: #ffffff !important;
}

.el-menu .el-menu-item:active {
  color: #ffffff !important;
  background-color: rgba(17, 124, 13, 0.25) !important;
}
.el-menu .el-menu-item:active span {
  color: #ffffff !important;
}

/* --- 激活菜单项 --- */
.el-menu .el-menu-item.is-active {
  background-color: #117C0D !important; /* 草木深绿激活色 */
  color: #ffffff !important;
  border-radius: 0 24px 24px 0 !important;
  box-shadow: 0 2px 8px rgba(17, 124, 13, 0.3);
  position: relative;
}
.el-menu .el-menu-item.is-active span {
  color: #ffffff !important;
  font-weight: 500 !important;
}

.el-menu-item i {
  color: inherit;
  font-size: 18px;
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.simple-mode.first-level .submenu-title-noDropdown {
  padding: 0 !important;
  position: relative;
}
.simple-mode.first-level .submenu-title-noDropdown .el-tooltip {
  padding: 0 !important;
}
.simple-mode.first-level .el-submenu {
  overflow: hidden;
}
.simple-mode.first-level .el-submenu > .el-submenu__title {
  padding: 0px !important;
}
.simple-mode.first-level
  .el-submenu
  > .el-submenu__title
  .el-submenu__icon-arrow {
  display: none;
}
.simple-mode.first-level .el-submenu > .el-submenu__title > span {
  visibility: hidden;
}
.el-icon-arrow-down:before {
  color: #9AA58F; /* 灰绿箭头，替代原 #fff */
}
.el-submenu__title {
  font-size: 15px !important;
  position: relative;
  z-index: 9;
  color: #9AA58F !important; /* 灰绿文字 */
  height: 48px !important;
  line-height: 48px !important;
  transition: all 0.25s ease;
}
.el-submenu__title:hover {
  color: #fff !important;
  background-color: rgba(17, 124, 13, 0.1) !important;
}
.el-submenu__title svg {
  margin-right: 5px !important;
  width: 28px !important;
  height: 28px !important;
}
.el-submenu__title i {
  margin-right: 10px;
  font-size: 18px;
  width: 20px;
  text-align: center;
}
.el-menu-item {
  position: relative;
  font-size: 14px !important;
  padding-left: 52px !important;
}
.el-menu-item::before {
  /* 保留原注释样式 */
}

/* --- 主内容区容器（iframe 父容器） --- */
.app-main {
  flex: 1; /* 占满 navbar 之外的剩余高度 */
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.c_iframe {
  width: 100%;
  height: 100%;
  border: 0;
  overflow: hidden;
}

/* Shared warm editorial theme for every management page. */
.main-container,
.app-main {
  background: #F1ECE0;
}

.navbar {
  background: #FAF6EF;
  border-bottom-color: #E2D8C4;
  box-shadow: 0 2px 8px rgba(74, 86, 58, .07);
}

.sidebar-container,
.logo {
  background: #1E3B1A;
}

.el-menu .el-menu-item,
.el-submenu > .el-submenu__title {
  color: #d5c4b8 !important;
}

.el-menu .el-menu-item:hover,
.el-submenu__title:hover {
  background-color: rgba(190, 91, 48, .18) !important;
}

.el-menu .el-menu-item.is-active {
  background: #117C0D !important;
  box-shadow: 0 3px 10px rgba(17, 124, 13, .28);
}

.navbar .head-lable,
.navbar .right-menu {
  color: #2E3B2B;
}

.hide {
  display: hide;
}

/* Navigation polish: warm contrast, predictable rhythm, and a clear active item. */
.sidebar-container {
  width: 206px !important;
  background: #1E3B1A;
  box-shadow: 4px 0 18px rgba(30, 59, 26, .18);
}

.logo {
  height: 154px;
  padding: 38px 20px 42px;
  flex: 0 0 154px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1E3B1A;
}

.logo span {
  color: #FAF6EF !important;
  background: none;
  -webkit-text-fill-color: initial;
  font-size: 21px !important;
  line-height: 1.35;
}

.el-menu {
  padding: 9px 0 14px;
  margin-top: 0 !important;
}

.el-menu .el-menu-item,
.el-submenu > .el-submenu__title {
  min-width: 206px !important;
  height: 52px !important;
  line-height: 52px !important;
  margin: 2px 0;
  padding-left: 42px !important;
  border-radius: 0 28px 28px 0 !important;
  font-size: 15px !important;
  letter-spacing: 0;
  transition: background-color .2s ease, color .2s ease, padding-left .2s ease;
}

.el-menu .el-menu-item i,
.el-submenu__title i {
  width: 22px;
  margin-right: 14px;
  color: #D5C9B8;
  font-size: 18px;
  vertical-align: -1px;
}

.el-menu .el-menu-item:hover,
.el-submenu__title:hover {
  padding-left: 46px !important;
  background: rgba(17, 124, 13, .18) !important;
  color: #FAF6EF !important;
}

.el-menu .el-menu-item.is-active {
  background: #117C0D !important;
  color: #FAF6EF !important;
  box-shadow: 0 5px 14px rgba(17, 124, 13, .25);
}

.el-menu .el-menu-item.is-active i,
.el-menu .el-menu-item.is-active span {
  color: #FAF6EF !important;
}

.navbar .head-lable {
  color: #2E3B2B;
  font-size: 17px;
}

.navbar .right-menu .avatar-wrapper {
  color: #6F7A6B;
}

@media (max-width: 900px) {
  .sidebar-container { width: 170px !important; }
  .logo { height: 136px; flex-basis: 136px; }
  .el-menu .el-menu-item,
  .el-submenu > .el-submenu__title { min-width: 170px !important; }
}

/* --- 响应式：900px 以下 --- */
@media (max-width: 900px) {
  .app-wrapper {
    min-width: 0;
    overflow-x: hidden;
  }

  .sidebar-container {
    width: 150px !important;
    flex: 0 0 150px;
  }

  .main-container {
    width: calc(100% - 150px);
    min-width: 0;
  }

  .logo {
    padding: 28px 14px 48px;
    flex-basis: 160px;
  }

  .logo span {
    font-size: 16px !important;
    line-height: 1.35;
  }

  .el-submenu > .el-submenu__title,
  .el-submenu .el-menu-item {
    min-width: 150px !important;
  }

  .el-menu .el-menu-item {
    padding-left: 18px !important;
  }

  .navbar .head-lable {
    width: calc(100% - 96px);
    padding-left: 12px;
    font-size: 14px;
  }

  .navbar .right-menu {
    margin-right: 12px;
    max-width: 90px;
  }

  .navbar .right-menu .avatar-wrapper {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* --- 响应式：640px 以下 --- */
@media (max-width: 640px) {
  .app-wrapper {
    display: block;
    height: auto;
    min-height: 100%;
    overflow-y: auto;
  }

  .sidebar-container {
    width: 100% !important;
    height: auto;
    min-height: 0;
  }

  .main-container {
    width: 100%;
    height: calc(100vh - 206px);
    min-height: 520px;
  }

  .logo {
    padding: 18px 16px;
    flex: 0 0 auto;
  }

  .el-menu {
    display: flex;
    overflow-x: auto;
    height: 56px;
  }

  .el-menu > div {
    flex: 0 0 auto;
  }

  .el-menu .el-menu-item {
    height: 56px;
    line-height: 56px;
    padding: 0 18px !important;
    border-radius: 0 !important;
  }

  .navbar {
    height: 56px;
  }

  .navbar .head-lable,
  .navbar .right-menu {
    height: 56px;
    line-height: 56px;
  }

  .navbar .right-menu img {
    margin-top: 16px;
  }
}
