@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500&family=Source+Sans+3:wght@400;500;600;700&display=swap');

body.module-portal {
	--portal-canvas: #f4f5f6;
	--portal-surface: #ffffff;
	--portal-text: #20252b;
	--portal-muted: #68717d;
	--portal-border: #dde1e6;
	--portal-border-strong: #c9d0d7;
	--portal-accent: #35657a;
	--portal-accent-strong: #294f60;
	--portal-accent-soft: #e8f0f3;
	--portal-success: #3f745b;
	--portal-warning: #9a6a2f;
	--portal-danger: #a64d4d;
	--portal-radius-sm: 4px;
	--portal-radius-md: 8px;
	background: var(--portal-canvas);
	color: var(--portal-text);
	font-family: 'Source Sans 3', sans-serif;
}

body.module-portal.portal-drawer-open {
	overflow: hidden;
}

body.module-portal.portal-drawer-open .messages,
body.module-portal.portal-drawer-open .page-body > .row > .container > .alert {
	position: fixed;
	left: 50%;
	bottom: 1rem;
	z-index: 1070;
	width: min(44rem, calc(100vw - 2rem));
	margin: 0;
	transform: translateX(-50%);
	box-shadow: 0 0.75rem 2rem rgba(32, 37, 43, 0.24);
}

body.module-portal.portal-nav-open {
	overflow: hidden;
}

.module-portal .page-content,
.module-portal .page-content .page-container {
	background: var(--portal-canvas);
}

.module-portal .page-content .page-container {
	width: 100%;
	max-width: 1440px;
	padding-right: clamp(1rem, 2.5vw, 2.5rem);
	padding-left: clamp(1rem, 2.5vw, 2.5rem);
}

.module-portal .btn {
	border-radius: var(--portal-radius-sm);
	font-weight: 600;
}

.module-portal .btn-primary,
.module-portal .btn-outline-primary:hover,
.module-portal .btn-outline-primary:focus {
	border-color: var(--portal-accent);
	background: var(--portal-accent);
}

.module-portal .btn-outline-primary {
	border-color: var(--portal-accent);
	color: var(--portal-accent-strong);
}

.module-portal .btn-outline-secondary {
	border-color: var(--portal-border-strong);
	color: var(--portal-text);
}

.module-portal .btn-outline-secondary:hover,
.module-portal .btn-outline-secondary:focus {
	border-color: var(--portal-accent);
	background: var(--portal-accent-soft);
	color: var(--portal-accent-strong);
}

.portal-page {
	max-width: 1180px;
	margin: 0 auto;
}

.portal-shell {
	display: grid;
	grid-template-columns: 248px minmax(0, 1fr);
	gap: clamp(1.5rem, 2.5vw, 2.5rem);
	align-items: start;
	padding: 0.5rem 0 2rem;
}

.portal-shell__sidebar {
	position: sticky;
	top: 1rem;
}

.portal-shell__content {
	min-width: 0;
}

.portal-shell__menu {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - 5rem);
	padding: 1rem 0.75rem;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-md);
	background: var(--portal-surface);
}

.portal-shell__menu-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 2.5rem;
	padding: 0 0.75rem 0.75rem;
	border-bottom: 1px solid var(--portal-border);
}

