/* LMS Charts (reports & dashboards) */
.lms-charts-grid {
  width: 100%;
}
.lms-chart-card {
  min-width: 0;
}
.lms-chart-wrap {
  position: relative;
  width: 100%;
}
.lms-chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.lms-chart-main {
  width: 100%;
}
.lms-chart-main .lms-chart-wrap {
  min-height: 280px;
}

/* Level report filter panel — wide 2-column grid, no scroll */
#levelReportFilterPanel.lms-filter-panel {
  width: min(42rem, calc(100vw - 1.5rem));
  min-width: min(22rem, calc(100vw - 1.5rem));
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible;
}

#levelReportFilterPanel .lms-filter-panel-heading {
  padding: 0.85rem 1.15rem;
  font-size: 1rem;
}

#levelReportFilterPanel .lms-filter-body {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

#levelReportFilterPanel .lms-filter-actions {
  padding: 0.85rem 1.15rem 1rem;
}

#levelReportFilterPanel .lms-filter-actions .cui-btn {
  min-height: 2.25rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
}

.lms-level-report-filters {
  padding: 0.85rem 1.15rem 0.65rem;
}

.lms-level-report-filters__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  align-items: end;
}

.lms-level-report-filters__section {
  grid-column: 1 / -1;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cui-muted);
  margin: 0.15rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid var(--cui-border);
}

.lms-level-report-filters__section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.lms-level-report-filters__section-hint {
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--cui-muted);
  margin-left: 0.35rem;
}

.lms-level-report-filters__field label,
.lms-level-report-filters label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cui-text);
  margin-bottom: 0.35rem;
}

.lms-level-report-filters__note {
  display: flex;
  align-items: flex-end;
  min-height: 2.25rem;
  padding-bottom: 0.55rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--cui-muted);
}

.lms-level-report-filters .cui-input,
.lms-level-report-filters select.cui-input,
.lms-level-report-filters input[type="month"].cui-input,
.lms-level-report-filters input[type="date"].cui-input {
  width: 100%;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
}

@media (max-width: 540px) {
  #levelReportFilterPanel.lms-filter-panel {
    width: calc(100vw - 1rem);
  }

  .lms-level-report-filters__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Monthly report — sales pipeline funnel */
.lms-monthly-pipeline-funnel {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.35rem 0.5rem;
}
.lms-monthly-pipeline-step {
  flex: 1 1 8.5rem;
  min-width: 7.5rem;
  max-width: 11rem;
  padding: 0.85rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--cui-border, rgba(148, 163, 184, 0.25));
  background: var(--cui-surface-2, rgba(30, 41, 59, 0.45));
  text-align: center;
}
.lms-monthly-pipeline-step__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #93c5fd;
}
.lms-monthly-pipeline-step__value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.35rem;
  color: var(--cui-text, #f8fafc);
  font-variant-numeric: tabular-nums;
}
.lms-monthly-pipeline-step__hint {
  font-size: 0.6875rem;
  color: var(--cui-muted, #94a3b8);
  margin-top: 0.25rem;
  line-height: 1.3;
}
.lms-monthly-pipeline-step__rate {
  font-size: 0.625rem;
  font-weight: 600;
  color: #34d399;
  margin-top: 0.35rem;
}
.lms-monthly-pipeline-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.55);
  font-size: 0.75rem;
  padding: 0 0.15rem;
  flex: 0 0 auto;
  align-self: center;
}
@media (max-width: 720px) {
  .lms-monthly-pipeline-arrow {
    display: none;
  }
  .lms-monthly-pipeline-funnel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .lms-monthly-pipeline-step {
    max-width: none;
  }
}
