/* Status and quantity columns: explicit hooks preserve names, dates, amounts and form labels.
   Positional selectors are scoped to their specific grids and skip merged/empty-state cells.
   These rules also apply to dynamically added rows and printed reports. */
:is(
    .elmo-center-column,
    #assets-editor .stock-table > thead > tr > th:nth-child(2),
    #assets-editor .stock-table > tbody > tr > td:nth-child(2):not([colspan]),
    #assets-editor .stock-table > thead > tr > th:nth-child(6),
    #assets-editor .stock-table > tbody > tr > td:nth-child(6):not([colspan]),
    .elmo-package-quantities > thead > tr > th:nth-child(3),
    .elmo-package-quantities > thead > tr > th:nth-child(4),
    .elmo-package-quantities > tbody > tr > td:nth-child(3):not([colspan]),
    .elmo-package-quantities > tbody > tr > td:nth-child(4):not([colspan]),
    .elmo-qty-second > thead > tr > th:nth-child(2),
    .elmo-qty-second > tbody > tr > td:nth-child(2):not([colspan]),
    .elmo-loading-quantities .stock-table > thead > tr > th:nth-child(n+2),
    .elmo-loading-quantities .stock-table > tbody > tr > td:nth-child(n+2):not([colspan]),
    .value-section > table > thead > .column-headings > th:nth-child(2),
    .value-section > table > tbody > tr > td:nth-child(2):not([colspan]),
    .vehicles-table > .table-header > div:nth-child(6),
    .vehicles-table > .table-row > div:nth-child(6),
    .locations-grid-header > div:nth-child(4),
    .locations-grid-row > div:nth-child(4),
    .crew-grid-header > div:nth-child(3),
    .crew-grid-row > div:nth-child(3),
    .tag-grid-header > div:nth-child(8),
    .tag-grid-row > div:nth-child(8),
    .package-members-header > div:nth-child(3),
    .package-members > .package-member-row > div:nth-child(3),
    .client-profile-page .data-table > .table-header > div:nth-child(4),
    .client-profile-page .data-table > .table-row > div:nth-child(4),
    .order-group-heading > span:nth-child(2),
    .order-group > summary > span:nth-child(2),
    .inventory-summary-group > summary > span:nth-child(2)
) {
    text-align:center !important;
    justify-content:center !important;
}

/* Center values inside editable quantity cells as well as the controls themselves. */
:is(
    .elmo-center-column,
    #assets-editor .stock-table > thead > tr > th:nth-child(2),
    #assets-editor .stock-table > tbody > tr > td:nth-child(2):not([colspan]),
    #assets-editor .stock-table > thead > tr > th:nth-child(6),
    #assets-editor .stock-table > tbody > tr > td:nth-child(6):not([colspan]),
    .elmo-package-quantities > thead > tr > th:nth-child(3),
    .elmo-package-quantities > thead > tr > th:nth-child(4),
    .elmo-package-quantities > tbody > tr > td:nth-child(3):not([colspan]),
    .elmo-package-quantities > tbody > tr > td:nth-child(4):not([colspan]),
    .elmo-qty-second > thead > tr > th:nth-child(2),
    .elmo-qty-second > tbody > tr > td:nth-child(2):not([colspan]),
    .elmo-loading-quantities .stock-table > thead > tr > th:nth-child(n+2),
    .elmo-loading-quantities .stock-table > tbody > tr > td:nth-child(n+2):not([colspan]),
    .value-section > table > thead > .column-headings > th:nth-child(2),
    .value-section > table > tbody > tr > td:nth-child(2):not([colspan]),
    .vehicles-table > .table-header > div:nth-child(6),
    .vehicles-table > .table-row > div:nth-child(6),
    .locations-grid-header > div:nth-child(4),
    .locations-grid-row > div:nth-child(4),
    .crew-grid-header > div:nth-child(3),
    .crew-grid-row > div:nth-child(3),
    .tag-grid-header > div:nth-child(8),
    .tag-grid-row > div:nth-child(8),
    .package-members-header > div:nth-child(3),
    .package-members > .package-member-row > div:nth-child(3),
    .client-profile-page .data-table > .table-header > div:nth-child(4),
    .client-profile-page .data-table > .table-row > div:nth-child(4),
    .order-group-heading > span:nth-child(2),
    .order-group > summary > span:nth-child(2),
    .inventory-summary-group > summary > span:nth-child(2)
) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    text-align:center !important;
    margin-left:auto;
    margin-right:auto;
}