.portal-shell__menu-title {
	color: var(--portal-text);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.portal-shell__collapse-toggle {
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: var(--portal-radius-sm);
	background: transparent;
	color: var(--portal-muted);
	cursor: pointer;
}

.portal-shell__collapse-toggle:hover,
.portal-shell__collapse-toggle:focus-visible {
	background: var(--portal-accent-soft);
	color: var(--portal-accent-strong);
}

.portal-shell__collapse-toggle .material-icons {
	font-size: 1.25rem;
}

.portal-shell__nav {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0.75rem 0;
}

.portal-shell__nav-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 2.75rem;
	padding: 0.55rem 0.75rem;
	border-radius: var(--portal-radius-sm);
	color: #3f4851;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.portal-shell__nav-link:hover,
.portal-shell__nav-link:focus {
	background: #f0f2f3;
	color: var(--portal-text);
	text-decoration: none;
}

.portal-shell__nav-link.is-active {
	background: var(--portal-accent-soft);
	box-shadow: inset 3px 0 0 var(--portal-accent);
	color: var(--portal-accent-strong);
}

.portal-shell__nav-link.has-active-child {
	color: var(--portal-accent-strong);
}

.portal-shell__nav-link--child {
	min-height: 2.5rem;
	padding-left: 2.75rem;
	font-size: 0.9375rem;
}

.portal-shell__nav-link--child .portal-shell__nav-icon {
	width: 1rem;
	font-size: 1rem;
}

.portal-shell__nav-icon {
	flex: 0 0 auto;
	width: 1.25rem;
	font-size: 1.25rem;
	line-height: 1;
	text-align: center;
}

.portal-shell__nav-label {
	font-weight: 600;
	line-height: 1.2;
}

.portal-shell__menu-user {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
	padding: 0.9rem 0.75rem 0;
	border-top: 1px solid var(--portal-border);
	color: var(--portal-text);
	text-decoration: none;
}

.portal-shell__menu-user:hover,
.portal-shell__menu-user:focus {
	color: var(--portal-accent-strong);
	text-decoration: none;
}

.portal-shell__menu-user-icon {
	flex: 0 0 auto;
	color: var(--portal-muted);
	font-size: 2rem;
}

.portal-shell__menu-user-details,
.portal-shell__menu-user-name,
.portal-shell__menu-user-email {
	display: block;
	min-width: 0;
}

.portal-shell__menu-user-details {
	overflow: hidden;
}

.portal-shell__menu-user-name {
	overflow: hidden;
	color: inherit;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.portal-shell__menu-user-email {
	overflow: hidden;
	color: var(--portal-muted);
	font-size: 0.875rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.portal-shell__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5rem;
}

.portal-shell__header-actions {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: flex-start;
	justify-content: flex-end;
}

.portal-shell__nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.35rem 0.6rem;
}

.portal-shell__nav-toggle .material-icons {
	display: block;
	font-size: 1.15rem;
	line-height: 1;
}

@media (min-width: 992px) {
	.portal-shell.is-sidebar-collapsed {
		grid-template-columns: 4.5rem minmax(0, 1fr);
	}

	.portal-shell.is-sidebar-collapsed .portal-shell__sidebar {
		z-index: 2;
	}

	.portal-shell.is-sidebar-collapsed .portal-shell__menu {
		padding-right: 0.5rem;
		padding-left: 0.5rem;
	}

	.portal-shell.is-sidebar-collapsed .portal-shell__menu-header {
		justify-content: center;
		padding-right: 0;
		padding-left: 0;
	}

	.portal-shell.is-sidebar-collapsed .portal-shell__menu-title,
	.portal-shell.is-sidebar-collapsed .portal-shell__nav-label,
	.portal-shell.is-sidebar-collapsed .portal-shell__nav-link .badge,
	.portal-shell.is-sidebar-collapsed .portal-shell__menu-user-details {
		display: none;
	}

	.portal-shell.is-sidebar-collapsed .portal-shell__nav-link,
	.portal-shell.is-sidebar-collapsed .portal-shell__nav-link--child {
		justify-content: center;
		padding-right: 0;
		padding-left: 0;
	}

	.portal-shell.is-sidebar-collapsed .portal-shell__nav-link--child .portal-shell__nav-icon {
		width: 1.25rem;
		font-size: 1.25rem;
	}

	.portal-shell.is-sidebar-collapsed .portal-shell__menu-user {
		justify-content: center;
		padding-right: 0;
		padding-left: 0;
	}

	.portal-shell.is-sidebar-collapsed .portal-shell__nav-link,
	.portal-shell.is-sidebar-collapsed .portal-shell__menu-user {
		position: relative;
	}

	.portal-shell.is-sidebar-collapsed .portal-shell__nav-link::after,
	.portal-shell.is-sidebar-collapsed .portal-shell__menu-user::after {
		position: absolute;
		z-index: 2;
		top: 50%;
		left: calc(100% + 10px);
		padding: 7px 10px;
		border-radius: 5px;
		background: #1e293b;
		box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
		color: #fff;
		content: attr(data-tooltip);
		font-size: 13px;
		font-weight: 500;
		line-height: 1.2;
		opacity: 0;
		pointer-events: none;
		transform: translateY(-50%);
		visibility: hidden;
		white-space: nowrap;
	}

	.portal-shell.is-sidebar-collapsed .portal-shell__nav-link:hover::after,
	.portal-shell.is-sidebar-collapsed .portal-shell__nav-link:focus-visible::after,
	.portal-shell.is-sidebar-collapsed .portal-shell__menu-user:hover::after,
	.portal-shell.is-sidebar-collapsed .portal-shell__menu-user:focus-visible::after {
		opacity: 1;
		visibility: visible;
	}
}

.portal-page-header {
	min-height: 5.75rem;
	padding: 0.5rem 0 1.25rem;
	border-bottom: 1px solid var(--portal-border);
}

.portal-page-header__main {
	min-width: 0;
}

.portal-page-header__title {
	color: var(--portal-text);
	font-size: clamp(1.75rem, 2.8vw, 2.25rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.portal-page-header__copy {
	max-width: 48rem;
	color: var(--portal-muted);
	font-size: 1rem;
	line-height: 1.45;
}

.portal-stat-card,
.portal-card,
.portal-panel {
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-md);
	background: var(--portal-surface);
	box-shadow: none;
}

.portal-stat-card {
	color: var(--portal-text);
	text-decoration: none;
}

a.portal-stat-card:hover,
a.portal-stat-card:focus {
	border-color: var(--portal-border-strong);
	color: var(--portal-text);
	text-decoration: none;
}

.portal-stat-value {
	color: var(--portal-text);
	font-family: 'IBM Plex Mono', monospace;
	font-size: 1.9rem;
	font-weight: 500;
	line-height: 1;
}

.portal-stat-label {
	margin-top: 0.35rem;
	color: var(--portal-muted);
	font-weight: 600;
}

.portal-section-title,
.portal-panel__title {
	color: var(--portal-text);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.25;
}

.portal-meta {
	display: block;
	color: var(--portal-muted);
	font-size: 0.9375rem;
	line-height: 1.4;
}

.portal-card-stats,
.portal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.portal-actions form {
	margin: 0;
}

.portal-card--muted {
	opacity: 0.72;
}

.portal-card .badge {
	border-radius: var(--portal-radius-sm);
	font-weight: 600;
}

.portal-hub-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.portal-hub-status {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	min-height: 1.5rem;
	padding: 0.2rem 0.55rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
}

.portal-hub-status--public {
	border-color: #b9dfc6;
	background: #edf8f1;
	color: #247140;
}

.portal-hub-status--private {
	border-color: #d8dee5;
	background: #f3f5f7;
	color: #5a6572;
}

.portal-summary {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	overflow: hidden;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-md);
	background: var(--portal-surface);
}

.portal-summary__item {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 1.25rem 1.5rem;
	border-left: 1px solid var(--portal-border);
	color: var(--portal-text);
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.portal-summary__item:first-child {
	border-left: 0;
}

a.portal-summary__item:hover,
a.portal-summary__item:focus {
	background: #f8f9f9;
	color: var(--portal-text);
	text-decoration: none;
}

.portal-summary__label {
	order: 1;
	overflow: hidden;
	color: var(--portal-muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.portal-summary__value {
	order: 2;
	margin-top: 0.55rem;
	color: var(--portal-accent-strong);
	font-family: 'IBM Plex Mono', monospace;
	font-size: 2.25rem;
	font-weight: 500;
	line-height: 1;
}

.portal-overview-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
	gap: 1.25rem;
	align-items: stretch;
}

.portal-panel {
	overflow: hidden;
}

.portal-panel__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	min-height: 5.5rem;
	padding: 1.15rem 1.25rem;
	border-bottom: 1px solid var(--portal-border);
}

.portal-panel__header-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.portal-panel__body {
	padding: 0 1.25rem;
}

.portal-panel__body--form {
	padding-bottom: 1.25rem;
}

.portal-empty-state {
	margin: 1.25rem 0;
	padding: 1rem;
	border: 1px dashed var(--portal-border-strong);
	border-radius: var(--portal-radius-sm);
	color: var(--portal-muted);
}

.portal-table-responsive {
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-md);
	background: var(--portal-surface);
	overflow-x: auto;
}

.portal-table {
	min-width: 760px;
	border-collapse: separate;
	border-spacing: 0;
	color: var(--portal-text);
}

.portal-table--streams {
	min-width: 820px;
}

.portal-table--downloads {
	min-width: 920px;
}

.portal-table--purchases {
	min-width: 980px;
}

.portal-table thead th {
	border: 0;
	border-bottom: 1px solid var(--portal-border);
	padding: 0.75rem 0.85rem;
	background: #f7f8f8;
	color: var(--portal-muted);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

.portal-table tbody td {
	border: 0;
	border-top: 1px solid var(--portal-border);
	padding: 0.82rem 0.85rem;
	background: var(--portal-surface);
	line-height: 1.35;
	vertical-align: top;
}

.portal-table tbody tr:first-child td {
	border-top: 0;
}

.portal-table tbody tr:hover td {
	background: #f8f9f9;
}

.portal-table__primary {
	color: var(--portal-text);
	font-weight: 600;
	line-height: 1.3;
}

.portal-table__muted {
	margin-top: 0.15rem;
	color: var(--portal-muted);
	font-size: 0.85rem;
}

.portal-table__date {
	white-space: nowrap;
}

.portal-table__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.portal-table__action-form {
	margin: 0;
}

.portal-table__actions .btn {
	white-space: nowrap;
}

.portal-table .badge {
	border-radius: var(--portal-radius-sm);
	padding: 0.35rem 0.55rem;
	font-size: 0.78rem;
	line-height: 1.1;
	white-space: nowrap;
}

.portal-team-tabs {
	display: flex;
	gap: 0.25rem;
	margin-bottom: 1.5rem;
	overflow-x: auto;
	border-bottom: 1px solid var(--portal-border);
	scrollbar-width: thin;
}

.portal-team-tabs__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 3rem;
	margin-bottom: -1px;
	padding: 0.65rem 0.9rem;
	border-bottom: 2px solid transparent;
	color: var(--portal-muted);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.portal-team-tabs__link:hover,
.portal-team-tabs__link:focus {
	color: var(--portal-accent-strong);
	text-decoration: none;
}

.portal-team-tabs__link.is-active {
	border-bottom-color: var(--portal-accent);
	color: var(--portal-accent-strong);
}

.portal-team-tabs__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5rem;
	height: 1.5rem;
	padding: 0 0.4rem;
	border-radius: 999px;
	background: #eceff1;
	color: var(--portal-muted);
	font-family: 'IBM Plex Mono', monospace;
	font-size: 0.75rem;
	line-height: 1;
}

.portal-team-tabs__link.is-active .portal-team-tabs__count {
	background: var(--portal-accent-soft);
	color: var(--portal-accent-strong);
}

.portal-team-view__section-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.portal-team-view__section-header--secondary {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--portal-border);
}

