/* ==========================================================
   DASHBOARD MODE — layout + bottom panels
   ========================================================== */

#main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#dash-bottom {
  display: none;
  flex-shrink: 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-base);
  min-height: 0;
}

body.dashboard-mode #map-area {
  flex: 0 0 50%;
  min-height: 0;
}

body.dashboard-mode #dash-bottom {
  display: flex;
  flex: 0 0 50%;
  min-height: 0;
}

/* ── Bars panel (left 60%) ── */
#dash-bars {
  flex: 0 0 60%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border-subtle);
}

/* ── Pie panel (right 40%) ── */
#dash-pie {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
}

/* ── Pie panel internals ── */
.dp-header {
  flex-shrink: 0;
  padding: 8px 12px 6px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dp-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dp-source {
  overflow: hidden;
  color: rgba(249,250,251,.36);
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dp-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(249,250,251,.6);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.dp-scope-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

.dp-body {
  flex: 1;
  min-height: 0;
  position: relative;
  padding: 6px;
}

.dp-body canvas {
  width: 100% !important;
  height: 100% !important;
}

.dp-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255,255,255,.3);
}

/* ── Narrow viewport: stack bars above pie ── */
@media (max-width: 1200px) {
  #dash-bottom {
    flex-direction: column;
  }

  #dash-bars {
    flex: 0 0 55%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  #dash-pie {
    flex: 1;
  }
}
