.am-boundary-panel {
	border-left: 4px solid var(--am-orange-500);
}

.am-boundary-panel p:last-child {
	color: var(--am-text-muted);
	margin-bottom: 0;
}

.am-application-filters {
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
	margin-bottom: var(--am-space-5);
}

.am-application-filters .is-active {
	background: var(--am-navy-900);
	border-color: var(--am-navy-900);
	color: var(--am-white);
}

.am-application-list {
	display: grid;
	gap: var(--am-space-4);
	list-style: none;
	margin: 0;
	padding: 0;
}

.am-application-list > li {
	min-width: 0;
}

.am-application-card {
	background: var(--am-white);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	min-width: 0;
	padding: var(--am-space-5);
}

.am-application-card > header {
	align-items: start;
	display: flex;
	gap: var(--am-space-4);
	justify-content: space-between;
}

.am-application-card h3,
.am-application-card__reference {
	margin: 0;
}

.am-application-card__reference {
	color: var(--am-text-muted);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.72rem;
	overflow-wrap: anywhere;
}

.am-application-facts {
	display: grid;
	gap: var(--am-space-4);
	grid-template-columns: repeat(5, minmax(0, 1fr));
	margin: var(--am-space-5) 0;
}

.am-application-facts div {
	min-width: 0;
}

.am-application-facts dt {
	color: var(--am-text-muted);
	font-size: 0.78rem;
}

.am-application-facts dd {
	font-weight: 700;
	margin: var(--am-space-1) 0 0;
	overflow-wrap: anywhere;
}

.am-application-actions {
	align-items: center;
	border-top: 1px solid var(--am-border);
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
	padding-top: var(--am-space-4);
}

.am-application-actions form {
	margin: 0;
}

.am-application-card__closed {
	border-top: 1px solid var(--am-border);
	color: var(--am-text-muted);
	margin: var(--am-space-4) 0 0;
	padding-top: var(--am-space-4);
}

.am-activation-panel {
	border-left: 4px solid var(--am-success);
}

.am-application-queue .am-badge--success {
	background: color-mix(in srgb, var(--am-success) 12%, var(--am-white));
	color: var(--am-success);
}

.am-application-queue .am-badge--danger {
	background: color-mix(in srgb, var(--am-danger) 10%, var(--am-white));
	color: var(--am-danger);
}

.am-application-queue .am-badge--attention {
	background: var(--am-orange-100);
	color: var(--am-navy-900);
}

.am-copy-control {
	align-items: end;
	display: grid;
	gap: var(--am-space-2);
	grid-template-columns: minmax(0, 1fr) auto auto;
}

.am-copy-control label,
.am-copy-control [role="status"] {
	grid-column: 1 / -1;
}

.am-copy-control input {
	border: 1px solid var(--am-border-strong);
	border-radius: var(--am-radius-control);
	min-height: 2.75rem;
	min-width: 0;
	padding: var(--am-space-2) var(--am-space-3);
	width: 100%;
}

.am-table-scroll {
	overflow: auto;
	width: 100%;
}

.am-data-table {
	border-collapse: collapse;
	font-size: 0.82rem;
	width: 100%;
}

.am-data-table th,
.am-data-table td {
	border: 1px solid var(--am-border);
	padding: var(--am-space-3);
	text-align: left;
	vertical-align: middle;
}

.am-data-table thead th {
	background: var(--am-navy-900);
	color: var(--am-white);
	min-width: 9rem;
	position: sticky;
	top: 0;
}

@media (max-width: 50rem) {
	.am-application-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.am-copy-control {
		align-items: stretch;
		grid-template-columns: 1fr;
	}

	.am-copy-control label,
	.am-copy-control [role="status"] {
		grid-column: auto;
	}
}

@media (max-width: 30rem) {
	.am-application-card {
		padding: var(--am-space-4);
	}

	.am-application-card > header,
	.am-application-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.am-application-card > header .am-badge,
	.am-application-actions .am-button,
	.am-application-actions form {
		width: 100%;
	}

	.am-application-facts {
		grid-template-columns: 1fr;
	}
}

.am-application-queue .am-filter {
	margin-bottom: var(--am-space-4);
}

.am-application-queue .am-application-list {
	gap: var(--am-space-3);
}

.am-application-queue .am-application-card {
	border-radius: var(--am-radius-card);
	box-shadow: 0 2px 8px rgb(7 26 53 / 0.035);
	overflow: hidden;
	padding: 0;
}

.am-application-queue .am-application-card__overview {
	align-items: center;
	display: grid;
	gap: var(--am-space-4);
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) auto;
	padding: var(--am-space-4) var(--am-space-5);
}

.am-application-queue .am-application-card__identity {
	display: block;
	min-width: 0;
}

.am-application-queue .am-application-card__identity h3 {
	font-size: 1.05rem;
	line-height: 1.35;
}

.am-application-queue .am-application-card__contact {
	color: var(--am-text-muted);
	margin: var(--am-space-1) 0 0;
}

.am-application-queue .am-application-card__submitted,
.am-application-queue .am-application-card__status {
	min-width: 0;
}

.am-application-queue .am-application-card__label {
	color: var(--am-text-muted);
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.am-application-queue .am-application-card__submitted strong {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
}

.am-application-queue .am-application-card__status {
	justify-self: end;
}

.am-application-queue .am-application-card__disclosure {
	border-top: 1px solid var(--am-border);
}

.am-application-queue .am-application-card__disclosure summary {
	align-items: center;
	color: var(--am-navy-900);
	cursor: pointer;
	display: flex;
	font-size: 0.85rem;
	font-weight: 700;
	gap: var(--am-space-2);
	justify-content: space-between;
	list-style: none;
	min-height: 2.75rem;
	padding: var(--am-space-2) var(--am-space-5);
}

.am-application-queue .am-application-card__disclosure summary::-webkit-details-marker {
	display: none;
}

.am-application-queue .am-application-card__disclosure summary:hover,
.am-application-queue .am-application-card__disclosure[open] summary {
	background: var(--am-surface);
}

.am-application-queue .am-application-card__disclosure summary:focus-visible {
	outline: 3px solid var(--am-orange-500);
	outline-offset: -3px;
}

.am-application-queue .am-application-card__disclosure[open] summary .am-icon {
	transform: rotate(180deg);
}

.am-application-queue .am-application-card__detail-panel {
	border-top: 1px solid var(--am-border);
	padding: var(--am-space-4) var(--am-space-5);
}

.am-application-queue .am-application-facts {
	gap: var(--am-space-3) var(--am-space-5);
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0;
}

.am-application-queue .am-application-card__reference {
	margin: var(--am-space-4) 0 0;
}

.am-application-queue .am-application-card__reference code {
	font-size: inherit;
}

.am-application-queue .am-application-actions,
.am-application-queue .am-application-card__closed {
	margin-top: var(--am-space-4);
}

.am-application-queue .am-application-card__closed {
	color: var(--am-text-muted);
	font-size: 0.82rem;
}

.am-application-queue .am-application-actions .am-button {
	min-height: 2.75rem;
}

@media (max-width: 80rem) {
	.am-application-queue .am-application-card__overview {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.am-application-queue .am-application-card__submitted {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.am-application-queue .am-application-card__status {
		grid-column: 2;
		grid-row: 1;
	}
}

@media (max-width: 50rem) {
	.am-application-queue .am-application-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 30rem) {
	.am-application-queue .am-application-card__overview {
		gap: var(--am-space-2);
		grid-template-columns: minmax(0, 1fr);
		padding: var(--am-space-4);
	}

	.am-application-queue .am-application-card__status {
		grid-column: 1;
		grid-row: 2;
		justify-self: start;
	}

	.am-application-queue .am-application-card__submitted {
		grid-column: 1;
		grid-row: 3;
	}

	.am-application-queue .am-application-card__disclosure summary,
	.am-application-queue .am-application-card__detail-panel {
		padding-inline: var(--am-space-4);
	}

	.am-application-queue .am-application-facts {
		grid-template-columns: minmax(0, 1fr);
	}
}

.am-organization-directory__back {
	margin: 0 auto var(--am-space-4);
	max-width: 76rem;
}

.am-portal-shell--organizations .am-topbar {
	padding-inline: var(--am-space-6);
}

.am-organization-directory__back a {
	color: var(--am-orange-text);
	font-weight: 700;
}

.am-organization-search,
.am-organization-member-search {
	display: grid;
	gap: var(--am-space-2);
	margin-bottom: var(--am-space-4);
}

.am-organization-directory--list .am-filter {
	margin-bottom: var(--am-space-4);
}

.am-organization-directory--detail .am-organization-section-nav {
	background: var(--am-white);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
	padding: var(--am-space-3);
}

.am-organization-directory--detail .am-organization-detail {
	border-left: 4px solid var(--am-navy-900);
}

.am-organization-pricing {
	display: grid;
	gap: var(--am-space-4);
}

.am-organization-pricing__facts {
	display: grid;
	gap: var(--am-space-3);
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0;
}

.am-organization-pricing__facts > div {
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-control);
	min-width: 0;
	padding: var(--am-space-3);
}

.am-organization-pricing__facts dt {
	color: var(--am-text-muted);
	font-size: var(--am-text-sm);
}

.am-organization-pricing__facts dd {
	font-weight: 700;
	margin: var(--am-space-1) 0 0;
	overflow-wrap: anywhere;
}

.am-organization-pricing > .am-button {
	justify-self: start;
}

.am-organization-directory--detail .am-organization-settings {
	display: grid;
	gap: var(--am-space-4);
}

.am-organization-directory--detail .am-organization-settings__label {
	color: var(--am-text-muted);
	font-size: var(--am-text-sm);
	font-weight: 800;
	letter-spacing: 0.08em;
	margin: 0;
	text-transform: uppercase;
}

.am-organization-directory--detail [id^="organization-"],
.am-organization-directory--detail [id^="account-"],
.am-organization-directory--detail #partner-financial-settings {
	scroll-margin-top: calc(var(--am-topbar-height) + var(--am-space-4));
}

@media (max-width: 50rem) {
	.am-organization-directory--detail .am-organization-section-nav {
		display: none;
	}

	.am-organization-directory--detail .am-organization-section-selector {
		display: flex;
	}

	.am-organization-pricing__facts {
		grid-template-columns: minmax(0, 1fr);
	}
}

.am-organization-directory--list .am-organization-list-head,
.am-organization-directory--list .am-organization-card {
	display: grid;
	gap: var(--am-space-2);
	grid-template-columns: minmax(12rem, 1.6fr) 5rem 6rem minmax(12rem, 1.1fr) minmax(7rem, 0.7fr) 5.5rem;
}

.am-organization-directory--list .am-organization-list-head {
	align-items: center;
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card) var(--am-radius-card) 0 0;
	color: var(--am-text-muted);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	min-height: 3.25rem;
	padding: var(--am-space-2) var(--am-space-4);
	text-transform: uppercase;
}

