/**
 * DASHBOARD PAGE - Fixed CLS (No Content Cutoff)
 * Reserves space WITHOUT cutting off content
 */

/* ============================================
   CRITICAL: Footer - Reserve Space
   ============================================ */

footer {
  min-height: 500px !important;
}

footer.loaded {
  min-height: 0 !important;
}

/* ============================================
   Dashboard Stats - Reserve Space Only
   NO max-height (was cutting content)
   ============================================ */

#dashboard-stats {
  min-height: 1800px !important;
  /* REMOVED: max-height (was cutting content) */
}

#dashboard-stats.loaded {
  min-height: 0 !important;
}

#dashboard-stats .container {
  min-height: 1700px !important;
}

#dashboard-stats .container.loaded {
  min-height: 0 !important;
}

/* ============================================
   Activity List - Reserve Space Only
   ============================================ */

#activityList,
.activity-list {
  min-height: 700px !important;
  /* REMOVED: max-height */
}

#activityList.loaded,
.activity-list.loaded {
  min-height: 0 !important;
}

/* ============================================
   Workspace - Reserve Space Only
   ============================================ */

.op-workspace {
  min-height: 1400px !important;
  /* REMOVED: max-height */
}

.op-workspace.loaded {
  min-height: 0 !important;
}

.op-workspace-left {
  min-height: 1100px !important;
}

.op-workspace-left.loaded {
  min-height: 0 !important;
}

.op-main-card,
.op-activity-card {
  min-height: 800px !important;
}

.op-main-card.loaded,
.op-activity-card.loaded {
  min-height: 0 !important;
}

.activity-section {
  min-height: 750px !important;
}

.activity-section.loaded {
  min-height: 0 !important;
}

/* ============================================
   Navigation
   ============================================ */

nav .container.nav-content,
nav .container {
  height: 64px;
  min-height: 64px;
}

/* ============================================
   Activity Filters
   ============================================ */

.activity-actions {
  min-height: 50px;
}

.activity-filters {
  min-height: 45px;
}

.activity-filter-btn {
  min-height: 40px;
}

/* ============================================
   Activity Items
   ============================================ */

.activity-item {
  min-height: 100px;
  contain: layout;
}

/* ============================================
   Generator
   ============================================ */

#generator {
  min-height: 450px;
}

#generator.loaded {
  min-height: 0;
}

.generator-card {
  min-height: 600px;
}

.generator-card.loaded {
  min-height: 0;
}

/* ============================================
   Stat Cards
   ============================================ */

.stat-grid {
  min-height: 350px;
}

.stat-grid.loaded {
  min-height: 0;
}

.stat-card {
  min-height: 130px;
  contain: layout;
}

/* ============================================
   Body - Remove Flexbox
   (was causing collapse)
   ============================================ */

body {
  min-height: 100vh;
  /* REMOVED: display: flex, flex-direction */
}

/* ============================================
   Mobile
   ============================================ */

@media (max-width: 768px) {
  nav .container {
    height: 56px;
  }
  
  footer {
    min-height: 350px !important;
  }
  
  #dashboard-stats {
    min-height: 1400px !important;
  }
  
  #activityList {
    min-height: 550px !important;
  }
  
  .op-workspace {
    min-height: 1100px !important;
  }
}

/* ============================================
   Performance
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.op-workspace,
#activityList,
.stat-grid {
  contain: layout style;
}
