/* Read-only document fields: compact rows, without a separate card per value.
   Scope stays inside detail drawers and the dashboard's existing finance fields.
   Group overview surfaces, task cards, workflow nodes and print views keep their
   own presentation. The interaction sheet has its own workorder field styles. */
#dbody,
#view .card > .detailgrid {
  --document-label-width: 112px;
  --document-field-gap: 8px 24px;
}

#dbody .detailgrid,
#view .card > .detailgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 288px), 1fr));
  gap: var(--document-field-gap);
  align-items: start;
  padding: 16px 20px;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#dbody .detailgrid > .detailcell,
#view .card > .detailgrid > .detailcell {
  display: grid;
  grid-template-columns: var(--document-label-width) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 4px 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none;
}

#dbody .detailgrid > .detailcell > small,
#view .card > .detailgrid > .detailcell > small {
  display: block;
  min-width: 0;
  margin: 0;
  color: #6b7c92;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
  white-space: normal;
  overflow-wrap: anywhere;
}

#dbody .detailgrid > .detailcell > b,
#view .card > .detailgrid > .detailcell > b {
  display: block;
  min-width: 0;
  color: #314865;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

/* An embedded grid inherits its section's gutters instead of adding a second
   inset. Preserve each customer's/lead's existing gray overview container. */
#dbody :is(.entity-reminder-detail, .commission-panel, .customer-tab-section) .detailgrid {
  padding-right: 0;
  padding-left: 0;
}

#dbody .detailgrid.project-channel-grid {
  margin: 0;
}

@media (max-width: 600px) {
  #dbody .detailgrid,
  #view .card > .detailgrid {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 16px;
  }

  #dbody :is(.entity-reminder-detail, .commission-panel, .customer-tab-section) .detailgrid {
    padding-right: 0;
    padding-left: 0;
  }
}

@media (max-width: 420px) {
  #dbody,
  #view .card > .detailgrid {
    --document-label-width: 96px;
    --document-field-gap: 6px 16px;
  }
}