.am-organization-directory--list .am-organization-list-head span:not(:first-child) {
	text-align: center;
}

.am-organization-directory--list .am-organization-list {
	gap: 0;
}

.am-organization-directory--list .am-organization-card {
	align-items: center;
	border-radius: 0;
	border-top: 0;
	min-height: 5.5rem;
	padding: var(--am-space-3) var(--am-space-4);
}

.am-organization-directory--list .am-organization-list > li:last-child .am-organization-card {
	border-radius: 0 0 var(--am-radius-card) var(--am-radius-card);
}

.am-organization-directory--list .am-organization-card > header {
	grid-column: 1;
	min-width: 0;
}

.am-organization-directory--list .am-organization-card h3 {
	font-size: 1rem;
	line-height: 1.35;
}

.am-organization-directory--list .am-organization-facts {
	align-items: center;
	gap: var(--am-space-2);
	grid-column: 2 / 5;
	grid-template-columns: 5rem 6rem minmax(12rem, 1fr);
	margin: 0;
}

.am-organization-directory--list .am-organization-facts > div {
	text-align: center;
}

.am-organization-directory--list .am-organization-facts dt,
.am-organization-directory--list .am-organization-card__mobile-label {
	display: none;
}

.am-organization-directory--list .am-organization-facts dd {
	margin: 0;
}

.am-organization-directory--list .am-organization-facts > div:last-child dd {
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: normal;
}

.am-organization-directory--list .am-organization-card__status {
	grid-column: 5;
	justify-self: center;
}

.am-organization-directory--list .am-organization-card > .am-button {
	grid-column: 6;
	justify-self: center;
	min-height: 2.75rem;
	padding-inline: var(--am-space-3);
	white-space: nowrap;
}

