/* IPOS-294: Team Operational Glassic visual-overhaul layer.
 *
 * This file owns presentation only. The existing Team markup, data-* hooks,
 * focus flow and endpoint actions remain the source of truth. Palette values
 * resolve through theme-engine.css so the same composition can render in all
 * six approved Emerald/Ocean/Indigo light/dark combinations.
 */

body.ipos-app-view-team {
	background-color: var(--ipos-canvas);
	background-image: linear-gradient(135deg, rgb(255 255 255 / 14%), transparent 58%), var(--ipos-ambient-texture);
	background-position: center;
	background-size: cover;
}

body.ipos-app-view-team .ipos-admin-shell {
	grid-template-columns: 232px minmax(0, 1fr);
	background: transparent;
}

body.ipos-app-view-team .ipos-admin-sidebar {
	position: sticky;
	top: 0;
	height: calc(100dvh - 28px);
	margin: 14px 0 14px 14px;
	padding: 18px 10px;
	border: 1px solid var(--ipos-lg-edge);
	border-radius: 30px;
	background: color-mix(in srgb, var(--ipos-lg-glass-thick) 84%, transparent);
	box-shadow: inset 0 1px 0 var(--ipos-lg-inner-highlight), 0 20px 48px var(--ipos-lg-shadow);
	-webkit-backdrop-filter: blur(24px) saturate(1.15);
	backdrop-filter: blur(24px) saturate(1.15);
}

body.ipos-app-view-team .ipos-admin-bar {
	display: none;
}

body.ipos-app-view-team .ipos-admin-content {
	min-width: 0;
	padding: 24px 32px 36px 34px;
}

.ipos-team {
	--team-ink: var(--ipos-lg-ink, var(--ipos-ink));
	--team-muted: var(--ipos-lg-ink-muted, var(--ipos-muted));
	--team-edge: var(--ipos-lg-edge, var(--ipos-line));
	--team-line: var(--ipos-line);
	--team-panel: var(--ipos-lg-content, var(--ipos-surface));
	--team-panel-strong: var(--ipos-lg-glass-thick, var(--ipos-surface));
	--team-accent: var(--ipos-accent, var(--ipos-action));
	--team-accent-hover: var(--ipos-accent-hover, var(--ipos-action-hover));
	--team-shadow: var(--ipos-lg-shadow, rgb(20 38 23 / 18%));
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 18px;
	width: 100%;
	max-width: 1480px;
	margin: 0 auto;
	padding: 0 0 36px;
	color: var(--team-ink);
}

.ipos-team::before {
	position: absolute;
	inset: -8px -24px 0;
	z-index: -1;
	border-radius: 34px;
	background: radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--team-accent) 9%, transparent), transparent 35%), radial-gradient(circle at 12% 72%, color-mix(in srgb, var(--ipos-brand) 8%, transparent), transparent 33%);
	content: '';
	pointer-events: none;
}

/* Page-level composition follows the approved references: route title and
 * creation action share the first row. Supporting legacy copy stays semantic
 * but does not compete with the operational workspace. */
.ipos-team__header {
	display: flex;
	min-height: 64px;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 0 2px 12px;
	border-bottom: 1px solid var(--team-line);
}

.ipos-team__header p,
.ipos-team__header span { display: none; }
.ipos-team__header h1 {
	margin: 0;
	color: var(--team-ink);
	font-size: clamp(28px, 2.4vw, 36px);
	font-weight: 780;
	letter-spacing: -.035em;
	line-height: 1.08;
}

.ipos-team__header .ipos-team__primary { align-self: center; }

.ipos-team__primary,
.ipos-team button.ipos-team__primary {
	min-height: 46px;
	padding: 0 18px;
	border: 1px solid var(--team-accent);
	border-radius: 8px;
	background: var(--team-accent);
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 26%), 0 8px 20px color-mix(in srgb, var(--team-accent) 18%, transparent);
	color: var(--ipos-action-ink, #fff);
	font-weight: 780;
	letter-spacing: -.01em;
}