.portal-player-list {
	overflow: hidden;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-md);
	background: var(--portal-surface);
}

.portal-player-list--archived .portal-player-row {
	background: #f8f9f9;
}

.portal-player-list--archived .portal-player-row__number {
	color: var(--portal-muted);
}

.portal-player-row {
	display: grid;
	grid-template-columns: 3.75rem minmax(0, 1fr) auto;
	gap: 1rem;
	align-items: center;
	min-height: 5.5rem;
	padding: 1rem;
	border-top: 1px solid var(--portal-border);
}

.portal-player-row:first-child {
	border-top: 0;
}

.portal-player-row__number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.75rem;
	height: 3.75rem;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-sm);
	background: #f7f8f8;
	color: var(--portal-accent-strong);
	font-family: 'IBM Plex Mono', monospace;
	font-size: 1.05rem;
	font-weight: 500;
}

.portal-player-row__identity {
	min-width: 0;
}

.portal-player-row__name {
	margin: 0;
	color: var(--portal-text);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
}

.portal-player-row__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	margin-top: 0.3rem;
	color: var(--portal-muted);
	font-size: 0.9rem;
}

.portal-player-row__meta-item {
	display: inline-flex;
	gap: 0.35rem;
}

.portal-player-row__meta-label {
	font-weight: 600;
}

