* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 250px;
  background: #ffffff;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  padding: 20px 0;
  transition: all 0.3s ease;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.sidebar-header h2 {
  color: #007bff;
  font-size: 1.5rem;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 5px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  text-decoration: none;
  color: #555;
  font-size: 1rem;
  transition: all 0.2s;
}

.sidebar-menu a:hover {
  background: #f0f8ff;
  color: #007bff;
}

.sidebar-menu a.active {
  background: #e6f2ff;
  color: #007bff;
  border-left: 4px solid #007bff;
}

.sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* 主内容区 */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 顶部导航栏 */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 15px 30px;
  z-index: 99;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #007bff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.user-name {
  font-weight: 500;
  color: #333;
}

.user-dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
  min-width: 150px;
  z-index: 1000;
}

.user-dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.dropdown-content a:hover {
  background: #f5f7fa;
}

/* 主内容容器 */
.container {
  flex: 1;
  padding: 20px 30px;
  overflow-y: auto;
}

.header {
  margin-bottom: 30px;
  font-size: 1.5rem;
  color: #1a1a1a;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 600;
}

.main-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: 15px;
  color: #444;
  font-size: 1.1rem;
}

.data-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.label {
  color: #666;
}

.value strong {
  color: #007bff;
}

.chart-section {
  margin-top: 20px;
  grid-column: span 2;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.btn-filter {
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-filter:hover {
  background: #0056b3;
}

#model-consumption-chart {
  width: 100%;
  height: 300px;
}

.no-data {
  text-align: center;
  padding: 40px 0;
  color: #999;
}

.no-data img {
  width: 80px;
  height: 80px;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  .sidebar-menu {
    display: flex;
    flex-wrap: wrap;
    padding: 0 10px;
  }
  
  .sidebar-menu li {
    margin: 5px;
  }
  
  .sidebar-menu a {
    padding: 8px 12px;
    border-radius: 6px;
  }
  
  .main-content {
    grid-template-columns: 1fr;
  }
  
  .chart-section {
    grid-column: span 1;
  }
}