/* 对齐 fastdev_cms_java_split 全局样式（从 index/sidebar/fastdev/login 提炼） */
:root {
  --font-family-base: Inter, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  --el-font-family: var(--font-family-base);
  --sidebar-bg: #1a1f2e;
  --sidebar-text: #bfcbd9;
  --menu-hover: #263445;
  --navbar-bg: #ffffff;
  --navbar-text: #303133;
  --current-color: #409EFF;
  --current-color-dark-bg: rgba(64, 158, 255, 0.2);
  --base-sidebar-width: 200px;
  --base-sub-menu-background: #141824;
  --base-sub-menu-hover: rgba(255, 255, 255, 0.06);
  --base-menu-color: rgba(255, 255, 255, 0.65);
  --base-menu-color-active: #ffffff;
}

html, body {
  height: 100%;
  margin: 0;
  box-sizing: border-box;
  font-family: var(--font-family-base);
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: #f0f2f5;
}
/* 外壳页禁止 document 滚动，只留 iframe 内一条滚动条 */
html:has(.app-wrapper),
html:has(.app-wrapper) body {
  overflow: hidden !important;
  height: 100%;
}
*, *:before, *:after { box-sizing: inherit; }
[v-cloak] { display: none !important; }
label { font-weight: 700; }
a, a:focus, a:hover { cursor: pointer; color: inherit; text-decoration: none; }

#app, .app-wrapper {
  height: 100%;
  width: 100%;
  position: relative;
}
.app-wrapper {
  overflow: hidden;
}
/* 隐藏的 sprite / overlay 宿主不要撑高文档（曾导致外壳多出一条滚动条） */
#svg-sprite-host,
object[type="image/svg+xml"] {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
#fd-embed-overlays {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
}
#fd-embed-overlays > * {
  pointer-events: auto;
}
/* Element Plus teleport 容器默认 static，会撑高 body 冒出外壳滚动条 */
[id^="el-popper-container"] {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: visible !important;
  z-index: 4000;
}

/* 滚动条样式对齐 split AppMain */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background-color: #c0c0c0;
  border-radius: 3px;
}