@media (max-width: 80rem) {
	.am-organization-directory--list .am-organization-list-head {
		display: none;
	}

	.am-organization-directory--list .am-organization-list {
		gap: var(--am-space-3);
	}

	.am-organization-directory--list .am-organization-card,
	.am-organization-directory--list .am-organization-list > li:last-child .am-organization-card {
		border: 1px solid var(--am-border);
		border-radius: var(--am-radius-card);
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.am-organization-directory--list .am-organization-card > header {
		grid-column: 1;
	}

	.am-organization-directory--list .am-organization-card__status {
		grid-column: 2;
		grid-row: 1;
	}

	.am-organization-directory--list .am-organization-facts {
		border-top: 1px solid var(--am-border);
		grid-column: 1 / -1;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		padding-top: var(--am-space-3);
	}

	.am-organization-directory--list .am-organization-facts > div {
		text-align: left;
	}

	.am-organization-directory--list .am-organization-facts dt {
		display: block;
	}

	.am-organization-directory--list .am-organization-card > .am-button {
		grid-column: 1 / -1;
		justify-self: start;
	}

	.am-organization-directory--list .am-organization-card__status {
		justify-self: end;
	}
}

@media (max-width: 30rem) {
	.am-organization-directory--list .am-organization-card,
	.am-organization-directory--list .am-organization-list > li:last-child .am-organization-card {
		grid-template-columns: minmax(0, 1fr);
	}

	.am-organization-directory--list .am-organization-card__status {
		grid-column: 1;
		grid-row: auto;
		justify-self: start;
	}

	.am-organization-directory--list .am-organization-card__mobile-label {
		color: var(--am-text-muted);
		display: block;
		font-size: 0.75rem;
	}

	.am-organization-directory--list .am-organization-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.am-organization-directory--list .am-organization-facts div:last-child {
		grid-column: 1 / -1;
	}

	.am-organization-directory--list .am-organization-card > .am-button {
		justify-self: stretch;
	}
}

.am-organization-search > label,
.am-organization-member-search > label {
	font-weight: 700;
}

.am-organization-search > input:not([type="hidden"]) {
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.am-organization-search > div,
.am-organization-member-search > div {
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
}

.am-organization-search input[type="search"],
.am-organization-member-search input[type="search"] {
	border: 1px solid var(--am-border-strong);
	border-radius: var(--am-radius-control);
	flex: 1 1 20rem;
	min-height: 2.75rem;
	min-width: 0;
	padding: var(--am-space-2) var(--am-space-3);
}

.am-organization-list,
.am-organization-sublist,
.am-organization-member-list {
	display: grid;
	gap: var(--am-space-4);
	list-style: none;
	margin: 0;
	padding: 0;
}

.am-organization-list > li,
.am-organization-sublist > li,
.am-organization-member-list > li {
	min-width: 0;
}

.am-organization-card,
.am-organization-subcard,
.am-organization-member-card {
	background: var(--am-white);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	min-width: 0;
	padding: var(--am-space-5);
}

.am-organization-card > header,
.am-organization-subcard > header,
.am-organization-member-card > header,
.am-organization-detail__header {
	align-items: start;
	display: flex;
	gap: var(--am-space-4);
	justify-content: space-between;
}

.am-organization-card h3,
.am-organization-subcard h3,
.am-organization-member-card h3,
.am-organization-detail h2 {
	margin: 0;
}

.am-organization-facts,
.am-organization-summary,
.am-organization-member-card dl {
	display: grid;
	gap: var(--am-space-4);
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: var(--am-space-5) 0;
}

.am-organization-facts div,
.am-organization-summary div,
.am-organization-member-card dl div {
	min-width: 0;
}

.am-organization-facts dt,
.am-organization-summary dt,
.am-organization-member-card dt {
	color: var(--am-text-muted);
	font-size: 0.78rem;
}

.am-organization-facts dd,
.am-organization-summary dd,
.am-organization-member-card dd {
	font-weight: 700;
	margin: var(--am-space-1) 0 0;
	overflow-wrap: anywhere;
}

.am-organization-actions,
.am-organization-member-actions {
	align-items: center;
	border-top: 1px solid var(--am-border);
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
	padding-top: var(--am-space-4);
}

.am-organization-actions form,
.am-organization-member-actions form {
	margin: 0;
}

.am-organization-view-only {
	border-top: 1px solid var(--am-border);
	color: var(--am-text-muted);
	margin: var(--am-space-4) 0 0;
	padding-top: var(--am-space-4);
}

.am-organization-subcard {
	background: var(--am-surface);
}

.am-organization-subcard address {
	display: grid;
	font-style: normal;
	margin-top: var(--am-space-3);
}

.am-organization-member-list {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.am-organization-member-card {
	display: flex;
	flex-direction: column;
}

.am-organization-member-card > header > div {
	display: grid;
	min-width: 0;
}

.am-organization-member-card a {
	overflow-wrap: anywhere;
}

.am-organization-member-card dl {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.am-organization-member-actions {
	margin-top: auto;
}

.am-organization-membership-note {
	margin-bottom: var(--am-space-5);
}

.am-organization-member-tools {
	align-items: end;
	display: grid;
	gap: var(--am-space-4);
	grid-template-columns: minmax(0, 1fr) auto;
	margin-bottom: var(--am-space-5);
}

.am-organization-member-tools .am-organization-member-search,
.am-organization-member-count {
	margin: 0;
}

.am-organization-member-count {
	color: var(--am-text-muted);
	font-weight: 700;
	padding-bottom: var(--am-space-3);
}

.am-organization-member-warning {
	background: var(--am-orange-100);
	border-left: 3px solid var(--am-action);
	color: var(--am-navy-900);
	margin: 0 0 var(--am-space-4);
	padding: var(--am-space-3);
}

.am-organization-member-pagination {
	margin-top: var(--am-space-5);
}

.am-organization-directory .am-badge--success {
	background: color-mix(in srgb, var(--am-success) 12%, var(--am-white));
	color: var(--am-success-strong);
}

.am-organization-directory .am-badge--danger {
	background: color-mix(in srgb, var(--am-danger) 10%, var(--am-white));
	color: var(--am-danger);
}

.am-organization-directory .am-badge--attention {
	background: var(--am-orange-100);
	color: var(--am-navy-900);
}

@media (max-width: 64rem) {
	.am-organization-member-list {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 50rem) {
	.am-organization-facts,
	.am-organization-summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.am-organization-member-tools {
		align-items: stretch;
		grid-template-columns: 1fr;
	}

	.am-organization-member-count {
		padding-bottom: 0;
	}
}

@media (max-width: 30rem) {
	.am-organization-search > div,
	.am-organization-member-search > div,
	.am-organization-card > header,
	.am-organization-subcard > header,
	.am-organization-member-card > header,
	.am-organization-detail__header,
	.am-organization-actions,
	.am-organization-member-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.am-organization-search .am-button,
	.am-organization-member-search .am-button,
	.am-organization-card > .am-button,
	.am-organization-card > header .am-badge,
	.am-organization-subcard > header .am-badge,
	.am-organization-member-card > header .am-badge,
	.am-organization-detail__header .am-badge,
	.am-organization-actions form,
	.am-organization-actions .am-button,
	.am-organization-member-actions form,
	.am-organization-member-actions .am-button {
		width: 100%;
	}

	.am-organization-search input[type="search"],
	.am-organization-member-search input[type="search"] {
		flex: 0 1 auto;
		width: 100%;
	}

	.am-organization-facts,
	.am-organization-summary,
	.am-organization-member-card dl {
		grid-template-columns: 1fr;
	}
}

/* Internal operations (Stage 6) ---------------------------------------------
 *
 * Shared presentation for the branded staff surfaces: page headers, explicit
 * queue states, read-only tables that stack into labelled record cards on
 * phones, the grouped overview, the audit filter form, and the read-only
 * permission matrix. Scoped to .am-ops so the clinic shell is untouched.
 */

.am-ops {
	/*
	 * The Operations canvas is a size container: queue tables switch to their
	 * labelled stacked layout from the width the canvas actually has (the
	 * permanent sidebar leaves roughly 784px at a 1024px viewport), not from
	 * the viewport.
	 */
	container: ops-canvas / inline-size;
	margin-inline: auto;
	max-width: var(--am-content-max);
	width: 100%;
}

.am-ops .am-page-heading,
.am-ops .am-section {
	max-width: none;
}

.am-ops__header {
	align-items: start;
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-4) var(--am-space-6);
	justify-content: space-between;
	position: relative;
	z-index: 1;
}

.am-ops__header > div {
	flex: 1 1 32rem;
	max-width: 48rem;
	min-width: 0;
}

.am-ops__header > p,
.am-ops__header > div > p {
	color: var(--am-text-muted);
	margin-bottom: 0;
}

.am-ops__mode {
	flex: none;
	margin-top: var(--am-space-2);
}

.am-ops__boundary-note {
	margin-inline: 0;
	max-width: none;
}

.am-ops-documents__modes {
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
	margin: var(--am-space-4) 0;
}

.am-ops-documents__modes [aria-current="page"] {
	border-color: var(--am-orange-500);
	color: var(--am-navy-900);
}

.am-ops-documents__actions {
	display: grid;
	gap: var(--am-space-5);
}

.am-ops-documents__upload {
	align-items: start;
	display: grid;
	gap: var(--am-space-2) var(--am-space-4);
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.am-ops-documents__field label {
	font-weight: 700;
}

.am-ops-documents__field {
	display: grid;
	gap: var(--am-space-2);
	min-width: 0;
}

.am-ops-documents__field small {
	color: var(--am-text-muted);
}

.am-ops-documents__field select {
	background: var(--am-white);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-sm);
	color: var(--am-navy-900);
	min-height: 3rem;
	min-width: 0;
	padding: var(--am-space-2);
}

.am-ops-documents__upload input[type="text"],
.am-ops-documents__upload input[type="file"] {
	background: var(--am-white);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-sm);
	color: var(--am-navy-900);
	min-height: 3rem;
	min-width: 0;
	padding: var(--am-space-2);
}

.am-ops-documents__upload--new .am-ops-documents__field--product {
	grid-column: 1 / 4;
}

.am-ops-documents__upload button {
	align-self: end;
	grid-column: 3;
}

.am-ops-documents__upload--replace .am-ops-documents__field {
	grid-column: 1 / 3;
}

.am-ops-documents__lot-actions {
	display: grid;
	gap: var(--am-space-3);
}

.am-ops-documents__lot {
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	padding: var(--am-space-4);
}

.am-ops-documents__lot summary {
	align-items: center;
	cursor: pointer;
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2) var(--am-space-4);
	justify-content: space-between;
}

.am-ops-documents__lot summary span {
	color: var(--am-text-muted);
}

.am-ops-documents__lot form {
	margin-top: var(--am-space-4);
}

@media (max-width: 50rem) {
	.am-ops-documents__upload {
		grid-template-columns: minmax(0, 1fr);
	}

	.am-ops-documents__field,
	.am-ops-documents__upload button {
		grid-column: 1;
		grid-row: auto;
	}

	.am-ops-documents__upload--replace .am-ops-documents__field {
		grid-column: 1;
	}

	.am-ops-documents__upload--new .am-ops-documents__field--product {
		grid-column: 1;
	}
}

.am-ops-payment-workspace {
	align-items: center;
	background: var(--am-navy-900);
	border-radius: var(--am-radius-lg);
	color: var(--am-white);
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-4) var(--am-space-6);
	justify-content: space-between;
	padding: var(--am-space-5) var(--am-space-6);
}

.am-ops-payment-workspace > div {
	flex: 1 1 27rem;
	min-width: 0;
}

.am-ops-payment-workspace__eyebrow {
	color: var(--am-silver-300);
	font-size: var(--am-text-xs);
	font-weight: 700;
	letter-spacing: 0.12em;
	margin: 0;
}

.am-ops-payment-workspace h2 {
	color: var(--am-white);
	margin: var(--am-space-1) 0 var(--am-space-2);
}

.am-ops-payment-workspace p:last-child {
	color: var(--am-silver-200);
	margin: 0;
}

.am-ops-payment-modes {
	display: flex;
	flex: none;
	flex-wrap: wrap;
	gap: var(--am-space-2);
	margin: 0;
}

.am-ops-payment-modes .am-button {
	min-height: 44px;
}

.am-ops-payment-tabs {
	align-items: center;
	background: var(--am-white);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
	margin: var(--am-space-4) 0;
	padding: var(--am-space-2);
}

.am-ops-payment-tabs a {
	align-items: center;
	border: 1px solid transparent;
	border-radius: var(--am-radius-control);
	color: var(--am-navy-900);
	display: inline-flex;
	font-weight: 700;
	min-height: 44px;
	padding: var(--am-space-2) var(--am-space-4);
	text-decoration: none;
}

.am-ops-payment-tabs a:hover,
.am-ops-payment-tabs a:focus-visible {
	background: var(--am-surface-2);
	border-color: var(--am-border-strong);
}

.am-ops-payment-tabs a[aria-current="page"] {
	background: var(--am-navy-900);
	color: var(--am-white);
}

.am-ops--payments .am-empty-state {
	padding: var(--am-space-4) var(--am-space-5);
}

.am-ops-invoice-search {
	margin: var(--am-space-4) 0;
}

.am-ops-invoice-search label {
	display: block;
	font-weight: 600;
}

.am-ops-invoice-search .am-text-subtle {
	margin: var(--am-space-1) 0 var(--am-space-2);
}

.am-ops-invoice-search > div {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
}

.am-ops-invoice-search input[type="search"] {
	flex: 1 1 16rem;
	max-width: 32rem;
	min-width: 0;
}

.am-ops-invoice-search .am-button {
	white-space: nowrap;
}

.am-ops__section-heading {
	align-items: start;
	gap: var(--am-space-4) var(--am-space-6);
	grid-template-columns: minmax(0, 1fr) auto;
}

.am-ops__section-heading > div > p {
	color: var(--am-text-muted);
	margin: var(--am-space-1) 0 0;
}

.am-ops__section-heading > p {
	color: var(--am-text-subtle);
	font-size: var(--am-text-sm);
	font-weight: 600;
	margin: 0;
	white-space: nowrap;
}

.am-ops__section-heading .is-numeric {
	font-variant-numeric: var(--am-tnum);
}

/* Explicit data states: unavailable is a muted solid state; empty is the
   dashed empty state; the integrity warning sits above a readable queue. */
.am-ops-state {
	align-items: flex-start;
	display: flex;
	gap: var(--am-space-4);
	padding: var(--am-space-5);
	text-align: left;
}

.am-ops-state > div {
	min-width: 0;
}

.am-ops-state h3 {
	font-size: var(--am-text-base);
	margin-bottom: var(--am-space-1);
}

.am-ops-state p {
	margin: 0;
	max-width: none;
}

.am-ops-state__icon {
	align-items: center;
	background: var(--am-white);
	border: 1px solid var(--am-border-strong);
	border-radius: var(--am-radius-control);
	color: var(--am-navy-900);
	display: flex;
	flex: none;
	height: 2.5rem;
	justify-content: center;
	width: 2.5rem;
}

.am-ops-state--unavailable {
	border-style: solid;
	color: var(--am-text-muted);
}

.am-ops-state--unavailable .am-ops-state__icon {
	color: var(--am-status-warning-fg);
}

.am-ops-integrity {
	margin: 0 0 var(--am-space-4);
	max-width: none;
}

.am-ops-integrity strong {
	display: block;
	margin-bottom: var(--am-space-1);
}

/* Read-only queue tables. */
.am-ops--orders .am-ops-order-views {
	margin-bottom: 0;
}

.am-ops--orders .am-ops-order-modes {
	margin-bottom: 0;
}

.am-ops-order-navigation {
	align-items: end;
	background: var(--am-white);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-3) var(--am-space-6);
	margin-bottom: var(--am-space-4);
	padding: var(--am-space-3) var(--am-space-4);
}