.ipos-team__primary:hover,
.ipos-team button.ipos-team__primary:hover {
	border-color: var(--team-accent-hover);
	background: var(--team-accent-hover);
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 25%), 0 12px 28px color-mix(in srgb, var(--team-accent) 28%, transparent);
}

.ipos-team__tools {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) 168px 168px;
	align-items: center;
	gap: 10px;
	min-height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.ipos-team__tools > label {
	position: relative;
	flex: 1 1 auto;
	min-width: 220px;
}

.ipos-team__tools > label::before,
.ipos-team__tools > label::after {
	position: absolute;
	right: 17px;
	content: '';
	pointer-events: none;
}

.ipos-team__tools > label::before {
	top: 14px;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-radius: 50%;
	color: var(--team-muted);
}

.ipos-team__tools > label::after {
	top: 28px;
	width: 7px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	color: var(--team-muted);
	transform: rotate(45deg);
	transform-origin: left center;
}

.ipos-team__tools input,
.ipos-team__tools select,
.ipos-team__tools .ipos-styled-select__trigger {
	min-height: 46px;
	border: 1px solid color-mix(in srgb, var(--team-line) 82%, transparent);
	border-radius: 8px;
	background: color-mix(in srgb, var(--ipos-field-surface, var(--ipos-surface)) 72%, transparent);
	box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ipos-lg-inner-highlight) 82%, transparent);
	color: var(--team-ink);
}

.ipos-team__tools input {
	padding-right: 48px;
}

.ipos-team__tools > .ipos-field--floating { width: auto; }

.ipos-team__tools > .ipos-field--floating > .ipos-styled-select {
	width: 100%;
}

.ipos-team__tools .ipos-styled-select__trigger {
	font: 700 13px/1 var(--ipos-font, inherit);
}


.ipos-team__lock .ipos-styled-select__menu,
.ipos-team__tools .ipos-styled-select__menu {
	border-color: var(--team-edge);
	border-radius: 8px;
	background: var(--ipos-selection-surface-solid);
	box-shadow: 0 20px 44px var(--team-shadow), inset 0 1px 0 var(--ipos-lg-inner-highlight);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

/* Timeout has exactly six choices. Keep all of them reachable without a
 * scrollbar on normal desktop and tablet viewports; retain a viewport bound
 * for short screens. */
.ipos-team__lock .ipos-styled-select__menu {
	max-height: min(294px, 45dvh);
}

.ipos-team__lock .ipos-styled-select__option,
.ipos-team__tools .ipos-styled-select__option {
	min-height: 42px;
	border-radius: 6px;
	background: var(--ipos-selection-surface-solid);
}

.ipos-team__bootstrap,
.ipos-team__transfer,
.ipos-team__lock {
	border: 1px solid var(--team-edge);
	background:
		linear-gradient(145deg, color-mix(in srgb, var(--team-panel-strong) 72%, transparent), color-mix(in srgb, var(--team-panel) 54%, transparent)),
		color-mix(in srgb, var(--team-panel) 48%, transparent);
	box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ipos-lg-inner-highlight) 92%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--team-line) 42%, transparent), 0 14px 34px color-mix(in srgb, var(--team-shadow) 72%, transparent);
	-webkit-backdrop-filter: blur(24px) saturate(1.18);
	backdrop-filter: blur(24px) saturate(1.18);
}

.ipos-team__bootstrap {
	position: relative;
	min-height: 66px;
	margin: 0;
	padding: 10px 12px 10px 52px;
	border-radius: 8px;
}

.ipos-team__bootstrap::before {
	position: absolute;
	top: 50%;
	left: 16px;
	display: grid;
	width: 24px;
	height: 24px;
	place-items: center;
	border: 1px solid color-mix(in srgb, var(--ipos-warning) 65%, var(--team-line));
	border-radius: 50%;
	color: var(--ipos-warning);
	content: '!';
	font-weight: 900;
	transform: translateY(-50%);
}