/* ========== 登录页（对齐 login.vue scoped） ========== */
.login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  min-height: 100vh;
  background-image: url("/images/login-background.jpg");
  background-size: cover;
  background-position: center;
}
.login .title {
  margin: 0 auto 30px auto;
  text-align: center;
  color: #707070;
  font-size: 22px;
  font-weight: 500;
}
.login-form {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #ffffff;
  width: 400px;
  max-width: 92vw;
  padding: 25px 25px 5px 25px;
  z-index: 1;
}
.login-form .el-input { height: 40px; }
.login-form .el-input__wrapper { height: 40px; }
.login-form .input-icon {
  height: 39px;
  width: 14px;
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  color: #909399;
}
.version-ribbon {
  position: absolute;
  top: 14px;
  right: -34px;
  width: 120px;
  padding: 4px 0;
  background: var(--el-color-primary, #409EFF);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.5px;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 2;
  pointer-events: none;
}
.login-code {
  width: 33%;
  height: 40px;
  float: right;
}
.login-code-img {
  height: 40px;
  padding-left: 12px;
  cursor: pointer;
  vertical-align: middle;
}
.el-login-footer {
  height: 40px;
  line-height: 40px;
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
}
.el-login-footer a {
  color: inherit;
  text-decoration: underline;
}
.login-form .link-type {
  color: var(--el-color-primary, #409EFF);
  text-decoration: none;
  font-size: 14px;
}
.login-form .link-type:hover {
  text-decoration: underline;
}

/* ========== 布局：固定侧栏 + 主区 margin（对齐 sidebar.scss） ========== */
:root {
  --fd-sidebar-width: 200px;
}
.app-wrapper.openSidebar .main-container {
  margin-left: var(--fd-sidebar-width, var(--base-sidebar-width));
}
.app-wrapper.hideSidebar .main-container,
html.fd-hide-sidebar .main-container {
  margin-left: 54px;
}
.app-wrapper.hideSidebar .sidebar-container,
html.fd-hide-sidebar .sidebar-container {
  width: 54px !important;
}

.main-container {
  min-height: 100%;
  transition: margin-left 0.28s;
  margin-left: var(--fd-sidebar-width, var(--base-sidebar-width));
  position: relative;
  background: #f0f2f5;
}
/* 对齐 split：固定头时外壳不再滚动，只让业务区/iframe 出一条滚动条 */
.main-container:has(.fixed-header) {
  height: 100vh;
  overflow: hidden;
}

.sidebar-container {
  transition: width 0.28s;
  width: var(--fd-sidebar-width, var(--base-sidebar-width)) !important;
  height: 100%;
  position: fixed;
  font-size: 0;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
  overflow: hidden;
  background: var(--sidebar-bg) !important;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
  border-right: none;
}
.sidebar-container .el-scrollbar { height: calc(100% - 50px); }
.sidebar-container .el-menu {
  border: none;
  height: 100%;
  width: 100% !important;
  background-color: transparent !important;
}
.sidebar-container .el-menu-item,
.sidebar-container .el-sub-menu__title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  height: 44px !important;
  line-height: 44px !important;
  color: var(--sidebar-text) !important;
}
.sidebar-container .el-menu-item .el-menu-tooltip__trigger {
  display: inline-block !important;
  width: 100%;
  height: 100%;
  padding: 0 !important;
  box-sizing: border-box;
}
.sidebar-container .el-menu-item:hover,
.sidebar-container .el-sub-menu__title:hover {
  background-color: rgba(0, 0, 0, 0.06) !important;
}
.sidebar-container.theme-dark .el-sub-menu .el-menu-item {
  background-color: var(--base-sub-menu-background) !important;
  min-width: var(--base-sidebar-width) !important;
}
.sidebar-container.theme-dark .el-sub-menu .el-menu-item:hover {
  background-color: var(--base-sub-menu-hover) !important;
}
.sidebar-container.theme-dark .el-menu-item.is-active {
  color: var(--current-color) !important;
  position: relative;
}
.sidebar-container.theme-dark .el-menu-item.is-active::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--current-color-dark-bg);
  pointer-events: none;
  z-index: 0;
}
.sidebar-container.theme-dark .el-menu-item.is-active span {
  position: relative;
  z-index: 1;
}
.sidebar-container.theme-dark .el-sub-menu.is-active > .el-sub-menu__title {
  color: var(--current-color) !important;
}
.sidebar-container .el-sub-menu__icon-arrow {
  color: var(--sidebar-text);
}