.am-ops-order-navigation__label {
	color: var(--am-text-muted);
	font-size: var(--am-text-xs);
	font-weight: 700;
	margin: 0 0 var(--am-space-2);
	text-transform: uppercase;
}

.am-ops-order-modes .is-active {
	background: var(--am-surface-2);
	border-color: var(--am-navy-900);
	color: var(--am-navy-900);
}

.am-ops-order-search {
	background: var(--am-white);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	display: grid;
	gap: var(--am-space-2);
	margin-bottom: var(--am-space-4);
	padding: var(--am-space-4);
}

.am-ops-order-search > div {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
}

.am-ops-order-search input {
	flex: 1 1 16rem;
	max-width: 32rem;
	min-width: 0;
}

.am-ops-order-search .am-button {
	white-space: nowrap;
}

.am-ops-order-search p {
	color: var(--am-text-muted);
	margin: 0;
}

.am-ops-order-search .am-field-error {
	color: var(--am-danger);
}

.am-ops--orders .am-ops-order-queue {
	border-top: 4px solid var(--am-navy-900);
}

.am-ops--orders .am-ops-order-queue__table thead {
	background: var(--am-surface);
}

.am-ops-order-detail__layout {
	display: grid;
	gap: var(--am-space-5);
	grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr);
}

.am-ops-order-detail__layout > * {
	min-width: 0;
}

.am-ops-order-detail__layout th small,
.am-ops-order-detail__facts address span {
	display: block;
}

.am-ops-order-detail__facts {
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	padding: var(--am-space-4);
	overflow-wrap: anywhere;
}

.am-ops-order-detail__facts h3:not(:first-child) {
	margin-top: var(--am-space-5);
}

.am-ops-order-detail__facts dl > div {
	display: flex;
	justify-content: space-between;
	gap: var(--am-space-3);
}

.am-ops-order-detail__facts dd {
	margin: 0;
	min-width: 0;
	text-align: right;
}

.am-ops-shipping__package-form fieldset,
.am-ops-shipping__rate {
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	padding: var(--am-space-4);
}

.am-ops-shipping__package-form legend,
.am-ops-shipping h3 {
	font-weight: 700;
}

.am-ops-shipping__fields {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--am-space-3);
}

.am-ops-shipping__fields label,
.am-ops-shipping__rate > div {
	display: grid;
	gap: var(--am-space-1);
}

.am-ops-shipping__fields input {
	width: 100%;
}

.am-ops-shipping__package-summary,
.am-ops-shipping__result {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--am-space-4);
	margin-bottom: var(--am-space-4);
}

.am-ops-shipping__package-summary h3,
.am-ops-shipping__package-summary p,
.am-ops-shipping__result h3,
.am-ops-shipping__result p {
	margin: 0;
}

.am-ops-shipping__rate-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--am-space-3);
}

.am-ops-shipping__rate {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: var(--am-space-3);
	background: var(--am-surface);
}

.am-ops-shipping__rate .am-button {
	grid-column: 1 / -1;
	justify-self: start;
}

.am-ops-shipping__price {
	color: var(--am-navy-900);
	font-size: var(--am-text-lg);
}

