#oeuk-energy-dashboard {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* Tabs */
.tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.tab-btn {
  padding: 6px 12px;
  border: 1px solid #0077b6;
  background: #fff;
  color: #0077b6;
  cursor: pointer;
  border-radius: 4px;
}
.tab-btn.active {
  background: #0077b6;
  color: #fff;
}

/* Tab content with fixed height */
.tab-content {
  display: none;
  flex-direction: column;
  height: 75vh;        /* occupy 75% of viewport height */
}
.tab-content.active {
  display: flex;       /* show active tab as flex container */
}

/* Metrics */
.metrics {
  display: flex;
  justify-content: space-around;
  margin: 10px 0;
  padding: 10px;
  background: #eef6fb;
  border-radius: 6px;
  flex-shrink: 0;      /* metrics stays visible at top */
}

/* Scrollable project/field list */
.scroll-container {
  flex: 1;             /* take remaining space in tab */
  overflow-y: auto;    /* enable vertical scroll */
  min-height: 0;       /* critical: allow flexbox child to shrink */
  padding-right: 5px;  /* prevent scrollbar overlap */
}

/* Cards */
ul.project-list { list-style: none; padding: 0; margin: 0; }
.project-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin: 6px 0;
  background: #fafafa;
}
.project-card .card-header {
  padding: 8px 10px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}
.project-card .card-body { padding: 8px 10px; display: none; }

/* Info popup */
.info-popup {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
}
.info-content {
  background: #fff;
  margin: 8% auto;
  padding: 20px;
  border-radius: 8px;
  width: 60%;
}
#close-info { float: right; font-size: 20px; cursor: pointer; }