/* 基础布局 */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f5f6fa;
}

/* 导航栏样式 */
.navbar {
  height: 60px;
  background-color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.navbar-brand {
  font-weight: 500;
}

/* 主容器样式 */
.app-container {
  display: flex;
  flex: 1;
  margin-top: 60px;
}

/* 侧边栏样式 */
.app-sidebar {
  width: 260px;
  background-color: #ffffff;
  border-right: 1px solid #e4e6ef;
  height: calc(100vh - 60px);
  position: fixed;
  top: 60px;
  left: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-nav .nav-link {
  color: #5e6278;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-nav .nav-link:hover {
  color: #009ef7;
  background-color: #f1faff;
}

.sidebar-nav .nav-link.active {
  color: #009ef7;
  background-color: #f1faff;
  font-weight: 500;
}

/* 主内容区样式 */
.app-main {
  flex: 1;
  margin-left: 260px;
  padding: 20px;
}

/* 图表卡片样式 */
.chart-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 0 20px 0 rgba(76,87,125,0.02);
  padding: 1.5rem;
  height: 100%;
  min-height: 400px;
}

.chart {
  height: 350px;
  width: 100%;
}

/* 响应式布局 */
@media (max-width: 991.98px) {
  .app-sidebar {
      transform: translateX(-100%);
      transition: transform 0.3s ease;
  }
  
  .app-sidebar.show {
      transform: translateX(0);
  }
  
  .app-main {
      margin-left: 0;
  }
}
/* 顶部导航样式 */
.navbar .nav-link {
  color: #5e6278;
  padding: 1rem 1.5rem;
  cursor: pointer;
}

.navbar .nav-link.active {
  color: #009ef7;
  background-color: #f1faff;
}

.navbar .nav-link:hover {
  color: #009ef7;
}

/* 侧边栏样式 */
.app-sidebar {
  width: 280px;
  background-color: #ffffff;
  border-right: 1px solid #e4e6ef;
  height: calc(100vh - 60px);
  position: fixed;
  top: 60px;
  left: 0;
  overflow-y: auto;
  z-index: 99;
  transition: all 0.3s ease;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: #5e6278;
}

.sidebar-nav .nav-link i:first-child {
  margin-right: 0.75rem;
  font-size: 1.1rem;
}

.sidebar-nav .nav-link.sidebar-menu-toggle {
  justify-content: space-between;
}

.sidebar-nav .sub-menu {
  padding-left: 1.5rem;
  background-color: #f8f9fa;
}

/* 动画效果 */
.sidebar-nav .collapse {
  transition: all 0.3s ease;
}

.sidebar-nav .bi-chevron-down {
  transition: transform 0.3s;
}

.sidebar-nav .nav-link[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}
/* 搜索框容器样式 */
.sidebar-header {
  padding: 1rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e4e6ef;
  position: sticky;
  top: 0;
  z-index: 1;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 1rem;
  border: 1px solid #e4e6ef;
  border-radius: 6px;
  font-size: 0.875rem;
}

.search-box input:focus {
  border-color: #009ef7;
  box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.25);
  outline: none;
}

.search-box .search-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a1a5b7;
  pointer-events: none;
}

/* 调整菜单容器的滚动区域 */
.sidebar-content {
  height: calc(100% - 70px); /* 减去搜索框的高度 */
  overflow-y: auto;
}