.portal-player-row__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: flex-end;
}

.portal-player-row__actions form {
	margin: 0;
}

.portal-player-row__actions .btn {
	min-height: 2.75rem;
}

.portal-team-registration {
	margin-bottom: 1rem;
	padding: 1.15rem 1.25rem;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-md);
	background: var(--portal-surface);
}

.portal-team-registration__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.portal-team-registration__identity {
	min-width: 0;
}

.portal-team-registration__title {
	margin: 0 0 0.2rem;
	color: var(--portal-text);
	font-size: 1.12rem;
	font-weight: 600;
}

.portal-team-registration__management {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 1rem 0;
	padding: 1rem;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-sm);
	background: #f7f8f8;
}

.portal-team-registration__management-title {
	margin-bottom: 0.15rem;
	color: var(--portal-text);
	font-weight: 600;
}

.portal-team-registration__sync {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--portal-border);
}

.portal-team-registration__sync summary {
	cursor: pointer;
	color: var(--portal-accent-strong);
	font-weight: 600;
}

.portal-team-registration__sync form {
	margin-top: 0.75rem;
}

.portal-tournament-team__context {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
	gap: 1rem;
	align-items: center;
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-md);
	background: #f7f8f8;
}

.portal-tournament-team__context-label {
	margin-bottom: 0.15rem;
	color: var(--portal-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.portal-tournament-team__context-value {
	overflow: hidden;
	color: var(--portal-text);
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.portal-delegation-context {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 0.75fr)) auto;
	gap: 1rem;
	align-items: center;
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-md);
	background: #f7f8f8;
}