.sidebar-logo-container {
  position: relative;
  height: 50px;
  line-height: 50px;
  background: var(--sidebar-bg);
  text-align: center;
  overflow: hidden;
}
.sidebar-logo-link {
  height: 100%;
  width: 100%;
  display: inline-block;
}
.sidebar-logo {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-right: 6px;
}
.sidebar-title {
  display: inline-block;
  margin: 0;
  color: #fff;
  font-weight: 600;
  line-height: 50px;
  font-size: 14px;
  font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
  vertical-align: middle;
}
.hideSidebar .sidebar-title,
html.fd-hide-sidebar .sidebar-title { display: none; }
.hideSidebar .sidebar-logo,
html.fd-hide-sidebar .sidebar-logo { margin-right: 0; }
.hideSidebar .sidebar-logo-container,
html.fd-hide-sidebar .sidebar-logo-container { text-align: center; }
/* 折叠态对齐 java1 sidebar.scss（勿用 flex 居中，否则破坏 EP collapse） */
.hideSidebar .sidebar-container .el-menu--collapse,
html.fd-hide-sidebar .sidebar-container .el-menu--collapse {
  width: 54px !important;
}
.hideSidebar .sidebar-container .el-sub-menu,
html.fd-hide-sidebar .sidebar-container .el-sub-menu {
  overflow: hidden;
}
.hideSidebar .sidebar-container .el-sub-menu > .el-sub-menu__title,
html.fd-hide-sidebar .sidebar-container .el-sub-menu > .el-sub-menu__title {
  padding: 0 !important;
}
.hideSidebar .sidebar-container .el-sub-menu > .el-sub-menu__title .svg-icon,
html.fd-hide-sidebar .sidebar-container .el-sub-menu > .el-sub-menu__title .svg-icon {
  margin-right: 0 !important;
  margin-left: 20px !important;
}
.hideSidebar .sidebar-container .el-menu-item .svg-icon,
.hideSidebar .sidebar-container .el-menu-item .el-menu-tooltip__trigger .svg-icon,
html.fd-hide-sidebar .sidebar-container .el-menu-item .svg-icon,
html.fd-hide-sidebar .sidebar-container .el-menu-item .el-menu-tooltip__trigger .svg-icon {
  margin-right: 0 !important;
  margin-left: 20px !important;
}
.hideSidebar .sidebar-container .el-menu--collapse .el-sub-menu > .el-sub-menu__title > span,
.hideSidebar .sidebar-container .el-menu--collapse .el-sub-menu > .el-sub-menu__title > i,
html.fd-hide-sidebar .sidebar-container .el-menu--collapse .el-sub-menu > .el-sub-menu__title > span,
html.fd-hide-sidebar .sidebar-container .el-menu--collapse .el-sub-menu > .el-sub-menu__title > i {
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  display: inline-block !important;
}
.hideSidebar .sidebar-container .el-menu--collapse .el-menu-item span,
.hideSidebar .sidebar-container .el-menu--collapse .el-menu-item .menu-title,
html.fd-hide-sidebar .sidebar-container .el-menu--collapse .el-menu-item span,
html.fd-hide-sidebar .sidebar-container .el-menu--collapse .el-menu-item .menu-title {
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  display: inline-block !important;
}
/* 折叠弹出层宽度 */
.el-menu--collapse .el-menu .el-sub-menu {
  min-width: var(--base-sidebar-width) !important;
}
.el-menu--popup {
  background-color: var(--sidebar-bg) !important;
  padding: 0 !important;
}
.el-menu--popup .el-menu-item {
  color: var(--sidebar-text) !important;
  background-color: var(--base-sub-menu-background) !important;
}
.el-menu--popup .el-menu-item:hover {
  background-color: var(--base-sub-menu-hover) !important;
}
.el-menu--popup .el-menu-item.is-active {
  color: var(--current-color, #409EFF) !important;
}

/* ========== 顶栏（对齐 Navbar） ========== */
.navbar {
  height: 50px;
  overflow: hidden;
  position: relative;
  background: var(--navbar-bg);
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
.hamburger-container {
  line-height: 46px;
  height: 100%;
  cursor: pointer;
  transition: background 0.3s;
  -webkit-tap-highlight-color: transparent;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 8px;
}
.hamburger-container:hover { background: rgba(0, 0, 0, 0.025); }
.hamburger {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  fill: currentColor;
  color: #5a5e66;
  transition: transform 0.38s;
  transform-origin: 50% 50%;
}
.hamburger.is-active { transform: rotate(180deg); }
.app-wrapper.withoutAnimation .sidebar-container,
.app-wrapper.withoutAnimation .main-container {
  transition: none !important;
}
/* 面包屑（对齐 java1 Breadcrumb） */
.breadcrumb-container {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.app-breadcrumb.el-breadcrumb {
  display: inline-block;
  font-size: 14px;
  line-height: 50px;
}
.app-breadcrumb .el-breadcrumb__inner a,
.app-breadcrumb .el-breadcrumb__inner.is-link {
  font-weight: 400;
  color: #303133;
}
.app-breadcrumb .el-breadcrumb__inner a:hover {
  color: var(--el-color-primary, #409EFF);
}
.app-breadcrumb .no-redirect {
  color: #97a8be;
  cursor: text;
}
.right-menu {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: auto;
  padding-right: 8px;
  flex-shrink: 0;
}
.right-menu-item {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  height: 100%;
  font-size: 18px;
  color: #5a5e66;
}
.right-menu-item.hover-effect {
  cursor: pointer;
  transition: background 0.3s;
}
.right-menu-item.hover-effect:hover {
  background: rgba(0, 0, 0, 0.025);
}
.nav-svg,
.search-icon,
.size-icon {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
  vertical-align: middle;
}
.size-icon--style {
  display: inline-flex;
  align-items: center;
  height: 100%;
  font-size: 18px;
  line-height: 1;
  color: #5a5e66;
}
.avatar-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  height: 100%;
}
.user-avatar {
  cursor: pointer;
  width: 30px;
  height: 30px;
  margin-right: 8px;
  border-radius: 50%;
  object-fit: cover;
  background: #dcdfe6;
}
.user-nickname {
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  color: #5a5e66;
}
/* 下拉菜单：压掉 .el-popper 默认 padding:5px 11px，对齐 java1 紧凑菜单 */
.el-dropdown__popper.el-popper,
.avatar-dropdown-popper.el-popper,
.el-popper:has(.el-dropdown-menu) {
  padding: 5px 0 !important;
  min-width: 10px;
  width: auto;
  font-size: 14px;
  line-height: 22px;
  overflow: visible;
}
.el-dropdown__popper .el-dropdown-menu,
.avatar-dropdown-popper .el-dropdown-menu,
.el-popper:has(.el-dropdown-menu) .el-dropdown-menu {
  padding: 0;
  border: none;
  background: transparent;
  min-width: 0;
  width: max-content;
}
.el-dropdown__popper .el-dropdown-menu__item,
.avatar-dropdown-popper .el-dropdown-menu__item,
.el-popper:has(.el-dropdown-menu) .el-dropdown-menu__item {
  color: var(--el-text-color-regular, #606266);
  line-height: 22px;
  padding: 5px 16px;
  font-size: 14px;
  justify-content: flex-start;
  text-align: left;
}
.el-dropdown__popper .el-dropdown-menu__item:not(.is-disabled):focus,
.el-dropdown__popper .el-dropdown-menu__item:not(.is-disabled):hover,
.avatar-dropdown-popper .el-dropdown-menu__item:not(.is-disabled):hover,
.el-popper:has(.el-dropdown-menu) .el-dropdown-menu__item:not(.is-disabled):hover {
  background-color: var(--el-color-primary-light-9, #ecf5ff);
  color: var(--el-color-primary, #409EFF);
}
.avatar-container .el-tooltip__trigger:focus-visible {
  outline: none;
}

/* 菜单搜索对话框 */
.result-count {
  margin: 12px 0 8px;
  font-size: 13px;
  color: #909399;
}
.result-wrap { min-height: 120px; }
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.search-item.is-active,
.search-item:hover {
  background: #f5f7fa;
}
.search-item .menu-icon {
  margin-right: 0 !important;
  font-size: 18px;
  color: #909399;
}
.search-info { flex: 1; min-width: 0; }
.search-info .menu-title {
  font-size: 14px;
  color: #303133;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-info .menu-path {
  font-size: 12px;
  color: #909399;
  margin-top: 2px;
}
.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: #909399;
}
.search-footer {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ebeef5;
  font-size: 12px;
  color: #909399;
}
.search-footer kbd {
  display: inline-block;
  padding: 1px 5px;
  margin: 0 2px;
  border: 1px solid #dcdfe6;
  border-radius: 3px;
  background: #f5f7fa;
  font-size: 11px;
}

/* 布局设置抽屉 */
.drawer-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #303133;
}
.drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 14px;
  color: #606266;
}
.setting-theme-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.setting-theme-item {
  flex: 1;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #606266;
}
.setting-theme-item.active {
  border-color: var(--el-color-primary, #409EFF);
  color: var(--el-color-primary, #409EFF);
  background: #ecf5ff;
}

.fixed-header {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9;
  width: calc(100% - var(--fd-sidebar-width, var(--base-sidebar-width)));
  background: #fff;
  transition: width 0.28s;
}
.app-wrapper.hideSidebar .fixed-header,
html.fd-hide-sidebar .fixed-header {
  width: calc(100% - 54px);
}
.app-main {
  min-height: calc(100vh - 50px);
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #f0f2f5;
  margin-top: 50px;
}
.app-main.has-tags {
  min-height: calc(100vh - 84px);
  margin-top: 84px;
}
.app-main--frame {
  min-height: 0;
  height: calc(100vh - 50px);
  margin-top: 50px;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.app-main--frame.has-tags {
  height: calc(100vh - 84px);
  margin-top: 84px;
}
.fd-page-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f0f2f5;
}
/* 对齐 java1 AppMain fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
  transition: all 0.5s;
}
.fade-transform-enter-from {
  opacity: 0;
  transform: translateX(-30px);
}
.fade-transform-leave-to {
  opacity: 0;
  transform: translateX(30px);
}
.embed-page {
  min-height: 100%;
  background: #f0f2f5;
}
.embed-page .tree-sidebar-manage-wrap {
  min-height: 100%;
}
/* 列表页内容区白色底（对齐 java1 / split） */
.app-container {
  padding: 20px;
  background: #fff;
  box-sizing: border-box;
}
.embed-page .app-container {
  min-height: calc(100vh - 40px);
}

/* 对齐 java1 element-ui.scss / fastdev.scss 弹窗位置 */
.el-dialog {
  transform: none;
  left: 0;
  position: relative;
  margin: 0 auto;
}
.el-dialog:not(.is-fullscreen) {
  margin-top: 6vh !important;
}

/* ========== 管理员：左侧组织机构 + 右侧列表（对齐 java1 TreePanel） ========== */
.tree-sidebar-manage-wrap {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 84px);
  padding: 0 !important;
  overflow: hidden;
  background: #fff;
}
.tree-sidebar {
  flex-shrink: 0;
  width: 220px;
  background: #fff;
  border-right: 1px solid #e8eaed;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: width 0.25s ease;
}
.tree-sidebar.collapsed { width: 20px; }
.tree-sidebar .tree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  height: 40px;
  border-bottom: 1px solid #e8eaed;
  background: #f7f8fa;
  flex-shrink: 0;
}
.tree-sidebar .tree-title {
  font-size: 13px;
  font-weight: 600;
  color: #303133;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
}
.tree-sidebar .tree-title .title-icon {
  width: 16px;
  height: 16px;
  fill: #409eff;
  flex-shrink: 0;
}
.tree-sidebar .tree-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.tree-sidebar .tree-action-icon {
  width: 18px;
  height: 18px;
  color: #909399;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  fill: currentColor;
}
.tree-sidebar .tree-action-icon:hover {
  color: #409eff;
  background: #ecf5ff;
}
.tree-sidebar .tree-search {
  padding: 10px 10px 4px;
  flex-shrink: 0;
}
.tree-sidebar .tree-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 6px 6px 12px;
}
.tree-sidebar .tree-wrap .el-tree-node__content {
  height: 32px;
  border-radius: 4px;
  margin-bottom: 1px;
}
.tree-sidebar .tree-wrap .el-tree-node__content:hover {
  background: #f0f7ff;
}
.tree-sidebar .tree-wrap .el-tree-node.is-current > .el-tree-node__content {
  background: #e6f0fd;
  color: #409eff;
  font-weight: 600;
}
.tree-sidebar .tree-node {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  overflow: hidden;
}
.tree-sidebar .node-icon {
  width: 14px;
  height: 14px;
  fill: #f5a623;
  flex-shrink: 0;
}
.tree-sidebar .node-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-sidebar .collapse-btn {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 10;
  width: 15px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  color: #909399;
  font-size: 12px;
  line-height: 1;
}
.tree-sidebar .collapse-btn:hover {
  color: #409eff;
  background: #ecf5ff;
}
.tree-sidebar-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: #fff;
}
.tree-sidebar-content .content-inner {
  padding: 12px 16px;
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

/* ========== 业务表单/表格（对齐 fastdev.scss） ========== */
.el-form--inline .el-form-item .el-input,
.el-form--inline .el-form-item .el-select {
  width: 200px;
}
.el-form .el-form-item__label { font-weight: 700; }

.el-table .el-table__header-wrapper th,
.el-table .el-table__fixed-header-wrapper th {
  word-break: break-word;
  background-color: #f8f8f9 !important;
  color: #515a6e;
  height: 40px !important;
  font-size: 13px;
}

.mb8 { margin-bottom: 8px; }
.mb16 { margin-bottom: 16px; }

.pagination-container {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.welcome-card h2 { margin: 0 0 8px; color: #303133; font-weight: 500; }
.welcome-card p { margin: 0; color: #909399; }
.shortcut-row { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ========== SVG 图标（对齐 java1 SvgIcon） ========== */
.svg-icon {
  width: 1em;
  height: 1em;
  margin-right: 10px !important;
  position: relative;
  fill: currentColor;
  vertical-align: -2px;
  flex-shrink: 0;
}
.sidebar-container .el-menu-item,
.sidebar-container .el-sub-menu__title {
  /* 不要强制 flex，否则 Element Plus collapse 布局会坏 */
  align-items: center;
}

/* ========== TagsView（对齐 java1） ========== */
.tags-view-container {
  height: 34px;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #d8dce5;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.tags-view-wrapper {
  flex: 1;
  min-width: 0;
  height: 100%;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
}
.tags-view-wrapper::-webkit-scrollbar { height: 0; }
.tags-view-item {
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  height: 26px;
  line-height: 26px;
  border: 1px solid #d8dce5;
  color: #495060;
  background: #fff;
  padding: 0 8px;
  font-size: 12px;
  margin-left: 5px;
  border-radius: 3px;
  text-decoration: none;
  vertical-align: middle;
  flex-shrink: 0;
}
.tags-view-item:first-of-type { margin-left: 6px; }
.tags-view-item.active {
  background-color: #409EFF;
  color: #fff;
  border-color: #409EFF;
}
.tags-icon {
  width: 12px;
  height: 12px;
  margin-right: 3px;
  fill: currentColor;
}
.tags-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  margin-right: 5px;
}
.tags-close {
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 12px;
  text-align: center;
  margin-left: 4px;
  border-radius: 50%;
  font-size: 12px;
}
.tags-close:hover {
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
}
.tags-view-item.active .tags-close:hover {
  background: rgba(255, 255, 255, 0.35);
}
.tags-nav-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 34px;
  cursor: pointer;
  color: #71717a;
  user-select: none;
  border-left: 1px solid #d8dce5;
}
.tags-nav-btn:hover {
  background: #f0f2f5;
  color: #303133;
}
.tags-action-dropdown {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 34px;
}
.tags-action-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 34px;
  cursor: pointer;
  color: #71717a;
  font-size: 13px;
  border-left: 1px solid #d8dce5;
  user-select: none;
}
.tags-action-btn:hover {
  background: #f0f2f5;
  color: #303133;
}
.tags-refresh-btn {
  width: 60px;
}
.tags-contextmenu {
  margin: 0;
  background: var(--el-bg-color-overlay, #fff);
  z-index: 3000;
  position: fixed;
  list-style-type: none;
  padding: 5px 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
  color: #333;
  box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
  border: 1px solid var(--el-border-color-light, #e4e7ed);
}
.tags-contextmenu li {
  margin: 0;
  padding: 7px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tags-contextmenu li:hover {
  background: #eee;
}
.tags-contextmenu li svg {
  flex-shrink: 0;
}

/* 工具栏按钮行 */
.mb8 { margin-bottom: 8px; }
.ml5 { margin-left: 5px; }
.toolbar-row { margin-bottom: 8px; }

/* 菜单图标选择器（对齐 java1 IconSelect） */
.icon-body {
  width: 100%;
  padding: 10px;
}
.icon-body .icon-search {
  position: relative;
  margin-bottom: 5px;
}
.icon-body .icon-list {
  height: 200px;
  overflow: auto;
}
.icon-body .list-container {
  display: flex;
  flex-wrap: wrap;
}
.icon-body .icon-item-wrapper {
  width: calc(100% / 3);
  height: 25px;
  line-height: 25px;
  cursor: pointer;
  display: flex;
}
.icon-body .icon-item {
  display: flex;
  max-width: 100%;
  height: 100%;
  padding: 0 5px;
  align-items: center;
}
.icon-body .icon-item:hover,
.icon-body .icon-item.active {
  background: #ececec;
  border-radius: 5px;
}
.icon-body .icon-item .svg-icon {
  flex-shrink: 0;
  margin-right: 2px !important;
}
.icon-body .icon-item span {
  display: inline-block;
  padding-left: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-icon-cell .svg-icon,
.el-table .menu-name-icon {
  margin-right: 0 !important;
}
/* 对齐 java1：输入框前缀图标与文字约 8px，不吃侧栏 svg-icon 的 10px */
.el-input__prefix .svg-icon {
  margin-right: 8px !important;
}

/* 参数设置：表单/列表双模式（对齐 java1） */
.config-toolbar { margin-bottom: 15px; }
.config-toolbar-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -20px -20px 15px;
  padding: 20px 20px 0;
  background: var(--el-bg-color, #fff);
}
.config-form-mode {
  width: 100%;
  max-width: none;
  padding-top: 8px;
  padding-right: 16px;
  box-sizing: border-box;
}
.config-form-mode .el-form-item__label {
  line-height: 32px;
  white-space: normal;
  height: auto;
  align-items: flex-start;
}
.config-form-mode .el-form-item__content { align-items: flex-start; }
.config-form-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}
.config-form-control { flex: 1; min-width: 0; }
.config-form-key {
  flex: 0 0 280px;
  max-width: 280px;
  line-height: 32px;
  color: #909399;
  font-size: 13px;
  word-break: break-all;
  user-select: all;
}
.config-form-remark {
  margin-top: 6px;
  color: #909399;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}
.config-image-upload .el-upload {
  width: 120px;
  height: 120px;
  border: 1px dashed var(--el-border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.config-image-preview { width: 120px; height: 120px; object-fit: cover; display: block; }
.config-image-upload .avatar-plus { font-size: 28px; color: #8c939d; }

/* wangEditor 优化版（对齐 java1 WangEditor） */
.wang-editor-wrap {
  width: 100%;
  border: 1px solid var(--el-border-color);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.wang-editor-toolbar { border-bottom: 1px solid var(--el-border-color); }
.wang-editor-body { flex: 1; overflow-y: hidden; }
.wang-editor-body .w-e-text-container { height: 100% !important; }

/* 附件管理：分类侧栏 + 卡片网格（对齐 java1 AttachmentPicker） */
.attachment-manage { padding-bottom: 0; }
.attachment-picker { height: 560px; }
.attachment-picker.is-embedded {
  height: calc(100vh - 40px);
  min-height: 520px;
}
.picker-body {
  display: flex;
  height: 100%;
  border: 1px solid var(--el-border-color-lighter);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.cate-aside {
  position: relative;
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--el-border-color-lighter);
  overflow: hidden;
  background: #fafafa;
  transition: width 0.25s ease;
}
.cate-aside.collapsed { width: 42px; background: #fff; }
.cate-aside-body { height: 100%; overflow-y: auto; padding: 8px 0; }
.collapse-button-container {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 20px;
  background: #fff;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.collapse-button { font-size: 12px; color: #909399; cursor: pointer; line-height: 1; }
.cate-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  cursor: pointer;
  color: #333;
}
.cate-item.is-child { padding-left: 28px; }
.cate-item.active { background: #e8f3ff; color: var(--el-color-primary); }
.cate-item:hover { background: #f0f7ff; }
.cate-item:hover .more-icon { opacity: 1; }
.cate-item .folder-icon { font-size: 14px; }
.cate-item .cate-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.cate-item .expand-icon,
.cate-item .expand-placeholder { width: 14px; font-size: 10px; flex-shrink: 0; }
.cate-item .more-icon {
  opacity: 0;
  padding: 0 4px;
  border-radius: 2px;
  color: #909399;
}
.cate-add-root {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  margin-top: 4px;
  color: var(--el-color-primary);
  cursor: pointer;
  font-size: 13px;
}
.cate-inline-row { background: #fff7e6; }
.cate-inline-input {
  flex: 1;
  min-width: 0;
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--el-color-primary);
  border-radius: 3px;
  outline: none;
  font-size: 13px;
  background: #fff;
}
.picker-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px;
}
.attachment-picker .toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.move-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px 4px;
  border-top: 1px solid var(--el-border-color-lighter);
  margin-top: 4px;
}
.hidden-file { display: none; }
.image-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  align-content: start;
  min-height: 280px;
}
.image-card {
  border: 1px solid var(--el-border-color-lighter);
  border-radius: 4px;
  padding: 6px;
  cursor: pointer;
}
.image-card.selected {
  border-color: var(--el-color-primary);
  box-shadow: 0 0 0 1px var(--el-color-primary);
}
.image-card .thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f5f7fa;
  border-radius: 2px;
  overflow: hidden;
}
.image-card .thumb,
.image-card .el-image.thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.image-card .file-thumb {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  color: #606266;
}
.image-card .file-ext { font-size: 11px; font-weight: 600; letter-spacing: 0.5px; }
.image-card .file-thumb.kind-pdf { background: #fdecea; color: #c0392b; }
.image-card .file-thumb.kind-excel { background: #e8f5ee; color: #217346; }
.image-card .file-thumb.kind-word { background: #eaf2fb; color: #2b579a; }
.image-card .file-thumb.kind-ppt { background: #fdeee9; color: #d24726; }
.image-card .file-thumb.kind-archive { background: #fff7e6; color: #d48806; }
.image-card .file-thumb.kind-video { background: #f3eafa; color: #8e44ad; }
.image-card .file-thumb.kind-text { background: #f0f2f5; color: #606266; }
.image-card .check { position: absolute; top: 4px; left: 4px; }
.image-card .file-name {
  margin-top: 6px;
  font-size: 12px;
  color: #606266;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.image-card .card-actions {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--el-color-primary);
}
.image-card .card-actions span { cursor: pointer; }
.image-card:hover .card-actions { display: flex; }
.attachment-picker .pager { margin-top: 8px; display: flex; justify-content: flex-end; }
.preview-file { text-align: center; padding: 32px 16px; color: #606266; }
.attachment-move-popper {
  background: #fff !important;
  border: 1px solid var(--el-border-color-light);
  box-shadow: var(--el-box-shadow-light);
  padding: 8px 8px 4px !important;
  box-sizing: border-box;
}
/* 表格加载中不展示「暂无数据」，等接口返回后再显示空态 */
.el-table.el-loading-parent--relative .el-table__empty-block {
  visibility: hidden !important;
}