/* ============================================================
   Analytics mode — SPA overlay layout
   Scoped to #analytics-view so nothing leaks to other modes.
   ============================================================ */

/* Full-screen overlay: covers the entire area below the header + topbar
   (left panel is hidden by JS, so we go edge-to-edge). */
#analytics-view {
  position: fixed;
  top: calc(var(--header-height, 90px) + var(--topbar-height, 44px));
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--p-surface-2, #f8fafc);
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#analytics-view.hidden {
  display: none !important;
}

/* ── Pinned toolbar ── */
.adash-spa-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 20px;
  background: var(--p-surface, #fff);
  border-bottom: 1px solid var(--p-border, #e2e8f0);
  flex-shrink: 0;
}

.adash-spa-title {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--p-text, #0f172a);
}

.adash-spa-subtitle {
  margin: 2px 0 0;
  font-size: var(--fs-xs);
  color: var(--p-text-muted, #64748b);
}

.adash-spa-toolbar-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Scrollable body ── */
.adash-spa-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px 40px;
}

/* ── Body class override: hide left panel chrome in analytics mode ── */
body.analytics-mode #bldr-stage-strip { display: none !important; }