@media (max-width: 48rem) {
	.am-ops-shipping__fields,
	.am-ops-shipping__rate-grid {
		grid-template-columns: 1fr 1fr;
	}

	.am-ops-shipping__result {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 30rem) {
	.am-ops-shipping__fields,
	.am-ops-shipping__rate-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 64rem) {
	.am-ops-order-detail__layout {
		grid-template-columns: 1fr;
	}
}

.am-ops-table th,
.am-ops-table td {
	vertical-align: top;
}

.am-ops-table .is-tabular,
.am-ops-table .is-numeric-reference {
	font-variant-numeric: var(--am-tnum);
}

.am-ops-table__reference,
.am-ops-table__muted {
	color: var(--am-text-subtle);
	display: block;
	font-size: var(--am-text-xs);
	font-weight: 400;
	margin-top: var(--am-space-1);
	overflow-wrap: anywhere;
}

.am-ops-table__reference {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.am-ops-invoice-directory tbody th .am-ops-table__reference {
	color: var(--am-text);
	font-size: var(--am-text-base);
	font-weight: 700;
}

.am-ops-invoice-directory tbody th .am-text-subtle {
	color: var(--am-text-subtle);
	display: block;
	font-size: var(--am-text-xs);
	font-weight: 400;
	margin-top: var(--am-space-1);
}

/*
 * Queue tables stack into labelled cards whenever the Operations canvas is
 * narrower than 56rem — which includes the 1024px viewport, where an eight
 * column audit table would otherwise crush every value into a few characters
 * per line. The rules mirror the shared .am-table--stacked phone layout in
 * components.css and add one refinement: a value with a secondary reference,
 * muted line, or code block owns the full width below its label.
 */
@container ops-canvas (max-width: 56rem) {
	.am-ops-table.am-table--stacked thead {
		clip: rect(1px, 1px, 1px, 1px);
		clip-path: inset(50%);
		height: 1px;
		overflow: hidden;
		position: absolute;
		white-space: nowrap;
		width: 1px;
	}

	.am-ops-table.am-table--stacked tbody tr {
		border: 1px solid var(--am-border);
		border-radius: var(--am-radius-control);
		display: grid;
		margin-bottom: var(--am-space-3);
		padding: var(--am-space-3);
	}

	.am-ops-table.am-table--stacked tbody tr + tr th,
	.am-ops-table.am-table--stacked tbody tr + tr td {
		border-top: 0;
	}

	.am-ops-table.am-table--stacked tbody th,
	.am-ops-table.am-table--stacked tbody td {
		display: flex;
		gap: var(--am-space-4);
		justify-content: space-between;
		padding: var(--am-space-1) 0;
	}

	.am-ops-table.am-table--stacked tbody td[data-label]::before {
		color: var(--am-text-subtle);
		content: attr(data-label);
		flex: 0 0 auto;
		font-size: var(--am-text-xs);
	}

	.am-ops-table.am-table--stacked .is-numeric,
	.am-ops-table.am-table--stacked .is-action {
		text-align: left;
	}

	.am-ops-table.am-table--stacked tbody th {
		align-items: flex-start;
		flex-direction: column;
		font-size: var(--am-text-base);
		gap: var(--am-space-1);
		padding-bottom: var(--am-space-2);
	}

	.am-ops-table.am-table--stacked tbody th span {
		color: var(--am-text-subtle);
		display: block;
		font-size: var(--am-text-xs);
		font-weight: 400;
	}

	.am-ops-invoice-directory.am-table--stacked tbody th .am-ops-table__reference {
		color: var(--am-text);
		font-size: var(--am-text-base);
		font-weight: 700;
	}

	.am-ops-table.am-table--stacked tbody td:has(> .am-ops-table__reference),
	.am-ops-table.am-table--stacked tbody td:has(> .am-ops-table__muted),
	.am-ops-table.am-table--stacked tbody td:has(> .am-ops-table__code) {
		align-items: flex-start;
		flex-direction: column;
		gap: var(--am-space-1);
		text-align: left;
	}

	.am-ops-table__code {
		max-width: none;
	}
}

/* Phones keep the shared media-query layout; the reference-line refinement
   applies there too. */
@media (max-width: 50rem) {
	.am-ops-table.am-table--stacked tbody td:has(> .am-ops-table__reference),
	.am-ops-table.am-table--stacked tbody td:has(> .am-ops-table__muted),
	.am-ops-table.am-table--stacked tbody td:has(> .am-ops-table__code) {
		align-items: flex-start;
		flex-direction: column;
		gap: var(--am-space-1);
		text-align: left;
	}
}

.am-ops-table__code {
	display: block;
	font-size: var(--am-text-xs);
	max-width: 22rem;
	overflow-wrap: anywhere;
	white-space: normal;
}

.am-ops__recovery {
	color: var(--am-text-subtle);
	font-size: var(--am-text-sm);
	margin: 0;
}

.am-ops__recovery a {
	color: var(--am-link);
	font-weight: 600;
}

.am-ops__pagination {
	grid-template-columns: minmax(0, 1fr) auto;
}

.am-ops__pagination span {
	color: var(--am-text-subtle);
	font-size: var(--am-text-sm);
}

.am-ops__boundary {
	color: var(--am-text-subtle);
	font-size: var(--am-text-sm);
	margin: 0;
	max-width: 60rem;
}

/* Overview: authoritative snapshot, with the approved navy action hierarchy. */
.am-ops-home__eyebrow {
	font-size: var(--am-text-xs);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.am-ops-home__hero {
	align-items: center;
	background: var(--am-navy-900);
	border-radius: var(--am-radius-card);
	color: var(--am-white);
	display: flex;
	gap: var(--am-space-6);
	justify-content: space-between;
	margin-block: var(--am-space-5);
	padding: clamp(1.25rem, 3vw, 2.5rem);
}

.am-ops-home__hero > div {
	max-width: 45rem;
	min-width: 0;
}

.am-ops-home__hero .am-ops-home__eyebrow,
.am-ops-home__hero p {
	color: var(--am-white);
}

.am-ops-home__hero h2 {
	color: var(--am-white);
	margin-bottom: var(--am-space-3);
}

.am-ops-home__hero p:last-child {
	margin-bottom: 0;
}

.am-ops-home__hero .am-button {
	flex: none;
}

.am-ops-home__summary {
	display: grid;
	gap: var(--am-space-4);
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: var(--am-space-5);
}

.am-ops-home__fact {
	background: var(--am-white);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	min-width: 0;
	padding: var(--am-space-5);
}

.am-ops-home__fact p,
.am-ops-home__fact span {
	color: var(--am-text-muted);
	font-size: var(--am-text-sm);
	margin: 0;
}

.am-ops-home__fact strong {
	color: var(--am-navy-900);
	display: block;
	font-size: clamp(1.4rem, 2vw, 2rem);
	margin-block: var(--am-space-2);
}

.am-ops-home__fact .is-numeric {
	font-variant-numeric: var(--am-tnum);
}

.am-ops-home__work > h2 {
	margin-bottom: var(--am-space-4);
}

.am-ops-home__work-row {
	align-items: center;
	border-top: 1px solid var(--am-border);
	display: flex;
	gap: var(--am-space-4);
	justify-content: space-between;
	padding-block: var(--am-space-4);
}

.am-ops-home__work-row > div {
	min-width: 0;
}

.am-ops-home__work-row h3 {
	margin: var(--am-space-2) 0 var(--am-space-1);
	overflow-wrap: anywhere;
}

.am-ops-home__work-row p,
.am-ops-home__empty {
	color: var(--am-text-muted);
	margin: 0;
}

.am-ops-home__work-row .am-button {
	flex: none;
}

/* Audit filters: grouped fieldsets, one primary action, export kept apart. */
.am-ops-filters h2 {
	margin-bottom: var(--am-space-3);
}

.am-ops-filters__form {
	display: grid;
	gap: var(--am-space-3);
}

.am-ops-filters__group {
	border: 0;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.am-ops-filters__group legend {
	color: var(--am-text-muted);
	font-size: var(--am-text-sm);
	font-weight: 700;
	margin-bottom: var(--am-space-2);
	padding: 0;
}

.am-ops-filters__fields {
	display: grid;
	gap: var(--am-space-4);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.am-ops-filters__fields select {
	background: var(--am-white);
	border: 1px solid var(--am-border-strong);
	border-radius: var(--am-radius-control);
	color: var(--am-text);
	font: inherit;
	min-height: 2.75rem;
	min-width: 0;
	padding: var(--am-space-2) var(--am-space-3);
	width: 100%;
}

.am-ops-filters__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-4);
}

.am-ops-filters__actions .am-m3-text-link {
	margin-top: 0;
}

.am-ops-filters__advanced {
	border-top: 1px solid var(--am-border);
	padding-top: var(--am-space-2);
}

.am-ops-filters__advanced summary {
	color: var(--am-link);
	cursor: pointer;
	font-weight: 700;
	padding: var(--am-space-2) 0;
}

.am-ops-filters__advanced .am-ops-filters__group {
	padding-top: var(--am-space-2);
}

.am-ops-export__form .am-button {
	gap: var(--am-space-2);
}

.am-ops--payments > .am-section {
	margin-top: var(--am-space-4);
	padding: var(--am-space-4);
}

.am-ops--payments > .am-section .am-ops__section-heading {
	margin-bottom: var(--am-space-3);
}

.am-ops-documents__empty-note {
	background: var(--am-surface-2);
	border-radius: var(--am-radius-control);
	color: var(--am-text-muted);
	margin: var(--am-space-4) 0 0;
	padding: var(--am-space-3) var(--am-space-4);
}

/* Audit is a chronological reading surface, not a wide data grid. */
.am-ops-audit-timeline {
	display: grid;
	gap: var(--am-space-2);
	list-style: none;
	margin: var(--am-space-4) 0 0;
	padding: 0;
}

.am-ops-audit-event {
	min-width: 0;
}

.am-ops-audit-event article {
	background: var(--am-white);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-control);
	display: grid;
	gap: var(--am-space-1) var(--am-space-4);
	grid-template-columns: minmax(0, 1fr) auto;
	min-width: 0;
	padding: var(--am-space-2) var(--am-space-4);
}

.am-ops-audit-event__heading,
.am-ops-audit-event__meta,
.am-ops-audit-event__target {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2) var(--am-space-4);
}

.am-ops-audit-event__heading h3 {
	font-size: var(--am-text-md);
	margin: 0;
	overflow-wrap: anywhere;
}

.am-ops-audit-event__meta,
.am-ops-audit-event__target {
	color: var(--am-text-muted);
	font-size: var(--am-text-sm);
	margin: 0;
}

.am-ops-audit-event__meta {
	justify-content: end;
}

.am-ops-audit-event__target,
.am-ops-audit-event__details {
	grid-column: 1 / -1;
}

.am-ops-audit-event__target span,
.am-ops-audit-event__reference {
	overflow-wrap: anywhere;
}

.am-ops-audit-event__details {
	border-top: 1px solid var(--am-border);
	margin-top: var(--am-space-1);
}

.am-ops-audit-event__details summary {
	color: var(--am-link);
	cursor: pointer;
	font-weight: 700;
	min-height: 2.75rem;
	padding-block: var(--am-space-3);
}

.am-ops-audit-event__details dl {
	display: grid;
	gap: var(--am-space-3);
	margin: 0 0 var(--am-space-2);
}

.am-ops-audit-event__details dl > div {
	display: grid;
	grid-template-columns: minmax(8rem, 10rem) minmax(0, 1fr);
	gap: var(--am-space-1) var(--am-space-3);
	min-width: 0;
}

.am-ops-audit-event__details dt {
	color: var(--am-text-muted);
	font-size: var(--am-text-sm);
	font-weight: 700;
}

.am-ops-audit-event__details dd {
	margin: 0;
	min-width: 0;
}

.am-ops-audit-event__details code {
	white-space: pre-wrap;
	word-break: break-word;
}

@media (max-width: 50rem) {
	.am-ops-audit-event article {
		grid-template-columns: minmax(0, 1fr);
	}

	.am-ops-audit-event__meta {
		justify-content: start;
	}

	.am-ops-audit-event__details dl > div {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Role-first baseline; the dense matrix is an optional comparison. */
.am-ops-matrix__comparison {
	border-top: 1px solid var(--am-border);
	margin-top: var(--am-space-5);
	padding-top: var(--am-space-3);
}

.am-ops-matrix__comparison > summary {
	color: var(--am-link);
	cursor: pointer;
	font-weight: 700;
	padding: var(--am-space-2) 0;
}

.am-ops-role-family + .am-ops-role-family {
	margin-top: var(--am-space-5);
}

.am-ops-role-family > h3 {
	font-size: var(--am-text-md);
	margin: 0 0 var(--am-space-3);
}

.am-ops-role-family__grid {
	display: grid;
	gap: var(--am-space-3);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.am-ops-matrix__table-wrap {
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-control);
	max-height: min(72vh, 48rem);
	overflow: auto;
	position: relative;
}

/* Subtle edge fade that only appears while more columns lie to the right. */
.am-ops-matrix__table-wrap.is-overflowing {
	background-image: linear-gradient(to left, var(--am-ops-matrix-fade), transparent 2.5rem);
	background-attachment: local, scroll;
	background-repeat: no-repeat;
	background-position: right;
	background-size: 2.5rem 100%;
}

.am-ops-matrix__scroll-hint {
	align-items: center;
	color: var(--am-text-subtle);
	display: flex;
	font-size: var(--am-text-sm);
	gap: var(--am-space-2);
	margin: 0 0 var(--am-space-3);
}

.am-ops-matrix__scroll-hint::before {
	background: currentColor;
	border-radius: 50%;
	content: "";
	flex: 0 0 auto;
	height: 0.4rem;
	width: 0.4rem;
}

.am-permission-matrix {
	border-collapse: separate;
	border-spacing: 0;
	min-width: 60rem;
}

.am-permission-matrix thead th {
	background: var(--am-white);
	border-bottom: 1px solid var(--am-border-strong);
	position: sticky;
	top: 0;
	white-space: normal;
	z-index: 2;
}

.am-permission-matrix thead th span {
	display: block;
}

.am-permission-matrix thead th small {
	color: var(--am-text-subtle);
	font-weight: 400;
}

.am-permission-matrix tbody th[scope="row"],
.am-permission-matrix thead th:first-child {
	background: var(--am-white);
	left: 0;
	min-width: 15rem;
	position: sticky;
	z-index: 1;
}

.am-permission-matrix thead th:first-child {
	z-index: 3;
}

.am-permission-matrix__group th {
	background: var(--am-surface-2);
	color: var(--am-navy-900);
	font-size: var(--am-text-xs);
	letter-spacing: 0.04em;
	position: sticky;
	left: 0;
	text-transform: uppercase;
}

.am-permission-matrix__cell {
	text-align: center;
}

.am-permission-state {
	align-items: center;
	color: var(--am-text-subtle);
	display: inline-flex;
	gap: var(--am-space-2);
	justify-content: center;
	min-height: 1.5rem;
}

.am-permission-state.is-granted {
	color: var(--am-status-success-fg);
}

.am-ops-matrix__roles {
	display: block;
}

.am-ops-role {
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	min-width: 0;
	padding: 0 var(--am-space-4);
}

.am-ops-role summary {
	align-items: center;
	cursor: pointer;
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2) var(--am-space-3);
	list-style: none;
	min-height: 2.75rem;
	padding: var(--am-space-3) 0;
}

.am-ops-role summary::-webkit-details-marker {
	display: none;
}

.am-ops-role summary::before {
	border: solid var(--am-navy-900);
	border-width: 0 2px 2px 0;
	content: "";
	height: 0.45rem;
	transform: rotate(-45deg);
	transition: transform var(--am-duration) var(--am-ease);
	width: 0.45rem;
}

.am-ops-role[open] summary::before {
	transform: rotate(45deg);
}

.am-ops-role summary:focus-visible {
	outline: 3px solid var(--am-focus);
	outline-offset: 2px;
}

.am-ops-role__name {
	font-weight: 700;
}

.am-ops-role__count {
	color: var(--am-text-subtle);
	font-size: var(--am-text-sm);
	font-variant-numeric: var(--am-tnum);
	margin-left: auto;
}

.am-ops-role h4 {
	color: var(--am-text-muted);
	font-size: var(--am-text-xs);
	letter-spacing: 0.04em;
	margin: var(--am-space-3) 0 var(--am-space-2);
	text-transform: uppercase;
}

.am-ops-role__list {
	display: grid;
	gap: var(--am-space-1);
	list-style: none;
	margin: 0 0 var(--am-space-3);
	padding: 0;
}

.am-ops-role__list .am-permission-state {
	justify-content: flex-start;
}

.am-ops-role__list .am-permission-state > span:not(.screen-reader-text) {
	color: var(--am-text);
}

/* Financial controls remain readable as labelled choices at every width. */
.am-ops-settings-nav {
	margin-block: var(--am-space-5);
}

.am-ops-settings-nav__links {
	border-bottom: 1px solid var(--am-border);
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
}

.am-ops-settings-nav__link {
	border-bottom: 3px solid transparent;
	color: var(--am-text-muted);
	font-weight: 700;
	padding: var(--am-space-3) var(--am-space-4);
	text-decoration: none;
}

.am-ops-settings-nav__link:hover,
.am-ops-settings-nav__link.is-active {
	border-bottom-color: var(--am-brand);
	color: var(--am-text);
}

.am-ops-settings-dialog__link {
	color: var(--am-text);
	font-weight: 700;
	text-decoration: none;
}

.am-ops-settings-dialog__link.is-active {
	background: var(--am-brand-soft);
	border-color: var(--am-brand);
}

.am-ops-settings-defaults {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.am-ops-settings-defaults > .am-notice,
.am-ops-settings-defaults > .am-button {
	grid-column: 1 / -1;
}

.am-ops-settings-defaults > .am-button {
	justify-self: start;
}

.am-ops-settings-form > .am-button {
	justify-self: start;
}

.am-ops-settings-preview__lines {
	display: grid;
	gap: var(--am-space-2);
	margin: 0 0 var(--am-space-4);
}

.am-ops-settings-preview__lines > div {
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
	justify-content: space-between;
	padding: var(--am-space-2) 0;
	border-bottom: 1px solid var(--am-border);
}

.am-ops-settings-preview__lines dt,
.am-ops-settings-preview__lines dd {
	margin: 0;
}

.am-ops-settings-preview__lines dd {
	font-weight: 700;
}

.am-ops .am-m3-form fieldset,
#partner-financial-settings .am-m3-form fieldset,
#account-billing-policy .am-m3-form fieldset {
	display: grid;
	gap: var(--am-space-3);
	min-width: 0;
	padding: var(--am-space-4);
}

.am-ops .am-m3-form fieldset > legend,
#partner-financial-settings .am-m3-form fieldset > legend,
#account-billing-policy .am-m3-form fieldset > legend {
	font-weight: 700;
	padding-inline: var(--am-space-1);
}

.am-ops .am-m3-form fieldset > label,
#partner-financial-settings .am-m3-form fieldset > label,
#account-billing-policy .am-m3-form fieldset > label {
	align-items: flex-start;
	display: flex;
	gap: var(--am-space-2);
	line-height: 1.4;
}

