/* Page skeleton: the app grid, the sidebar column, the canvas, the shared grid
   utilities and the canvas transition. Where things sit, never how they look. */

/* Layout container */
.app {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static !important;
    height: auto !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--border);
    max-height: none;
  }
}
/* Views that render without the what-if sidebar. */
.app-solo { grid-template-columns: 1fr; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: background-color 0.25s ease, border-color 0.25s ease;
  z-index: 20;
}

.canvas {
  position: relative;
  padding: 28px 36px 56px;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .canvas { padding: 18px 14px 40px; }
}

/* Grid utilities */
.grid-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 1280px) { .grid-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .grid-kpi { grid-template-columns: 1fr; } }

.grid-academic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 1100px) { .grid-academic { grid-template-columns: 1fr; } }

/* Transition effect for tabs / SKU changes */
.canvas-content {
  opacity: 1;
  filter: none;
  transform: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