.ipos-team__bootstrap div {
	gap: 3px;
}

.ipos-team__bootstrap b {
	font-size: 14px;
}

.ipos-team__bootstrap span,
.ipos-team__transfer span {
	color: var(--team-muted);
	font-size: 12px;
	line-height: 1.45;
}

.ipos-team__bootstrap button {
	min-height: 42px;
	border-color: var(--team-line);
	border-radius: 12px;
	background: color-mix(in srgb, var(--team-panel-strong) 86%, transparent);
	color: var(--team-ink);
}

.ipos-team__bootstrap button:hover {
	border-color: var(--team-accent);
	background: color-mix(in srgb, var(--team-accent) 10%, var(--team-panel-strong));
	color: var(--team-accent-hover);
}

.ipos-team__transfer {
	margin: 0;
	padding: 14px 16px;
	border-radius: 8px;
}

.ipos-team__lock {
	position: relative;
	z-index: 10;
	display: grid;
	grid-template-columns: minmax(260px, 1.35fr) repeat(2, minmax(160px, 1fr)) minmax(168px, .8fr) max-content;
	align-items: end;
	gap: 10px 16px;
	margin: 0;
	padding: 20px;
	border-radius: 8px;
	overflow: visible;
}

.ipos-team__lock::before {
	position: absolute;
	inset: 1px;
	z-index: -1;
	border: 1px solid color-mix(in srgb, var(--ipos-lg-inner-highlight) 48%, transparent);
	border-radius: 7px;
	content: '';
	pointer-events: none;
}

.ipos-team__lock > .ipos-team__lock-intro {
	align-self: stretch;
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	align-items: center;
	gap: 14px;
	padding-right: 18px;
	border-right: 1px solid var(--team-line);
}

.ipos-team__lock-icon {
	display: grid;
	width: 46px;
	height: 46px;
	place-items: center;
	border: 1px solid color-mix(in srgb, var(--team-accent) 38%, var(--team-line));
	border-radius: 8px;
	background: color-mix(in srgb, var(--team-accent) 10%, var(--team-panel));
	box-shadow: inset 0 1px 0 var(--ipos-lg-inner-highlight);
	color: var(--team-accent);
}

.ipos-team__lock-icon svg {
	width: 23px;
	height: 23px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.ipos-team__lock-copy { display: grid; gap: 5px; min-width: 0; }

.ipos-team__lock-copy b {
	color: var(--team-ink);
	font-size: 15px;
	font-weight: 790;
}

.ipos-team__lock-copy small,
.ipos-team__lock p {
	color: var(--team-muted);
	font-size: 12px;
	line-height: 1.4;
}

.ipos-team__lock label {
	gap: 6px;
	color: var(--team-muted);
	font-size: 11px;
	font-weight: 760;
}

.ipos-team__lock input,
.ipos-team__lock .ipos-styled-select__trigger {
	min-height: 44px;
	border-color: var(--ipos-field-line, var(--team-line));
	border-radius: 8px;
	background: var(--ipos-field-surface, var(--ipos-surface));
	color: var(--team-ink);
}

.ipos-team__lock .ipos-styled-select { width: 100%; }

.ipos-team__lock .ipos-styled-select__trigger { font: 700 13px/1 var(--ipos-font, inherit); }

.ipos-team__lock button.ipos-team__primary {
	min-height: 44px;
	border-radius: 8px;
}

.ipos-team__lock p {
	grid-column: 2 / -1;
	min-height: 0;
	margin: 0;
}

.ipos-team__roster {
	position: relative;
	z-index: 0;
	min-width: 0;
	border: 1px solid var(--team-edge);
	border-radius: 8px;
	background:
		linear-gradient(145deg, color-mix(in srgb, var(--team-panel-strong) 66%, transparent), color-mix(in srgb, var(--team-panel) 48%, transparent)),
		color-mix(in srgb, var(--team-panel) 42%, transparent);
	box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ipos-lg-inner-highlight) 94%, transparent), 0 16px 38px color-mix(in srgb, var(--team-shadow) 64%, transparent);
	-webkit-backdrop-filter: blur(24px) saturate(1.16);
	backdrop-filter: blur(24px) saturate(1.16);
}

