<template>
  <div class="work-layout-container">
    <div class="work-left-sidebar">
      <div class="menu-title">
        <h3>指标配置</h3>
      </div>
      <div class="menu-list">
        <div
          class="menu-item"
          :class="{ active: activeMenu === item.key }"
          v-for="item in menuList"
          :key="item.key"
          @click="activeMenu = item.key"
        >
          {{ item.label }}
        </div>
      </div>
    </div>
    <div class="work-section work-main-section">
      
    </div>
  </div>
</template>

<script setup>
import { ref, watch } from 'vue';

const menuList = ref([
  { key: 1, label: '指标一' },
  { key: 2, label: '指标二' },
  { key: 3, label: '指标三' },
  { key: 4, label: '指标四' },
])
const activeMenu = ref(1)
</script>

<style scoped>
/* 你原来的全部样式 100% 保留，我只加左侧样式 */
.work-layout-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row; /* 只改这一个字：column → row */
  gap: 6px;
  padding: 8px;
  margin: 0 !important;
  box-sizing: border-box;
  background-color: transparent;
  overflow: hidden;
}

.work-section {
  width: 100%;
  display: flex;
  gap: 6px;
  box-sizing: border-box;
  overflow: hidden;
}

.work-top-header {
  height: 10%;
}

.work-main-section {
  height: 100%;
  flex: 1;
}

.work-col {
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.work-col-1-3 {
  width: calc((100% - 12px) / 3);
}

.work-left-col, .work-middle-col, .work-right-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-card-1-3 {
  height: calc((100% - 12px) / 3);
}

.work-card-2-3 {
  height: calc(2 * ((100% - 12px) / 3) + 6px);
}

.work-card {
  width: 100%;
  background-color: rgba(15, 52, 96, 0.1);
  border: 1px solid rgba(26, 80, 139, 0.3);
  border-radius: 8px;
  padding: 2px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #e0e6ff;
  backdrop-filter: blur(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-height: 0;
}

.full-card {
  width: 100%;
  height: 100%;
}

.work-card:hover {
  box-shadow: 0 4px 12px rgba(60, 156, 255, 0.2);
  border-color: rgba(60, 156, 255, 0.6);
  transition: all 0.3s ease;
}

.work-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  letter-spacing: 1px;
  background: #3c9cff;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

.work-card p {
  font-size: 13px;
  opacity: 0.75;
  color: #b4c7e7;
  text-align: center;
  line-height: 1.5;
}

.work-left-sidebar {
  width: 15%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: transparent;
}

.menu-title {
  height: 10%;
  background: rgba(15, 52, 96, 0.1);
  border: 1px solid rgba(26, 80, 139, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e0e6ff;
  backdrop-filter: blur(2px);
}

.menu-title h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 1px;
  background: #3c9cff;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

.menu-list {
  height: 90%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 52, 96, 0.1);
  border: 1px solid rgba(26, 80, 139, 0.3);
  border-radius: 8px;
  color: #e0e6ff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.menu-item.active {
  border-color: rgba(60, 156, 255, 0.6);
  box-shadow: 0 4px 12px rgba(60, 156, 255, 0.2);
  background: rgba(60, 156, 255, 0.1);
}

/* 你原来的媒体查询我完全不动 */
@media (max-width: 1600px) {
  .work-layout-container {
    padding: 6px;
    gap: 4px;
  }
  .work-section {
    gap: 4px;
  }
  .work-col-1-3 {
    width: calc((100% - 8px) / 3);
  }
  .work-card-1-3 {
    height: calc((100% - 8px) / 3);
  }
  .work-card-2-3 {
    height: calc(2 * ((100% - 8px) / 3) + 4px);
  }
  .work-card {
    padding: 10px;
  }
  .work-card h3 {
    font-size: 14px;
  }
  .work-card p {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .work-layout-container {
    flex-direction: column;
    height: auto;
    min-height: 100%;
    padding: 6px;
    gap: 6px;
    overflow-y: auto;
  }
  .work-section {
    flex-direction: column;
    height: auto !important;
    min-height: 120px;
    gap: 6px;
  }
  .work-col-1-3 {
    width: 100%;
    height: auto;
  }
  .work-left-col, .work-middle-col, .work-right-col {
    flex-direction: column;
    height: auto;
  }
  .work-card-1-3, .work-card-2-3 {
    height: 120px;
    margin-bottom: 6px;
  }
  .work-card {
    padding: 8px;
  }
}

@media (max-height: 900px) {
  .work-layout-container {
    padding: 6px;
    gap: 4px;
  }
  .work-section {
    gap: 4px;
  }
  .work-card {
    padding: 8px;
  }
  .work-card h3 {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .work-card p {
    font-size: 12px;
  }
}
</style>