.portal-delegation-context--registration {
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.15fr) repeat(2, minmax(0, 0.65fr)) auto;
	border-color: #c8dbe3;
	background: #edf4f7;
	box-shadow: inset 0 3px 0 var(--portal-accent);
}

.portal-delegation-context--registration .portal-delegation-context__label {
	color: var(--portal-accent-strong);
}

.portal-club-profile-context {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.7fr));
	gap: 0;
	align-items: stretch;
	margin-bottom: 1.5rem;
	border: 1px solid #cddbd1;
	border-radius: var(--portal-radius-md);
	background: linear-gradient(90deg, #f3f8f4 0, var(--portal-surface) 38%);
	box-shadow: inset 4px 0 0 #5f8d70;
	overflow: hidden;
}

.portal-club-profile-context__identity,
.portal-club-profile-context__metric {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: 1rem 1.25rem;
}

.portal-club-profile-context__identity {
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 0.75rem;
}

.portal-club-profile-context__metric {
	border-left: 1px solid #dce6df;
}

.portal-club-profile-context__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: #dfece3;
	color: #3f7051;
	font-size: 1.35rem;
}

.portal-club-profile-context__label {
	margin-bottom: 0.15rem;
	color: #557060;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.portal-club-profile-context__name,
.portal-club-profile-context__value {
	overflow: hidden;
	color: var(--portal-text);
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.portal-club-profile-context__name {
	font-size: 1.05rem;
}

.portal-registration-tabs {
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: thin;
}

.portal-registration-tabs .nav-link {
	display: inline-flex;
	align-items: center;
	min-height: 3rem;
	white-space: nowrap;
}

.portal-delegation-context__label {
	margin-bottom: 0.15rem;
	color: var(--portal-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.portal-delegation-context__value {
	overflow: hidden;
	color: var(--portal-text);
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.portal-delegation-context__value--status {
	text-transform: capitalize;
}

.portal-delegation-overview-summary .portal-summary__value {
	font-size: 2rem;
}

.portal-registration-status {
	display: inline-flex;
	align-items: center;
	min-height: 1.625rem;
	padding: 0.2rem 0.6rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
}

.portal-registration-status--accepted {
	border-color: #b9dfc6;
	background: #edf8f1;
	color: #247140;
}

.portal-registration-status--pending {
	border-color: #ead18b;
	background: #fff8e4;
	color: #795900;
}

.portal-registration-status--info {
	border-color: #b9d6e2;
	background: #edf6fa;
	color: #285f76;
}

.portal-registration-status--rejected {
	border-color: #e7b7b7;
	background: #fff1f1;
	color: #983434;
}

.portal-registration-status--withdrawn,
.portal-registration-status--unknown {
	border-color: #d8dee5;
	background: #f3f5f7;
	color: #5a6572;
}

.portal-delegation-danger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	margin-top: 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-md);
	background: var(--portal-surface);
}

.portal-delegation-danger__title {
	margin: 0 0 0.2rem;
	color: var(--portal-text);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
}

.portal-delegation-danger form {
	flex: 0 0 auto;
	margin: 0;
}

.portal-personnel-list {
	overflow: hidden;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-md);
	background: var(--portal-surface);
}

.portal-personnel-row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 0.85rem;
	align-items: center;
	min-height: 4.5rem;
	padding: 0.85rem 1rem;
	border-top: 1px solid var(--portal-border);
}

.portal-personnel-row:first-child {
	border-top: 0;
}

.portal-personnel-row__icon {
	color: var(--portal-muted);
}

.portal-personnel-row__name {
	color: var(--portal-text);
	font-weight: 600;
}

.portal-personnel-row__identity {
	min-width: 0;
}

.portal-personnel-row__role {
	margin-top: 0.15rem;
	color: var(--portal-muted);
	font-size: 0.875rem;
}

.portal-personnel-row__actions {
	display: flex;
	gap: 0.5rem;
}

.portal-personnel-row__actions form {
	margin: 0;
}

.portal-tournament-packages__status {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.portal-tournament-packages__status form {
	margin: 0;
}

.portal-tournament-packages__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 1rem;
}

.portal-tournament-packages__item {
	display: flex;
	flex-direction: column;
}

.portal-tournament-packages__item .package-card {
	flex: 1 1 auto;
	width: 100%;
	max-width: none;
}

.portal-tournament-packages__approved {
	margin-top: 0.5rem;
	color: var(--portal-muted);
	font-size: 0.85rem;
}

.portal-tournament-card__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.portal-tournament-card__title-group {
	min-width: 0;
	flex: 1 1 auto;
}

.portal-tournament-card__sport-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-sm);
	background: #f7f8f8;
	color: var(--portal-accent-strong);
}