.ipos-team__roster::before {
	position: absolute;
	inset: 1px;
	z-index: -1;
	border: 1px solid color-mix(in srgb, var(--ipos-lg-inner-highlight) 42%, transparent);
	border-radius: 7px;
	content: '';
	pointer-events: none;
}

.ipos-team__roster-head {
	display: grid;
	grid-template-columns: max-content minmax(360px, 1fr);
	align-items: center;
	gap: 14px 18px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--team-line);
}

.ipos-team__roster-head h2 { margin: 0; color: var(--team-ink); font-size: 21px; font-weight: 790; letter-spacing: -.025em; }
.ipos-team__roster-head > h2.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.ipos-team__summary {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	overflow: visible;
}

.ipos-team__summary > .ipos-team__active-a11y {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.ipos-team__summary div {
	display: flex;
	min-height: 34px;
	align-items: baseline;
	gap: 6px;
	padding: 0 10px;
	border: 1px solid var(--team-line);
	border-radius: 6px;
	background: color-mix(in srgb, var(--team-panel) 54%, transparent);
	box-shadow: inset 0 1px 0 var(--ipos-lg-inner-highlight);
}

.ipos-team__summary div:first-child { border-color: color-mix(in srgb, var(--ipos-success) 38%, var(--team-line)); background: color-mix(in srgb, var(--ipos-success) 8%, var(--team-panel)); }

.ipos-team__summary span {
	color: var(--team-muted);
	font-size: 11px;
	font-weight: 740;
}

.ipos-team__summary strong {
	order: -1;
	color: var(--team-ink);
	font-size: 20px;
	font-variant-numeric: tabular-nums;
	letter-spacing: -.04em;
}

.ipos-team__status {
	min-height: 18px;
	margin: 0;
	padding: 10px 20px 8px;
	color: var(--team-muted);
	font-size: 12px;
}

.ipos-team__status[data-team-status-state="ready"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.ipos-team__list-head {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) minmax(136px, 180px) minmax(142px, 180px) 44px;
	align-items: center;
	min-height: 42px;
	padding: 0 16px;
	border-top: 1px solid var(--team-line);
	border-bottom: 1px solid var(--team-line);
	background: color-mix(in srgb, var(--team-accent) 4%, var(--team-panel));
	color: var(--team-muted);
	font-size: 11px;
	font-weight: 760;
}

.ipos-team__list-head span:first-child { grid-column: 1 / 3; }
.ipos-team__list-head span:last-child { text-align: center; }

.ipos-team__list {
	min-width: 0;
	gap: 0;
	border: 0;
	background: transparent;
}

.ipos-team__member,
.ipos-team button.ipos-team__member {
	grid-template-columns: 56px minmax(0, 1fr) minmax(136px, 180px) minmax(142px, 180px) 44px;
	min-height: 72px;
	padding: 10px 16px;
	border: 0;
	border-bottom: 1px solid var(--team-line);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--team-ink);
	text-align: left;
}

.ipos-team__member:hover,
.ipos-team button.ipos-team__member:hover {
	border-bottom-color: var(--team-line);
	background: color-mix(in srgb, var(--team-accent) 7%, transparent);
	box-shadow: inset 3px 0 0 color-mix(in srgb, var(--team-accent) 68%, transparent);
	transform: none;
}

.ipos-team__member:focus-visible {
	background: color-mix(in srgb, var(--team-accent) 8%, transparent);
	box-shadow: inset 0 0 0 2px var(--team-accent);
}

.ipos-team__avatar {
	width: 40px;
	height: 40px;
	border: 1px solid color-mix(in srgb, var(--team-accent) 30%, var(--team-line));
	border-radius: 10px;
	background: color-mix(in srgb, var(--team-accent) 11%, var(--team-panel));
	color: var(--team-accent);
	font-size: 15px;
}

