/* ============================================================
   布局壳层 —— 顶栏 / 左侧菜单 / 页签栏 / 内容区
   尺寸取自源系统实测：header 60、sidebar 220、menu item 46、tags 46
   ============================================================ */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--dg-color-text-regular);
  background: #fff;
  overflow: hidden;
}
ul, ol { list-style: none; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #c8ced2; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

#app { height: 100%; }

.layout-basic { height: 100%; display: flex; flex-direction: column; overflow: hidden; }

/* ---------------- 顶栏 ---------------- */
.el-header { height: var(--layout-header-height); flex: none; }
.navbar {
  height: var(--layout-header-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  background-color: #0b2f6b;
  background-image: url("../img/bg__dark.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: #fff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .09);
}
.logo-wrap { display: flex; align-items: center; flex: none; cursor: pointer; }
.logo-wrap .logo { width: 32px; height: 32px; display: block; }
.logo-wrap .platform-name {
  margin-left: 8px;
  font-family: Ding, var(--font-family);
  font-size: var(--font-size-title);
  line-height: 24px;
  color: #fff;
  white-space: nowrap;
}
.panel-right { margin-left: auto; display: flex; align-items: center; }
.navbar .back {
  height: 33px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, .1);
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.navbar .back:hover { background: rgba(255, 255, 255, .18); }
.navbar .navbar-action {
  width: 16px; height: 16px; margin-left: 24px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff;
}
.navbar .divider { width: 1px; height: 16px; margin: 0 16px; background: #fff; opacity: .6; }
.avatar-container { position: relative; }
.avatar-wrapper {
  height: 32px; display: flex; align-items: center; gap: 6px;
  color: #fff; font-size: 14px; cursor: pointer;
}
.avatar-wrapper .caret { transition: transform var(--transition-base); }
.avatar-container.open .caret { transform: rotate(180deg); }
.avatar-dropdown {
  position: absolute; right: 0; top: 40px; min-width: 120px; z-index: 2200;
  background: #fff; border: 1px solid var(--dg-border-color-light);
  border-radius: 4px; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  padding: 4px 0; display: none;
}
.avatar-container.open .avatar-dropdown { display: block; }
.avatar-dropdown li { padding: 0 20px; line-height: 34px; font-size: 14px; color: var(--dg-color-text-regular); cursor: pointer; }
.avatar-dropdown li:hover { background: var(--dg-color-primary-light-9); color: var(--dg-color-primary); }

/* ---------------- 主体：左侧菜单 + 内容 ---------------- */
.layout-body { flex: 1; min-height: 0; display: flex; }
.sidebar {
  width: var(--layout-sidebar-width); flex: none;
  background: #fff; border-right: 1px solid var(--layout-sidebar-border);
  overflow-y: auto; overflow-x: hidden;
}
.layout-content {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  background: var(--layout-content-bg); overflow: hidden;
}

/* 左侧菜单 */
.basic-menu { width: 100%; }
.basic-menu li { list-style: none; }
.menu-node__title {
  height: var(--layout-menu-item-height);
  line-height: var(--layout-menu-item-height);
  padding-right: 20px;
  font-size: 14px;
  color: var(--dg-color-text-primary);
  cursor: pointer;
  white-space: nowrap;
  display: flex; align-items: center;
  transition: background var(--transition-base), color var(--transition-base);
}
.menu-node__title:hover { background: var(--dg-color-fill-lighter); }
.menu-node__title .menu-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.menu-node__title .arrow {
  width: 14px; height: 14px; flex: none;
  transition: transform var(--transition-base);
}
.menu-node--open > .menu-node__title .arrow { transform: rotate(180deg); }
.menu-node--active > .menu-node__title,
.menu-node--active > .menu-node__title:hover {
  color: var(--dg-color-primary);
  background: var(--dg-color-primary-light-9);
  box-shadow: inset 2px 0 0 0 var(--dg-color-primary);
}
.menu-node__children { display: none; }
.menu-node--open > .menu-node__children { display: block; }
.menu-pad-1 { padding-left: var(--layout-menu-pad-l1); }
.menu-pad-2 { padding-left: var(--layout-menu-pad-l2); }
.menu-pad-3 { padding-left: var(--layout-menu-pad-l3); }

/* ---------------- 页签栏 ---------------- */
.tags-view-container {
  flex: none;
  margin: var(--layout-tags-gap) var(--layout-content-pad-x) 4px;
  height: var(--layout-tags-height);
  background-color: #fff;
  background-image: url("../img/tagesView.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border-radius: 4px;
  display: flex; align-items: center;
  overflow: hidden;
}
.tags-view-wrapper {
  display: flex; align-items: center;
  padding: 0 10px;
  overflow-x: auto; overflow-y: hidden;
  width: 100%; height: 100%;
}
.tags-view-wrapper::-webkit-scrollbar { height: 4px; }
.tags-view-item {
  flex: none;
  height: 26px; line-height: 24px;
  padding: 0 8px;
  margin-right: 16px;
  border: 1px solid var(--dg-border-color-base);
  border-radius: 6px;
  background: #fff;
  font-size: var(--font-size-small);
  color: var(--dg-color-text-regular);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.tags-view-item.active { background: var(--dg-color-primary); border-color: var(--dg-color-primary); color: #fff; }
.tags-view-item .close { font-size: 12px; line-height: 1; opacity: .8; }
.tags-view-item .close:hover { opacity: 1; }

/* ---------------- 内容区 ---------------- */
.app-main {
  flex: 1; min-height: 0;
  padding: 0 var(--layout-content-pad-x) var(--layout-content-pad-x);
  overflow: auto;
  display: flex; flex-direction: column;
}
.page { width: 100%; flex: 1 0 auto; display: flex; flex-direction: column; }
.page-container { background: #fff; flex: 1 0 auto; }
.page-search-table .page-container { min-height: 100%; }
