/* Monetary table columns share one scan-friendly alignment contract. */
.app-main table :is(th, td):is(.money-column, .document-column-money),
.app-main table thead th:is(.money-column, .document-column-money) {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.app-main table th:is(.money-column, .document-column-money) .sortable {
    width: 100%;
    justify-content: flex-end;
}

/* Count columns align their heading, sort action, placeholder, and value to one edge. */
.app-main table :is(th, td).document-column-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.app-main table th.document-column-number .sortable {
    width: 100%;
    justify-content: flex-end;
}

.app-main table .column-filters th.document-column-number .column-no-filter {
    text-align: right;
}

/* Action columns hug their controls and share the cell's right edge in every column order. */
.app-main table :is(th, td).action-column,
.app-main table thead th.action-column {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.app-main table .column-filters th.action-column .column-no-filter {
    text-align: right;
}

/* Status table columns share one fixed-width and centered presentation contract. */
.app-main {
    --list-status-column-width: 156px;
    --list-status-content-width: var(--status-pill-width);
}

.app-main table col.status-column {
    width: var(--list-status-column-width);
}

.app-main table :is(th, td):is(.status-column, .document-column-status),
.app-main table thead th:is(.status-column, .document-column-status) {
    box-sizing: border-box;
    width: var(--list-status-column-width);
    min-width: var(--list-status-column-width);
    max-width: var(--list-status-column-width);
    text-align: center;
}

.app-main table th:is(.status-column, .document-column-status) > :is(.sortable, .document-column-heading) {
    box-sizing: border-box;
    width: var(--list-status-content-width);
    margin-inline: auto;
    justify-content: center;
}

.app-main table th:is(.status-column, .document-column-status) :is(select, .status-filter-trigger) {
    display: block;
    box-sizing: border-box;
    width: var(--list-status-content-width);
    min-width: var(--list-status-content-width);
    margin-inline: auto;
    text-align: center;
    text-align-last: center;
}

/* Grid-based list rows consume the same status widths through explicit wrappers. */
.app-main .list-status-column {
    box-sizing: border-box;
    width: var(--list-status-column-width);
    min-width: var(--list-status-column-width);
    max-width: var(--list-status-column-width);
    justify-self: center;
    text-align: center;
}