.ipos-team__member > span:nth-child(2) {
	gap: 4px;
}

.ipos-team__member > span:nth-child(2) b {
	font-size: 14px;
	font-weight: 790;
}

.ipos-team__member > span:nth-child(2) small {
	color: var(--team-muted);
	font-size: 12px;
}

.ipos-team__badge {
	min-height: 24px;
	padding: 4px 9px;
	border: 1px solid var(--team-line);
	border-radius: 6px;
	background: color-mix(in srgb, var(--team-panel-strong) 80%, transparent);
	color: var(--team-muted);
	font-size: 11px;
	font-style: normal;
	font-weight: 720;
}

.ipos-team__badge--active {
	border-color: color-mix(in srgb, var(--ipos-success) 42%, var(--team-line));
	background: var(--ipos-success-soft);
	color: var(--ipos-success);
}

.ipos-team__badge--revoked {
	border-color: color-mix(in srgb, var(--ipos-danger) 42%, var(--team-line));
	background: var(--ipos-danger-soft);
	color: var(--ipos-danger);
}

.ipos-team__member > i {
	display: grid;
	width: 34px;
	height: 34px;
	place-items: center;
	border: 1px solid transparent;
	border-radius: 6px;
	color: var(--team-muted);
	font-size: 0;
	font-style: normal;
	text-align: center;
}

.ipos-team__member:hover > i { border-color: var(--team-line); background: color-mix(in srgb, var(--team-panel-strong) 70%, transparent); color: var(--team-ink); }

.ipos-team__member:last-child { border-bottom: 0; }

.ipos-team__member > i::before {
	content: '⋯';
	font-size: 22px;
	line-height: 1;
}

.ipos-team__empty {
	padding: 36px 12px;
	color: var(--team-muted);
	text-align: center;
}