.portal-tournament-card__sport-icon .material-icons {
	font-size: 1.35rem;
	line-height: 1;
}

.portal-tournament-card__sport-icon .fa {
	font-size: 1.2rem;
	line-height: 1;
}

.portal-drawer {
	position: fixed;
	inset: 0;
	z-index: 1060;
	display: flex;
	justify-content: flex-end;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.portal-drawer.is-open {
	opacity: 1;
	pointer-events: auto;
}

.portal-drawer__backdrop {
	position: absolute;
	inset: 0;
	padding: 0;
	border: 0;
	background: rgba(32, 37, 43, 0.52);
}

.portal-drawer__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(560px, calc(100vw - 1rem));
	height: 100%;
	margin-left: auto;
	background: var(--portal-surface);
	box-shadow: -18px 0 40px rgba(32, 37, 43, 0.18);
	transform: translateX(100%);
	transition: transform 0.25s ease;
}

.portal-drawer.is-open .portal-drawer__panel {
	transform: translateX(0);
}

.portal-drawer__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.5rem 1.5rem 1rem;
	border-bottom: 1px solid var(--portal-border);
}

.portal-drawer__header .js-portal-drawer-close {
	min-width: 44px;
	min-height: 44px;
}

.portal-drawer__kicker {
	margin-bottom: 0.35rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--portal-muted);
}

.portal-drawer__title {
	color: var(--portal-text);
	font-size: 1.5rem;
	font-weight: 700;
}

.portal-details-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem 2rem;
	margin: 0;
}

.portal-details-grid > div {
	min-width: 0;
}

.portal-details-grid dt {
	margin-bottom: 0.3rem;
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--portal-muted);
}

.portal-details-grid dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.portal-drawer__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 1.5rem;
	overflow-y: auto;
}

.portal-drawer__form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.portal-drawer__body:has(> form > .portal-drawer__actions) {
	display: flex;
	flex-direction: column;
}

.portal-drawer__body > form:has(> .portal-drawer__actions) {
	display: flex;
	flex-direction: column;
	flex: 1 0 auto;
}