.am-ops .am-m3-form fieldset > input[type="text"],
#partner-financial-settings .am-m3-form fieldset > input[type="text"],
#account-billing-policy .am-m3-form fieldset > input[type="text"] {
	min-width: 0;
	width: 100%;
}

.am-ops .am-m3-form fieldset input[type="radio"],
.am-ops .am-m3-form fieldset input[type="checkbox"],
#partner-financial-settings .am-m3-form fieldset input[type="radio"],
#partner-financial-settings .am-m3-form fieldset input[type="checkbox"],
#account-billing-policy .am-m3-form fieldset input[type="radio"],
#account-billing-policy .am-m3-form fieldset input[type="checkbox"] {
	flex: 0 0 auto;
	margin-top: 0.2em;
}

/* Financial settings: keep one visual hierarchy for choices, amounts and actions. */
.am-ops-financial .am-section__heading {
	display: block;
	margin-bottom: var(--am-space-5);
}

.am-ops-financial .am-section__heading > div {
	max-width: 58rem;
}

.am-ops-financial .am-section__heading p {
	color: var(--am-text-muted);
	margin-bottom: 0;
}

.am-ops-financial .am-m3-form {
	margin-top: 0;
}

.am-ops-financial .am-m3-form fieldset {
	background: var(--am-surface);
	border: 1px solid var(--am-border-strong);
	border-radius: var(--am-radius-card);
	margin: 0;
	min-width: 0;
	padding: var(--am-space-5);
}