.ipos-team__backdrop {
	background: linear-gradient(135deg, color-mix(in srgb, var(--team-accent) 18%, transparent), color-mix(in srgb, var(--ipos-overlay-backdrop, rgb(6 18 12 / 54%)) 82%, transparent));
	opacity: 0;
	pointer-events: none;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.ipos-team__backdrop.is-open {
	opacity: 1;
	pointer-events: auto;
}

.ipos-team__drawer {
	width: min(560px, calc(100vw - 20px));
	padding: 26px 28px 30px;
	border: 1px solid var(--ipos-overlay-line, var(--team-edge));
	border-radius: 8px 0 0 8px;
	background:
		linear-gradient(150deg, color-mix(in srgb, var(--ipos-overlay-surface, var(--team-panel-strong)) 92%, transparent), color-mix(in srgb, var(--team-panel) 76%, transparent)),
		color-mix(in srgb, var(--ipos-overlay-surface, var(--team-panel-strong)) 82%, transparent);
	box-shadow: -24px 0 70px color-mix(in srgb, var(--ipos-overlay-backdrop, var(--team-shadow)) 88%, transparent), inset 1px 0 0 var(--ipos-lg-inner-highlight);
	color: var(--ipos-overlay-ink, var(--team-ink));
	transform: translateX(24px);
	opacity: .96;
	pointer-events: none;
	-webkit-backdrop-filter: blur(28px) saturate(1.18);
	backdrop-filter: blur(28px) saturate(1.18);
}

.ipos-team__drawer.is-open {
	transform: translateX(0);
	opacity: 1;
	pointer-events: auto;
}

.ipos-team__drawer.is-closing {
	transform: translateX(24px);
	opacity: 0;
	pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
	.ipos-team__backdrop { transition: opacity 180ms ease; }
	.ipos-team__drawer { transition: transform 220ms cubic-bezier(.16, 1, .3, 1), opacity 180ms ease; }
}

.ipos-team__drawer header {
	align-items: start;
	margin-bottom: 24px;
}

.ipos-team__drawer header small {
	color: var(--team-accent);
	font-size: 12px;
	font-weight: 780;
}

.ipos-team__drawer h2 {
	margin: 6px 0 0;
	font-size: clamp(26px, 3vw, 34px);
	letter-spacing: -.045em;
}

.ipos-team__drawer header button {
	width: 44px;
	min-height: 44px;
	border-color: var(--team-line);
	border-radius: 8px;
	background: transparent;
	color: var(--team-ink);
}

.ipos-team__drawer header button:hover {
	border-color: var(--team-accent);
	background: color-mix(in srgb, var(--team-accent) 10%, transparent);
	color: var(--team-accent);
}

.ipos-team__drawer form,
.ipos-team__inspector,
.ipos-team__credential {
	gap: 16px;
}

.ipos-team__drawer label {
	color: var(--team-ink);
}

.ipos-team__drawer :is(input, select, textarea, .ipos-styled-select__trigger) {
	border-color: var(--ipos-field-line, var(--team-line));
	border-radius: 8px;
	background: var(--ipos-field-surface, var(--ipos-surface));
	color: var(--team-ink);
}

.ipos-team__drawer .ipos-styled-select__trigger {
	min-height: 46px;
	font: 700 14px/1 var(--ipos-font, inherit);
}

.ipos-team__drawer .ipos-styled-select__menu {
	border-color: var(--team-edge);
	border-radius: 8px;
	background: var(--ipos-selection-surface-solid);
	box-shadow: 0 18px 38px var(--team-shadow), inset 0 1px 0 var(--ipos-lg-inner-highlight);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.ipos-team__drawer .ipos-styled-select__option {
	min-height: 42px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: var(--ipos-selection-surface-solid);
	box-shadow: none;
	color: var(--team-ink);
	font: 700 13px/1 var(--ipos-font, inherit);
}

.ipos-team__drawer .ipos-styled-select__option:is(:hover, :focus-visible) {
	border-color: color-mix(in srgb, var(--team-accent) 34%, var(--team-line));
	background: var(--ipos-selection-active-solid);
	color: var(--team-accent);
}

.ipos-team__drawer .ipos-styled-select__option[aria-selected="true"] {
	border-color: color-mix(in srgb, var(--team-accent) 46%, var(--team-line));
	background: var(--ipos-selection-active-solid);
	color: var(--team-accent);
}

.ipos-team__identity {
	gap: 5px;
	padding: 0 0 18px;
	border-bottom-color: var(--team-line);
}

.ipos-team__identity b {
	font-size: 20px;
	letter-spacing: -.02em;
}

.ipos-team__identity span,
.ipos-team__identity small,
.ipos-team__inspector > p:not(.ipos-team__identity):not(.ipos-team__notice) {
	color: var(--team-muted);
	line-height: 1.55;
}

.ipos-team__inspector > p:last-child {
	margin: 4px 0 0;
	padding: 12px 14px;
	border: 1px solid var(--team-line);
	border-radius: 8px;
	background: color-mix(in srgb, var(--team-accent) 5%, var(--team-panel));
	color: var(--team-muted);
	font-size: 12px;
	line-height: 1.55;
}

.ipos-team__matrix {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px 18px;
	margin: 2px 0 0;
	padding: 15px 0 4px;
	border: 0;
	border-top: 1px solid var(--team-line);
	border-radius: 0;
	background: transparent;
}

.ipos-team__matrix legend {
	grid-column: 1 / -1;
	padding: 0 0 8px;
	color: var(--team-ink);
	font-size: 17px;
	font-weight: 780;
}

.ipos-team__check {
	min-height: 40px;
	padding: 3px 0;
	color: var(--team-ink);
	font-size: 13px;
}

.ipos-team__check input {
	width: 21px;
	height: 21px;
	min-height: 21px;
	border-radius: 6px;
	accent-color: var(--team-accent);
}

.ipos-team__matrix-note {
	margin: 2px 0;
	padding: 12px 14px;
	border: 1px solid var(--team-line);
	border-radius: 8px;
	background: color-mix(in srgb, var(--team-accent) 8%, var(--team-panel));
	color: var(--team-muted);
	line-height: 1.5;
}

.ipos-team__inspector > button,
.ipos-team__credential > button,
.ipos-team__confirm-actions > button,
.ipos-team__drawer form > button {
	width: 100%;
	min-height: 46px;
	border-radius: 8px;
}

.ipos-team__inspector > button[data-member-save],
.ipos-team__drawer form > button.ipos-team__primary,
.ipos-team__credential > button[data-team-copy],
.ipos-team__confirm-actions > button.ipos-team__primary {
	border-color: var(--team-accent);
	background: var(--team-accent);
	color: var(--ipos-action-ink, #fff);
}

.ipos-team__inspector > button:not(.is-danger):not([data-member-save]),
.ipos-team__credential > button:not([data-team-copy]),
.ipos-team__confirm-actions > button:not(.ipos-team__primary) {
	border-color: var(--team-line);
	background: transparent;
	color: var(--team-ink);
}

.ipos-team__inspector > button.is-danger,
.ipos-team__confirm-actions > button.is-danger {
	border-color: color-mix(in srgb, var(--ipos-danger) 72%, var(--team-line)) !important;
	background: transparent !important;
	color: var(--ipos-danger) !important;
}

.ipos-team__inspector > button.is-danger:hover,
.ipos-team__confirm-actions > button.is-danger:hover {
	background: var(--ipos-danger-soft);
}

.ipos-team__credential {
	padding: 18px;
	border-color: color-mix(in srgb, var(--team-accent) 38%, var(--team-line));
	border-radius: 8px;
	background: color-mix(in srgb, var(--team-accent) 8%, var(--team-panel));
}

.ipos-team__notice {
	border: 1px solid color-mix(in srgb, var(--ipos-danger) 36%, var(--team-line));
	background: var(--ipos-danger-soft);
	color: var(--ipos-danger);
}

@media (min-width: 701px) and (max-width: 1180px) {
	body.ipos-app-view-team .ipos-admin-shell {
		grid-template-columns: 76px minmax(0, 1fr);
	}
	body.ipos-app-view-team .ipos-admin-sidebar {
		align-items: center;
		padding-inline: 10px;
	}
	body.ipos-app-view-team .ipos-admin-content {
		padding: 20px 20px 28px 26px;
	}
	.ipos-team__lock { grid-template-columns: minmax(210px, 1.25fr) repeat(2, minmax(130px, 1fr)) minmax(136px, .8fr); }
	.ipos-team__lock button.ipos-team__primary { grid-column: 2 / span 2; }
	.ipos-team__roster-head { grid-template-columns: max-content 1fr; }
	.ipos-team__tools { grid-column: 1 / -1; grid-template-columns: minmax(180px, 1fr) 158px 158px; }
	.ipos-team__list-head,
	.ipos-team__member,
	.ipos-team button.ipos-team__member { grid-template-columns: 52px minmax(0, 1fr) minmax(118px, 150px) minmax(128px, 150px) 40px; }
}

@media (min-width: 701px) and (max-width: 880px) {
	.ipos-team__lock { grid-template-columns: minmax(170px, 1fr) repeat(2, minmax(132px, 1fr)); }
	.ipos-team__lock > .ipos-team__lock-intro { grid-column: 1 / -1; min-height: 56px; padding-right: 0; padding-bottom: 12px; border-right: 0; border-bottom: 1px solid var(--team-line); }
	.ipos-team__lock button.ipos-team__primary { grid-column: 2 / -1; }
	.ipos-team__tools { grid-template-columns: minmax(0, 1fr) 148px 148px; }
}

@media (max-width: 700px) {
	body.ipos-app-view-team .ipos-admin-shell {
		display: block;
	}
	body.ipos-app-view-team .ipos-admin-sidebar {
		position: static;
		width: auto;
		height: auto;
		margin: 0;
		padding: 10px 8px 0;
		border: 0;
		border-bottom: 1px solid var(--team-line);
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
	body.ipos-app-view-team .ipos-admin-content {
		padding: 12px 14px calc(100px + env(safe-area-inset-bottom));
	}
	.ipos-team { display: flex; flex-direction: column; gap: 16px; padding: 4px 0 32px; }
	.ipos-team::before { inset-inline: 0; border-radius: 22px; }
	.ipos-team__header {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 12px;
		order: 1;
		padding: 4px 0 14px;
	}
	.ipos-team__header .ipos-team__primary {
		width: auto;
		min-height: 44px;
		padding-inline: 14px;
	}
	.ipos-team__bootstrap { order: 2; }
	.ipos-team__transfer { order: 3; }
	.ipos-team__lock { order: 4; }
	.ipos-team__roster { order: 5; }
	.ipos-team__tools > label,
	.ipos-team__tools > .ipos-field--floating,
	.ipos-team__tools > .ipos-field--floating > .ipos-styled-select { width: 100%; min-width: 0; }
	.ipos-team__bootstrap { align-items: stretch; gap: 12px; padding: 14px 14px 14px 50px; }
	.ipos-team__bootstrap button { width: 100%; }
	.ipos-team__lock { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
	.ipos-team__lock > .ipos-team__lock-intro { min-height: 56px; padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--team-line); }
	.ipos-team__lock p { grid-column: auto; }
	.ipos-team__lock button.ipos-team__primary { width: 100%; }
	.ipos-team__roster-head { grid-template-columns: 1fr; gap: 12px; padding: 16px 14px; }
	.ipos-team__summary { width: 100%; }
	.ipos-team__summary div { min-height: 38px; flex: 1 1 0; justify-content: center; padding: 0 8px; }
	.ipos-team__summary strong { font-size: 19px; }
	.ipos-team__tools { grid-template-columns: 1fr; gap: 10px; }
	.ipos-team__status { padding-inline: 14px; }
	.ipos-team__list-head { display: none; }
	.ipos-team__member,
	.ipos-team button.ipos-team__member { grid-template-columns: 46px minmax(0, 1fr) 34px; gap: 8px 10px; min-height: 112px; padding: 12px 14px; }
	.ipos-team__member > em { grid-column: 2; justify-self: start; margin: 0; }
	.ipos-team__member > em:first-of-type { grid-row: 2; }
	.ipos-team__member > em:nth-of-type(2) { grid-row: 3; }
	.ipos-team__member > i { grid-column: 3; grid-row: 1; }
	.ipos-team__drawer { width: min(100vw, 560px); padding: 22px 16px 28px; border-radius: 8px 0 0 8px; }
	.ipos-team__matrix { grid-template-columns: 1fr; gap: 3px; }
	.ipos-team__matrix legend { grid-column: 1; }
}

@media (prefers-reduced-transparency: reduce) {
	body.ipos-app-view-team { background-image: none; }
	.ipos-team::before { display: none; }
	.ipos-team__tools,
	.ipos-team__bootstrap,
	.ipos-team__transfer,
	.ipos-team__lock,
	.ipos-team__roster,
	.ipos-team__summary,
	.ipos-team__drawer { background: var(--ipos-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
	body.ipos-app-view-team .ipos-admin-sidebar { background: var(--ipos-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ipos-team__tools,
	.ipos-team__member,
	.ipos-team__drawer,
	.ipos-team__backdrop { transition: none !important; }
	.ipos-team__drawer,
	.ipos-team__drawer.is-open { transform: none; opacity: 1; pointer-events: auto; }
	.ipos-team__backdrop,
	.ipos-team__backdrop.is-open { opacity: 1; pointer-events: auto; }
}

/* IPOS-441: guidance belongs below the field, outside the floating label. */
body.ipos-app-shell .ipos-team__field-help {
 margin: -4px 0 4px;
 color: var(--ipos-muted);
 font-size: 12px;
 line-height: 1.5;
}