.portal-capabilities-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem 1rem;
}

.portal-capabilities-grid__item {
	min-width: 0;
}

.portal-capabilities-grid__label {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 0;
	line-height: 1.35;
}

.portal-capabilities-grid__label input[type='checkbox'] {
	margin-top: 0.2rem;
	flex: 0 0 auto;
}

.portal-capabilities-grid__label span {
	min-width: 0;
}

.portal-capabilities-grid__label-text {
	display: block;
	font-weight: 600;
	color: var(--portal-text);
}

.portal-capabilities-grid__description {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.88rem;
	color: var(--portal-muted);
}

.portal-drawer__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: flex-end;
	position: sticky;
	bottom: -1.5rem;
	z-index: 1;
	margin: auto -1.5rem -1.5rem;
	padding: 1rem 1.5rem;
	border-top: 1px solid var(--portal-border);
	background: var(--portal-surface);
}

@media (max-width: 767px) {
	.portal-drawer__panel {
		width: 100vw;
	}

	.portal-drawer__header,
	.portal-drawer__body {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.portal-drawer__actions {
		bottom: -1.5rem;
		margin-right: -1rem;
		margin-left: -1rem;
		padding-right: 1rem;
		padding-left: 1rem;
	}

	.portal-capabilities-grid {
		grid-template-columns: 1fr;
	}

	.portal-details-grid {
		grid-template-columns: 1fr;
	}
}

.portal-dashboard-card {
	overflow: hidden;
}

.portal-dashboard-list {
	display: flex;
	flex-direction: column;
}

.portal-dashboard-list__item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 0;
	border-top: 1px solid var(--portal-border);
}

.portal-dashboard-list__item:first-child {
	border-top: 0;
}

.portal-dashboard-list__title {
	color: var(--portal-text);
	font-weight: 600;
}

.portal-dashboard-list__actions {
	flex: 0 0 auto;
}

.portal-activity-feed {
	display: flex;
	flex-direction: column;
}