.am-ops-financial .am-m3-form fieldset > legend {
	color: var(--am-text);
	font-size: var(--am-text-md);
	padding-inline: var(--am-space-2);
}

.am-ops-financial .am-ops-financial__default {
	grid-template-rows: auto auto 1fr;
}

.am-ops-financial .am-m3-form .am-ops-financial__choice {
	align-items: center;
	background: var(--am-white);
	border: 1px solid var(--am-border-strong);
	border-radius: var(--am-radius-control);
	cursor: pointer;
	font-weight: 600;
	min-height: 3rem;
	padding: var(--am-space-3) var(--am-space-4);
}

.am-ops-financial .am-ops-financial__choice:has(input:checked) {
	background: var(--am-brand-soft);
	border-color: var(--am-brand);
}

.am-ops-financial .am-ops-financial__choice:has(input:focus-visible) {
	outline: 3px solid var(--am-focus);
	outline-offset: 2px;
}

.am-ops-financial .am-ops-financial__choice:has(input:disabled) {
	color: var(--am-text-subtle);
	cursor: not-allowed;
}

.am-ops-financial .am-ops-financial__choice input {
	accent-color: var(--am-brand);
	margin: 0;
}

.am-ops-financial__amount {
	align-self: end;
	display: grid;
	gap: var(--am-space-2);
	padding-top: var(--am-space-3);
}

.am-ops-financial__amount label {
	font-weight: 700;
}

.am-ops-financial__amount input {
	background: var(--am-white);
	border: 1px solid var(--am-border-strong);
	border-radius: var(--am-radius-control);
	min-height: 3rem;
	min-width: 0;
	padding: var(--am-space-3);
	width: 100%;
}

.am-ops-financial__amount p {
	color: var(--am-text-muted);
	font-size: var(--am-text-sm);
	margin: 0;
}

.am-ops-financial .am-ops-settings-defaults > .am-notice {
	margin: 0;
}

.am-ops-financial .am-ops-settings-form {
	gap: var(--am-space-4);
}

