.form-grid {
  gap: 1rem;
  align-items: start;
}

.form-grid > .mb-4,
.form-grid > label {
  margin-bottom: 0 !important;
}

.form-grid > label:not(.check) {
  display: flex;
  flex-direction: column;
  line-height: 1.25rem;
}

.form-grid > label:not(.check) > input,
.form-grid > label:not(.check) > select,
.form-grid > label:not(.check) > textarea {
  margin-top: .375rem;
}

.form-grid > .mb-4 > .form-label {
  display: block;
  line-height: 1.25rem;
  margin-bottom: .375rem;
}

.media-picker-grid .media-item {
  padding: .5rem;
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-paper-bg);
}

.media-picker-grid .media-item img {
  height: 9rem;
}

.table > tbody > tr:last-child > * {
  border-bottom: 1px solid var(--bs-border-color) !important;
}

.js-paged-table .table > thead > tr,
.js-paged-table > .card-footer {
  height: 3.5rem;
}

.js-paged-table > .card-footer {
  min-height: 3.5rem;
  padding: .5rem 1.5rem;
}

/* Every final action column is right aligned, including wrapped flex groups. */
.js-paged-table .table > thead > tr > th:last-child,
.js-paged-table .table > tbody > tr > td:last-child:has(button),
.js-paged-table .table > tbody > tr > td:last-child:has(.btn),
.js-paged-table .table > tbody > tr > td:last-child:has(select) {
  text-align: right !important;
}

.js-paged-table .table > tbody > tr > td:last-child > .d-flex,
.js-paged-table .table > tbody > tr > td:last-child > .btn-group,
.js-paged-table .table > tbody > tr > td:last-child > .table-actions {
  justify-content: flex-end !important;
}
