/* RuoYi 后台框架样式 */
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; padding: 0; }
body {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  color: #303133;
  background: #f0f2f5;
  -webkit-font-smoothing: antialiased;
}
[v-cloak] { display: none; }
a { text-decoration: none; color: inherit; }

.app-wrapper { display: flex; height: 100%; overflow: hidden; }

/* ============ 侧边栏 ============ */
.sidebar-container {
  width: 212px;
  flex-shrink: 0;
  background-color: #1f2d3d;
  transition: width .28s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-collapse .sidebar-container { width: 54px; }

/* Logo 区 */
.sidebar-logo {
  height: 50px;
  flex-shrink: 0;
  background: #2c3a4d;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  overflow: hidden;
}
.logo-mark {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, #4a9bf0 0%, #2f7fd4 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.logo-mark svg { width: 17px; height: 17px; display: block; }
.logo-title {
  font-size: 15px; color: #fff; font-weight: 600; margin: 0;
  white-space: nowrap; letter-spacing: .5px;
}
.sidebar-collapse .logo-title { display: none; }
.sidebar-collapse .sidebar-logo { padding: 0; justify-content: center; }

.sidebar-scroll { flex: 1; overflow: hidden; }
.sidebar-menu { border-right: none !important; }
.sidebar-menu:not(.el-menu--collapse) { width: 100%; }

/* 层级缩进（对齐参考图：28 / 60） */
.sidebar-menu { --menu-indent-1: 28px; --menu-indent-2: 60px; }

/* 菜单项基础 */
.sidebar-menu .el-menu-item,
.sidebar-menu .el-sub-menu__title {
  height: 46px;
  line-height: 46px;
  font-size: 14px;
  color: #bfcbd9;
  background-color: #1f2d3d;
  transition: background-color .25s, color .25s;
}
.sidebar-menu > .el-menu-item,
.sidebar-menu > .el-sub-menu > .el-sub-menu__title {
  padding-left: var(--menu-indent-1) !important;
  padding-right: 38px !important;
}
.sidebar-menu .el-menu-item .el-icon,
.sidebar-menu .el-sub-menu__title .el-icon {
  color: #bfcbd9;
  font-size: 16px;
  transition: color .25s;
}
.sidebar-menu .el-menu-item:hover,
.sidebar-menu .el-sub-menu__title:hover {
  background-color: #263445 !important;
  color: #fff !important;
}
.sidebar-menu .el-menu-item:hover .el-icon,
.sidebar-menu .el-sub-menu__title:hover .el-icon { color: #fff; }

/* 展开的子菜单：更深一档的底色 */
.sidebar-menu .el-sub-menu > ul.el-menu {
  background-color: #1f2d3d;
  padding: 4px 0;
}
.sidebar-menu .el-sub-menu > ul.el-menu > .el-menu-item {
  background-color: #1f2d3d;
  color: #bfcbd9;
  padding-left: var(--menu-indent-2) !important;
  padding-right: 16px !important;
}
.sidebar-menu .el-sub-menu > ul.el-menu > .el-menu-item:hover {
  background-color: #263445 !important;
  color: #fff !important;
}

/* 三级：子菜单里的父项 */
.sidebar-menu .el-sub-menu .el-sub-menu__title {
  background-color: #1f2d3d;
  color: #bfcbd9;
  padding-left: 44px !important;
  padding-right: 38px !important;
}
.sidebar-menu .el-sub-menu .el-sub-menu__title:hover {
  background-color: #263445 !important;
  color: #fff !important;
}
.sidebar-menu .el-sub-menu .el-sub-menu > ul.el-menu { background-color: #1f2d3d; }
.sidebar-menu .el-sub-menu .el-sub-menu > ul.el-menu > .el-menu-item {
  background-color: #1f2d3d;
  padding-left: 62px !important;
}

/* 选中态：贴左侧边缘的 3px 蓝条 + 提亮底色 + 白色文字 */
.sidebar-menu .el-menu-item.is-active {
  background-color: #1f2d3d !important;
  color: #fff !important;
  font-weight: 500;
}
.sidebar-menu .el-menu-item.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #409eff;
  border-radius: 0 2px 2px 0;
}
.sidebar-menu > .el-menu-item.is-active::before { left: 0; }
.sidebar-menu .el-sub-menu > ul.el-menu > .el-menu-item.is-active::before { left: 0; }
.sidebar-menu .el-sub-menu .el-sub-menu > ul.el-menu > .el-menu-item.is-active::before { left: 0; }
.sidebar-menu .el-menu-item.is-active .el-icon { color: #fff; }

/* 右侧展开箭头 */
.sidebar-menu .el-sub-menu__icon-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  margin-top: -6px;
  color: #8a97a8;
  font-size: 12px;
  transition: transform .3s, color .25s;
  width: auto;
}
.sidebar-menu .el-sub-menu__title:hover .el-sub-menu__icon-arrow { color: #fff; }
.sidebar-menu .el-sub-menu.is-opened > .el-sub-menu__title .el-sub-menu__icon-arrow { color: #fff; }

.sidebar-collapse .el-menu-item span,
.sidebar-collapse .el-sub-menu__title span { display: none; }
.sidebar-collapse .el-menu-item .el-icon,
.sidebar-collapse .el-sub-menu__title .el-icon { margin-right: 0; }

/* ============ 主区域 ============ */
.main-container {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f0f2f5;
}

.navbar {
  height: 50px;
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 12px;
}
.hamburger {
  cursor: pointer; font-size: 18px; color: #5a5e66;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: background .2s;
}
.hamburger:hover { background: #f2f3f5; }
.nav-breadcrumb { font-size: 13px; color: #909399; display: flex; align-items: center; gap: 6px; }
.nav-breadcrumb .crumb-current { color: #303133; font-weight: 500; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-icon-btn {
  width: 34px; height: 34px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #5a5e66; font-size: 16px;
}
.nav-icon-btn:hover { background: #f2f3f5; color: #409eff; }
.nav-avatar { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 0 8px; height: 34px; border-radius: 4px; }
.nav-avatar:hover { background: #f2f3f5; }
.avatar-circle {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg,#409eff,#67c23a);
  color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.avatar-name { font-size: 13px; color: #303133; }

/* ============ 标签页 ============ */
.tags-view {
  height: 34px;
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid #d8dce5;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 5px;
  overflow-x: auto;
  overflow-y: hidden;
}
.tags-view::-webkit-scrollbar { height: 0; }
.tag-item {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 8px; font-size: 12px;
  background: #fff; border: 1px solid #d8dce5; color: #495060;
  border-radius: 2px; cursor: pointer; white-space: nowrap;
}
.tag-item:hover { color: #409eff; border-color: #409eff; }
.tag-item.active { background: #409eff; border-color: #409eff; color: #fff; }
.tag-close {
  width: 13px; height: 13px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; background: rgba(0,0,0,.12);
}
.tag-item.active .tag-close { background: rgba(255,255,255,.3); }
.tag-close:hover { background: #f56c6c; color: #fff; }

/* ============ 内容区 ============ */
.app-main {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #f0f2f5;
}
.frame-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #f0f2f5;
}

/* 登录页 */
.login-wrap {
  height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2b5876 0%, #4e4376 55%, #1f2d3d 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.login-wrap::before { top: -160px; left: -120px; }
.login-wrap::after { bottom: -190px; right: -110px; }
.login-card {
  width: 400px; padding: 34px 36px 28px;
  background: rgba(255,255,255,.97);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  position: relative; z-index: 2;
}
.login-title { text-align: center; margin: 0 0 4px; font-size: 21px; color: #1f2d3d; letter-spacing: 2px; }
.login-sub { text-align: center; color: #909399; font-size: 13px; margin: 0 0 26px; }
.login-tip { margin-top: 16px; font-size: 12px; color: #909399; text-align: center; }
.login-footer { position: absolute; bottom: 18px; width: 100%; text-align: center; color: rgba(255,255,255,.6); font-size: 12px; z-index: 2; }
