/* ================================
   Layout: equal heights in rows
   ================================ */
.metrics-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.metrics-row > [class*='col-'] {
  display: flex;
}
.metrics-row > [class*='col-'] > .metric-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.metrics-row .metric-wrap .well {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ================================
   Fixed metric content height
   ================================ */
.metric-body {
  min-height: 420px; /* tweak 360–480 as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding-top: 10px; /* add space above plots */
}

.metric-body > .shiny-spinner-output-container,
.metric-body > .shiny-html-output,
.metric-body > .html-widget {
  width: 100%;
}

/* Prevent horizontal overflow from htmlwidgets */
.html-widget {
  max-width: 100% !important;
}

/* Keep H3 margin tight in wells */
.well .mb-0 {
  margin-bottom: 0;
}

/* ================================
   Fixed-height header for metric boxes
   ================================ */
.metric-header {
  min-height: 86px; /* keeps title+subtitle area consistent */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-bottom: 6px;
}
.metric-title {
  margin: 0;
  line-height: 1.15;
  text-align: center;
}
.metric-subtitle {
  margin: 4px 0 0 0;
  text-align: center;
}
.metric-subtitle h4 {
  margin: 0;
}

/* ================================
   Empty state
   ================================ */
.tt-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  min-height: 410px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.03);
  width: 100%;
}
.tt-empty-state .tt-wrap {
  max-width: 520px;
}
.tt-empty-state .tt-icon {
  font-size: 28px;
  color: #4C626C;
  opacity: 0.8;
  margin-bottom: 8px;
}
.tt-empty-state .tt-title {
  font-weight: 700;
  color: #303A3E;
  margin: 0 0 4px 0;
  font-size: 18px;
}
.tt-empty-state .tt-sub {
  color: #4C626C;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ================================
   Alle-tab sticky filter bar
   ================================ */
.compass-filters {
  position: sticky;
  top: 60px;
  z-index: 5;
  background: rgba(191, 191, 191, 0.9);
  padding: 8px 12px;
  margin: 0 0 14px 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
}
.compass-filters .checkbox-inline,
.compass-filters .shiny-options-group > label.checkbox {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
}
.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-title {
  font-weight: 700;
  color: #303A3E;
}
.filter-toggle {
  opacity: 0.9;
  white-space: nowrap;
}