.portal-activity-item {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	padding: 1rem 0;
	border-top: 1px solid var(--portal-border);
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.portal-activity-item:first-child {
	border-top: 0;
}

.portal-activity-item:hover,
.portal-activity-item:focus {
	color: var(--portal-accent-strong);
	text-decoration: none;
}

.portal-activity-icon {
	width: 0.5rem;
	height: 0.5rem;
	margin-top: 0.45rem;
	border-radius: 999px;
	background: var(--portal-accent);
	flex: 0 0 auto;
}

.portal-activity-icon--team {
	background: var(--portal-success);
}

.portal-activity-icon--request {
	background: var(--portal-warning);
}

.portal-activity-content {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
}

.portal-activity-title {
	display: block;
	color: var(--portal-text);
	font-weight: 600;
}

.portal-activity-time {
	flex: 0 0 auto;
	color: var(--portal-muted);
	font-size: 0.875rem;
	white-space: nowrap;
}

@media (max-width: 1199.98px) {
	.portal-overview-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 991.98px) {
	.portal-shell {
		display: block;
		padding-top: 0;
	}

	.portal-shell__sidebar {
		position: fixed;
		inset: 0;
		width: min(320px, calc(100vw - 2rem));
		height: 100vh;
		transform: translateX(-105%);
		transition: transform 0.2s ease;
		z-index: 1040;
		padding: 0;
		background: var(--portal-surface);
		box-shadow: 18px 0 40px rgba(32, 37, 43, 0.16);
		overflow-y: auto;
	}

	.portal-shell::before {
		position: fixed;
		inset: 0;
		z-index: 1035;
		background: rgba(32, 37, 43, 0.42);
		content: '';
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.2s ease;
	}

	.portal-shell.is-nav-open .portal-shell__sidebar {
		transform: translateX(0);
	}

	.portal-shell.is-nav-open::before {
		opacity: 1;
		pointer-events: auto;
	}

	.portal-shell__menu {
		min-height: 100vh;
		border-radius: 0;
		border: 0;
	}

	.portal-shell__content {
		width: 100%;
	}

	.portal-shell__header-actions {
		justify-content: flex-start;
	}

	.portal-dashboard-list__item,
	.portal-activity-item {
		flex-direction: column;
	}

	.portal-dashboard-list__actions {
		width: 100%;
	}

	.portal-activity-time {
		margin-top: -0.25rem;
	}
}

@media (max-width: 767.98px) {
	.module-portal .page-content .page-container {
		padding-right: 0.75rem;
		padding-left: 0.75rem;
	}

	.portal-page-header {
		min-height: auto;
		padding-top: 0.75rem;
	}

	.portal-page-header__title {
		font-size: 1.65rem;
	}

	.portal-summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.portal-summary__item {
		padding: 1rem;
	}

	.portal-summary__item:nth-child(odd) {
		border-left: 0;
	}

	.portal-summary__item:nth-child(n + 3) {
		border-top: 1px solid var(--portal-border);
	}

	.portal-summary__value {
		font-size: 1.9rem;
	}

	.portal-panel__header {
		flex-direction: column;
		min-height: 0;
		padding: 1rem;
	}

	.portal-panel__body {
		padding-right: 1rem;
		padding-left: 1rem;
	}

	.portal-panel__body--form {
		padding-bottom: 1rem;
	}

	.portal-panel__header .btn {
		width: 100%;
	}

	.portal-panel__header-actions {
		flex-direction: column;
		width: 100%;
	}

	.portal-team-tabs {
		margin-right: -0.75rem;
		margin-left: -0.75rem;
		padding-right: 0.75rem;
		padding-left: 0.75rem;
	}

	.portal-team-view__section-header,
	.portal-team-registration__management {
		flex-direction: column;
		align-items: stretch;
	}

	.portal-team-view__section-header .btn,
	.portal-team-registration__management .btn {
		width: 100%;
	}

	.portal-player-row {
		grid-template-columns: 3.25rem minmax(0, 1fr);
		gap: 0.75rem;
		padding: 0.85rem;
	}

	.portal-player-row__number {
		width: 3.25rem;
		height: 3.25rem;
	}

	.portal-player-row__actions {
		grid-column: 1 / -1;
		justify-content: stretch;
	}

	.portal-player-row__actions form,
	.portal-player-row__actions .btn {
		flex: 1 1 0;
	}

	.portal-player-row__actions form .btn {
		width: 100%;
	}

	.portal-team-registration {
		padding: 1rem;
	}

	.portal-tournament-team__context {
		grid-template-columns: 1fr;
		padding: 1rem;
	}

	.portal-tournament-team__context .btn {
		width: 100%;
	}

	.portal-delegation-context {
		grid-template-columns: 1fr;
		padding: 1rem;
	}

	.portal-delegation-context--registration {
		grid-template-columns: 1fr;
	}

	.portal-club-profile-context {
		grid-template-columns: 1fr;
		background: #f7faf8;
	}

	.portal-club-profile-context__identity,
	.portal-club-profile-context__metric {
		padding: 0.9rem 1rem;
	}

	.portal-club-profile-context__metric {
		border-top: 1px solid #dce6df;
		border-left: 0;
	}

	.portal-delegation-context .btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 2.75rem;
		width: 100%;
	}

	.portal-delegation-danger {
		flex-direction: column;
		align-items: stretch;
	}

	.portal-delegation-danger .btn {
		width: 100%;
	}

	.portal-personnel-row {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.portal-personnel-row__actions {
		grid-column: 1 / -1;
	}

	.portal-personnel-row__actions,
	.portal-personnel-row__actions form,
	.portal-personnel-row__actions .btn {
		width: 100%;
	}

	.portal-tournament-packages__status {
		align-items: stretch;
		flex-direction: column;
	}

	.portal-tournament-packages__status .btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.portal-drawer,
	.portal-drawer__panel,
	.portal-shell__sidebar,
	.portal-shell::before {
		transition: none;
	}
}

.portal-message-thread {
	display: grid;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.portal-message {
	background: var(--portal-surface);
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius-md);
	padding: 1rem;
}

.portal-message-topic,
.portal-message-topic__heading {
	min-width: 0;
}

.portal-message-topic__subject,
.portal-message__body {
	overflow-wrap: anywhere;
}

.portal-message__body {
	margin-top: 0.65rem;
	white-space: normal;
}
