/* ========== 全局重置 ========== */
*, *::before, *::after {
  box-sizing: border-box;
}
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========== 整体布局 ========== */
.wrap-container {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ========== 左侧侧边栏 ========== */
#sidebar {
  flex: 0 0 260px;
  width: 260px;
  transition: flex-basis 0.3s ease, width 0.3s ease;
  overflow: hidden;
  background-color: #121a29;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 50;
}
#sidebar.sidebar-collapse {
  flex-basis: 64px;
  width: 64px;
}
#sidebar.sidebar-collapse .sidebar-text,
#sidebar.sidebar-collapse .sidebar-title-label {
  display: none !important;
}
#sidebar.sidebar-collapse .menu-item {
  padding-inline: 0 !important;
  justify-content: center;
}
#sidebar.sidebar-collapse .menu-item iconify-icon {
  margin-right: 0 !important;
}

/* ========== 侧边栏顶部标题 ========== */
.sidebar-header {
  height: 80px;
  background: #202c3d;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  flex-shrink: 0;
}
.sidebar-header iconify-icon {
  color: #4096ff;
  font-size: 32px;
  flex-shrink: 0;
}
.sidebar-header .header-title {
  font-size: 30px;
  color: #fff;
  font-weight: bold;
  white-space: nowrap;
}

/* ========== 分组标题 ========== */
.menu-group-title {
  padding: 24px 24px 12px;
  font-size: 16px;
  color: #808896;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ========== 一级菜单项 ========== */
.menu-item {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 24px;
  color: #c0c6cf;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  font-size: 16px;
  position: relative;
  text-decoration: none;
}
.menu-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.menu-item iconify-icon {
  font-size: 22px;
  margin-right: 16px;
  flex-shrink: 0;
}
.menu-item .menu-chevron {
  margin-left: auto;
  font-size: 18px;
  transition: transform 0.2s ease;
}

/* ========== 选中激活态（蓝色通栏 + 右侧亮蓝竖条） ========== */
.menu-item.active {
  background-color: #2474f5 !important;
  color: #ffffff !important;
}
.menu-item.active::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #60a5fa;
}

/* ========== 子菜单 ========== */
.sidebar-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: rgba(0,0,0,0.2);
}
.sidebar-submenu.open {
  max-height: 800px;
}
.sidebar-submenu a {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 24px 0 62px;
  color: #a0aec0;
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
}
.sidebar-submenu a:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}
.sidebar-submenu a.active {
  color: #fff;
  background: rgba(36, 116, 245, 0.15);
}

/* ========== 箭头旋转 ========== */
.rotate-180 {
  transform: rotate(180deg);
}

/* ========== 滚动条 ========== */
.sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 2px;
}
.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* ========== 右侧主区域 ========== */
.right-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ========== 内容页通用（给子页面用的） ========== */
.layout-main {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
  background-color: #f3f4f6;
}

/* ========== 内容页Header（子页面顶部栏） ========== */
.page-header {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
}
.page-header .breadcrumb {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #6b7280;
}
.page-header .breadcrumb .current {
  color: #111827;
  font-weight: 500;
}