/* =====================================================
   NextGEN TVETMARA v18 - Industry Insights Compact Fix
   Purpose: override generic dashboard action-card CSS that made
   the Industry Insights boxes too tall and too far apart.
   ===================================================== */

/* Main purple Industry Insights panel */
.industry-insights-compact,
#dashboard .industry-insights-compact {
  max-width: 1040px !important;
  width: min(1040px, calc(100% - 48px)) !important;
  margin: 16px auto 22px auto !important;
  padding: 18px 22px !important;
  border-radius: 20px !important;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.16) !important;
}

/* Title row */
.industry-insights-compact > .flex,
#dashboard .industry-insights-compact > .flex {
  margin-bottom: 12px !important;
  align-items: center !important;
}

.industry-insights-compact h4,
#dashboard .industry-insights-compact h4 {
  font-size: 1.2rem !important;
  line-height: 1.2 !important;
}

/* Grid inside purple panel */
.industry-insights-compact .grid,
#dashboard .industry-insights-compact .grid,
#dashboard .industry-insights-compact .grid.md\:grid-cols-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch !important;
}

/* Stat boxes: override v14 generic dashboard .grid > div min-height:232px */
.industry-insights-compact .grid > div,
#dashboard .industry-insights-compact .grid > div,
#dashboard .industry-insights-compact .grid.md\:grid-cols-3 > div {
  min-height: 92px !important;
  height: auto !important;
  max-height: none !important;
  padding: 14px 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.52) !important;
  border-radius: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.industry-insights-compact #salaryRange,
.industry-insights-compact #jobGrowth,
.industry-insights-compact #topEmployers,
#dashboard .industry-insights-compact #salaryRange,
#dashboard .industry-insights-compact #jobGrowth,
#dashboard .industry-insights-compact #topEmployers {
  font-size: clamp(1.35rem, 2.15vw, 2rem) !important;
  line-height: 1 !important;
  margin: 0 !important;
  letter-spacing: -0.02em !important;
}

.industry-insights-compact .text-sm,
#dashboard .industry-insights-compact .text-sm {
  font-size: 0.86rem !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

/* Reduce vertical gap between Career Opportunities and Industry Insights */
#dashboard .industry-insights-compact {
  transform: translateY(-4px) !important;
}

@media (max-width: 900px) {
  .industry-insights-compact,
  #dashboard .industry-insights-compact {
    width: calc(100% - 28px) !important;
    padding: 16px !important;
    margin-top: 12px !important;
  }

  .industry-insights-compact .grid,
  #dashboard .industry-insights-compact .grid,
  #dashboard .industry-insights-compact .grid.md\:grid-cols-3 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .industry-insights-compact .grid > div,
  #dashboard .industry-insights-compact .grid > div,
  #dashboard .industry-insights-compact .grid.md\:grid-cols-3 > div {
    min-height: 78px !important;
    padding: 12px !important;
  }
}
