/* Insights module layout. Every selector starts with .insights (docs/MODULES.md section 7). Built
   on the core panel, table, field, btn and badge classes; big tap targets for phones. */
.insights-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}
.insights-controls .field {
  margin: 0;
  min-width: 150px;
}
.insights-controls p {
  flex-basis: 100%;
  margin: 0;
}
.insights-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
  align-items: center;
}
.insights-actions select,
.insights-views {
  min-height: 40px;
  max-width: 220px;
}
.insights-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.insights-scope {
  margin: 0 0 14px;
  color: #56534D;
}
.insights-updating {
  font-size: 12px;
  color: #795600;
  margin: 0 0 10px;
}
.insights-muted {
  color: #666157;
  font-size: 12px;
}
.insights-section .panel-head small {
  display: block;
  color: #666157;
  font-size: 12px;
  margin-top: 2px;
}
.insights-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.insights-kpi {
  border: 1px solid #DED9CF;
  border-left: 4px solid #CEC5B6;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  min-width: 0;
}
.insights-kpi h3 {
  font-size: 12px;
  font-weight: 650;
  color: #56534D;
  margin: 0;
}
.insights-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.insights-kpi-value {
  display: block;
  background: none;
  border: 0;
  padding: 4px 0;
  min-height: 44px;
  font-size: 26px;
  font-weight: 650;
  color: #181818;
  text-align: left;
  text-decoration: underline dotted #9B9386;
  text-underline-offset: 5px;
}
.insights-kpi-value:hover {
  text-decoration-color: #181818;
}
.insights-kpi-sub,
.insights-kpi-status {
  font-size: 11px;
  color: #666157;
  margin: 2px 0 0;
}
.insights-kpi-na p {
  font-size: 12px;
  color: #666157;
  margin: 8px 0 0;
}
.insights-light {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #CEC5B6;
  flex: none;
}
.insights-st-green {
  border-left-color: #2f855a;
}
.insights-st-amber {
  border-left-color: #AA7A02;
}
.insights-st-red {
  border-left-color: #DBB363;
}
.insights-st-green .insights-light {
  background: #2f855a;
}
.insights-st-amber .insights-light {
  background: #AA7A02;
}
.insights-st-red .insights-light {
  background: #DBB363;
}
.insights-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  border: 0;
}
.insights-table {
  font-size: 12px;
}
.insights-table caption {
  text-align: left;
  font-weight: 650;
  padding: 10px 0;
}
.insights-cell {
  background: none;
  border: 0;
  padding: 6px 4px;
  min-height: 32px;
  color: #181818;
  text-decoration: underline dotted #9B9386;
  text-underline-offset: 4px;
  font: inherit;
}
.insights-rowactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.insights-detail {
  max-width: 420px;
  overflow-wrap: anywhere;
  font-size: 11px;
}
.insights-heatcells summary {
  cursor: pointer;
  font-size: 12px;
  padding: 8px 0;
}
.insights-heatcells p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.insights-defs summary {
  padding: 16px 23px;
  cursor: pointer;
  font-weight: 650;
}
.insights-defs dl > div {
  margin-bottom: 12px;
}
.insights-defs dt {
  font-weight: 650;
}
.insights-defs dd {
  margin: 2px 0 0;
  color: #56534D;
}
.insights-formula {
  font-style: italic;
}
.insights-dialog {
  max-width: 980px;
}
.insights-dialog .dialog-body {
  overflow: auto;
}
.insights-checks {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
  max-height: 260px;
  overflow: auto;
}
.insights-checks legend {
  font-weight: 650;
  margin-bottom: 6px;
}
.insights-checks .check {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
}
.insights-registers .row {
  align-items: center;
}
.insights-registers .row-main small {
  display: block;
}
.insights-summary {
  margin-bottom: 14px;
}
@media (max-width: 640px) {
  .insights-controls .field {
    flex: 1 1 140px;
    min-width: 0;
  }
  .insights-actions {
    margin-left: 0;
  }
  .insights-kpis {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  .insights-kpi-value {
    font-size: 22px;
  }
}