.am-ops-financial__choices,
.am-ops-financial__fields {
	display: grid;
	gap: var(--am-space-3);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.am-ops-financial .am-ops-financial__methods > p {
	color: var(--am-text-muted);
	margin: 0;
}

.am-ops-financial .am-ops-financial__remit-group {
	background: var(--am-white);
}

.am-ops-financial__fields > .am-m3-field {
	min-width: 0;
}

@media (max-width: 50rem) {
	.am-ops-financial__fields {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 28rem) {
	.am-ops-financial .am-section {
		padding: var(--am-space-4);
	}

	.am-ops-financial .am-m3-form fieldset {
		padding: var(--am-space-4);
	}

	.am-ops-financial__choices {
		grid-template-columns: minmax(0, 1fr);
	}

	.am-ops-financial .am-m3-form > .am-button {
		width: 100%;
	}
}

/* Returned stock stays legible both in a desktop table cell and its mobile card. */
.am-ops-return-form fieldset {
	display: grid;
	gap: var(--am-space-2);
	margin: 0;
	min-width: 0;
}

.am-ops-return-form label {
	display: grid;
	gap: var(--am-space-1);
}

.am-ops-return-form input[type="number"],
.am-ops-return-form input[type="text"] {
	max-width: 100%;
	min-width: 0;
}

.am-ops-tracking-form {
	align-items: end;
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
}

.am-ops-tracking-form label {
	display: grid;
	flex: 1 1 13rem;
	gap: var(--am-space-1);
	min-width: 0;
}

.am-ops-tracking-form input {
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.am-ops-tracking-reference {
	min-width: 0;
	overflow-wrap: anywhere;
}

@container ops-canvas (max-width: 56rem) {
	.am-ops-table.am-table--stacked tbody td.am-ops-tracking-cell {
		align-items: stretch;
		flex-direction: column;
		gap: var(--am-space-2);
	}
}

/* Narrower canvases. */
@media (max-width: 64rem) {
	.am-ops-home__summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 50rem) {
	.am-ops-settings-nav__links {
		display: none;
	}

	.am-ops-settings-nav__selector {
		display: flex;
	}

	.am-ops-settings-defaults {
		grid-template-columns: minmax(0, 1fr);
	}

	.am-ops-home__hero {
		align-items: flex-start;
		flex-direction: column;
	}

	/* The chain motif would sit behind the intro copy once the header wraps. */
	.am-ops .am-molecular-motif {
		display: none;
	}

	.am-ops__section-heading {
		grid-template-columns: minmax(0, 1fr);
	}

	.am-ops__section-heading > p {
		white-space: normal;
	}

	.am-ops-table__code {
		max-width: none;
	}

	.am-ops__pagination {
		grid-template-columns: minmax(0, 1fr);
	}

	.am-ops__pagination > :last-child {
		justify-self: start;
	}

}

@media (max-width: 34rem) {
	.am-ops-role-family__grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.am-ops-home__summary {
		grid-template-columns: minmax(0, 1fr);
	}

	.am-ops-home__work-row {
		align-items: flex-start;
		flex-direction: column;
	}

	.am-ops-home__hero .am-button,
	.am-ops-home__work-row .am-button {
		width: 100%;
	}

	.am-ops-filters__fields {
		grid-template-columns: minmax(0, 1fr);
	}

	.am-ops-filters__actions .am-button,
	.am-ops-export__form .am-button,
	.am-ops__pagination .am-button {
		width: 100%;
	}

	.am-ops__header .am-button {
		width: 100%;
	}

	.am-ops-role summary {
		padding-block: var(--am-space-3);
	}
}
.am-payouts__search,
.am-payouts__action {
	align-items: end;
	display: grid;
	gap: var(--am-space-3);
}

.am-payouts__search {
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
	margin-top: var(--am-space-4);
}

.am-payouts__search label:first-of-type {
	grid-column: 1;
	grid-row: 1;
}

.am-payouts__search input[type="search"] {
	grid-column: 1;
	grid-row: 2;
}

.am-payouts__search label:last-of-type {
	grid-column: 2;
	grid-row: 1;
}

.am-payouts__search select {
	grid-column: 2;
	grid-row: 2;
}

.am-payouts__search button {
	grid-column: 3;
	grid-row: 2;
}

.am-payouts__search label,
.am-payouts__action label:not(.am-payouts__confirm) {
	font-weight: 700;
}

.am-payouts__search input,
.am-payouts__search select,
.am-payouts__action input[type="text"] {
	border: 1px solid var(--am-border-strong);
	border-radius: var(--am-radius-control);
	font: inherit;
	min-height: 2.75rem;
	max-width: 100%;
	min-width: 0;
	padding-inline: var(--am-space-3);
	width: 100%;
}

.am-payouts__recipients,
.am-payouts__batches {
	display: grid;
	gap: var(--am-space-2);
	list-style: none;
	margin: var(--am-space-4) 0;
	padding: 0;
}

.am-payouts__recipients {
	grid-template-columns: minmax(0, 1fr);
}

.am-payouts__recipients a,
.am-payouts__batches li,
.am-payouts__current,
.am-payouts__figures > div {
	background: var(--am-surface-2);
	border: 1px solid var(--am-border-strong);
	border-radius: var(--am-radius-card);
	min-width: 0;
	padding: var(--am-space-3);
}

.am-payouts__recipients a {
	align-items: center;
	color: var(--am-text);
	display: flex;
	gap: var(--am-space-3);
	justify-content: space-between;
	min-height: 56px;
	text-decoration: none;
}

.am-payouts__recipients a:hover,
.am-payouts__recipients a:focus-visible {
	background: var(--am-white);
	border-color: var(--am-navy-900);
}

.am-payouts__recipients a span {
	color: var(--am-text-subtle);
	font-size: var(--am-text-sm);
	text-align: end;
}

.am-payouts__recipients a[aria-current="page"] {
	border-color: var(--am-brand);
}

.am-payouts__figures {
	display: grid;
	gap: var(--am-space-3);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
	margin: var(--am-space-4) 0;
}

.am-payouts__figures dt,
.am-payouts__batches small {
	color: var(--am-text-subtle);
	font-size: var(--am-text-sm);
}

.am-payouts__figures dd {
	font-size: var(--am-text-lg);
	font-weight: 700;
	margin: var(--am-space-1) 0 0;
}

.am-payouts__figures > div:first-child {
	background: var(--am-navy-900);
	border-color: var(--am-navy-900);
	color: var(--am-white);
}

.am-payouts__figures > div:first-child dt {
	color: var(--am-silver-200);
}

.am-payouts__action,
.am-payouts__current {
	margin: var(--am-space-4) 0;
}

.am-payouts__current {
	border-left: 4px solid var(--am-brand);
	padding: var(--am-space-4);
}

.am-payouts__current h3 {
	margin-top: 0;
}

.am-payouts__action p {
	flex-basis: 100%;
	margin: 0;
}

.am-payouts__confirm {
	align-items: center;
	display: flex;
	flex-basis: 100%;
	gap: var(--am-space-2);
}

.am-payouts__batches li {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-3);
	justify-content: space-between;
}

.am-payouts__batches li > span {
	display: grid;
	gap: var(--am-space-1);
	min-width: 0;
}

.am-payouts__batch-id {
	overflow-wrap: anywhere;
}

.am-payouts__batches .am-payouts__action {
	flex-basis: 100%;
	margin: 0;
}

@media (max-width: 40rem) {
	.am-ops-payment-tabs a {
		flex: 1 1 auto;
		justify-content: center;
		text-align: center;
	}

	.am-payouts__search {
		grid-template-columns: minmax(0, 1fr);
	}

	.am-payouts__search label:first-of-type,
	.am-payouts__search label:last-of-type,
	.am-payouts__search input[type="search"],
	.am-payouts__search select,
	.am-payouts__search button {
		grid-column: 1;
		grid-row: auto;
	}

	.am-payouts__search button {
		width: 100%;
	}
}

/* Complete-evidence Operations reports; no financial estimates or client data. */
.am-ops-reports__modes,
.am-ops-reports__links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-3);
	margin-block: var(--am-space-4);
}

.am-ops-reports__modes [aria-current="page"] {
	background: var(--am-navy-900);
	border-color: var(--am-navy-900);
	color: #fff;
}

.am-ops-reports__filters {
	align-items: end;
	display: grid;
	gap: var(--am-space-4);
	grid-template-columns: minmax(10rem, 1.2fr) repeat(2, minmax(9rem, 1fr)) auto;
}

.am-ops-reports__filters .am-m5-field,
.am-ops-reports__filters input,
.am-ops-reports__filters select {
	min-width: 0;
	width: 100%;
}

.am-ops-reports__filters .am-ops-reports__custom-date,
.am-ops-reports__mobile-dates {
	display: none;
}

.am-ops-reports__filters:has(select option[value="custom"]:checked) .am-ops-reports__custom-date {
	display: block;
}

.am-ops-reports__mobile-form:has(input[value="custom"]:checked) .am-ops-reports__mobile-dates {
	display: grid;
	gap: var(--am-space-3);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding: var(--am-space-3) var(--am-space-4);
}

.am-ops-reports__mobile-dates input {
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.am-ops-reports__mobile-trigger {
	display: none;
}

.am-ops-reports__hint {
	color: var(--am-text-muted);
	font-size: var(--am-text-sm);
	margin: var(--am-space-3) 0 0;
}

.am-ops-reports__windows {
	background: var(--am-surface-2);
	border-radius: var(--am-radius-control);
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2) var(--am-space-6);
	margin: var(--am-space-4) 0 0;
	padding: var(--am-space-3) var(--am-space-4);
}

.am-ops-reports__windows div {
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-space-2);
}

.am-ops-reports__windows dt {
	color: var(--am-text-muted);
	font-weight: 700;
}

.am-ops-reports__windows dd {
	margin: 0;
}

.am-ops-reports__metrics {
	display: grid;
	gap: var(--am-space-4);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.am-ops-reports__metric {
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-card);
	min-width: 0;
	padding: var(--am-space-5);
}

.am-ops-reports__metric dl {
	margin: 0;
}

.am-ops-reports__metric dt {
	color: var(--am-text-muted);
	font-weight: 700;
}

.am-ops-reports__metric dd {
	color: var(--am-navy-900);
	font-size: var(--am-text-2xl);
	font-weight: 700;
	margin: var(--am-space-2) 0;
}

.am-ops-reports__metric p {
	color: var(--am-text-muted);
	font-size: var(--am-text-sm);
	margin: 0;
}

@container ops-canvas (max-width: 56rem) {
	.am-ops-reports__filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container ops-canvas (max-width: 35rem) {
	.am-ops-reports__metrics {
		grid-template-columns: minmax(0, 1fr);
	}

	.am-ops-reports__links a {
		width: 100%;
	}

	.am-ops-reports__filters--desktop {
		display: none;
	}

	.am-ops-reports__mobile-trigger {
		display: flex;
	}
}

@container ops-canvas (max-width: 24rem) {
	.am-ops-reports__mobile-form:has(input[value="custom"]:checked) .am-ops-reports__mobile-dates {
		grid-template-columns: minmax(0, 1fr);
	}
}
