:root {
	--bg: #f3f6fb;
	--container: 1180px;
	--cyan-dark: #0e6b85;
	--cyan-soft: #d8f3fa;
	--gold: #c69336;
	--green: #2563b9;
	--green-dark: #174b94;
	--green-soft: #dceafd;
	--line: #dce4f0;
	--muted: #68748a;
	--orange-dark: #8a5510;
	--orange-soft: #fbe9d0;
	--pink-dark: #9c2f56;
	--pink-soft: #fbdfe7;
	--purple-dark: #5b3aa0;
	--purple-soft: #ece4fb;
	--radius: 22px;
	--radius-sm: 14px;
	--red: #b94949;
	--shadow: 0 18px 50px rgba(32, 65, 112, 0.09);
	--surface: #ffffff;
	--surface-2: #edf2fa;
	--teal-dark: #0f6b5c;
	--teal-soft: #d7f3ee;
	--text: #172033;
}

* {
	box-sizing: border-box;
}
html {
	overflow-x: hidden;
	scroll-behavior: smooth;
}
body {
	background: linear-gradient(180deg, #fbfcff 0, #f3f6fb 42%, #edf2f9 100%);
	color: var(--text);
	min-height: 100vh;
	font-family:
		Inter,
		ui-sans-serif,
		system-ui,
		-apple-system,
		BlinkMacSystemFont,
		'Segoe UI',
		sans-serif;
	margin: 0;
	overflow-x: hidden;
}
body.dark {
	--bg: #101722;
	--cyan-dark: #7fd8ec;
	--cyan-soft: #0f3540;
	--green: #71a7f7;
	--green-dark: #a8caff;
	--green-soft: #20385c;
	--line: #2c3b53;
	--muted: #aab6c9;
	--orange-dark: #e7b876;
	--orange-soft: #402c10;
	--pink-dark: #f0a4c0;
	--pink-soft: #3d1f2b;
	--purple-dark: #c3aef5;
	--purple-soft: #2e2350;
	--shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
	--surface: #182233;
	--surface-2: #202d42;
	--teal-dark: #6bd4c2;
	--teal-soft: #123c34;
	--text: #eef4ff;
	background: #101722;
}
a {
	color: inherit;
	text-decoration: none;
}
img {
	max-width: 100%;
}
button,
input,
select,
textarea {
	font: inherit;
}
button {
	cursor: pointer;
}
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--text);
	font-weight: 900;
	letter-spacing: -0.02em;
	margin: 0;
}
i.fa-solid {
	line-height: 1;
}

.container {
	margin-inline: auto;
	width: min(calc(100% - 32px), var(--container));
}
.page-shell {
	padding: 30px 0 64px;
}
.section {
	margin-top: 34px;
}
.section-head {
	align-items: end;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: space-between;
	margin-bottom: 18px;
}
.section-head h2,
.page-title h1 {
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	letter-spacing: -0.04em;
	margin: 0;
}
.section-head p,
.page-title p {
	color: var(--muted);
	margin: 6px 0 0;
}

/* ---------- Header (permanently dark, independent of the light/dark toggle -- mirrors the footer so the header/body/footer read as three distinct zones) ---------- */
.site-header {
	background: #1b2b4a;
	border-bottom: 1px solid #2a3c60;
	position: sticky;
	top: 0;
	z-index: 50;
}
.header-row {
	align-items: center;
	display: flex;
	gap: 28px;
	height: 76px;
}
.brand {
	align-items: center;
	color: #eef4ff;
	display: flex;
	font-weight: 900;
	gap: 12px;
	letter-spacing: -0.03em;
	white-space: nowrap;
}
.brand-mark {
	display: block;
	height: 44px;
	object-fit: contain;
	width: 44px;
}
.brand-copy {
	display: grid;
	line-height: 1.05;
}
.brand-name {
	font-size: 1.05rem;
}
.text-moncton {
	color: #eef4ff;
}
.text-poker {
	color: var(--red);
}
.brand small {
	color: #8b9ab3;
	display: block;
	font-size: 0.68rem;
	letter-spacing: 0.14em;
	margin-top: 4px;
	text-transform: uppercase;
}
.nav {
	align-self: stretch;
	display: flex;
	gap: 6px;
	margin-left: auto;
}
.nav a {
	align-items: center;
	color: #8b9ab3;
	display: flex;
	font-size: 0.93rem;
	font-weight: 700;
	height: 100%;
	padding: 0 13px;
	position: relative;
	transition: color 0.2s ease;
}
.nav a::before {
	background: var(--red);
	border-radius: 0 0 4px 4px;
	content: '';
	height: 3px;
	left: 50%;
	position: absolute;
	top: 0;
	transition:
		width 0.25s ease,
		left 0.25s ease;
	width: 0;
}
.nav a:hover,
.nav a.active {
	color: #eef4ff;
}
.nav a:hover::before,
.nav a.active::before {
	left: 18%;
	width: 64%;
}
.header-actions {
	align-items: center;
	display: flex;
	gap: 9px;
	margin-left: auto;
}
.icon-btn,
.menu-btn {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 13px;
	color: #eef4ff;
	cursor: pointer;
	display: grid;
	font-size: 1.1rem;
	height: 42px;
	place-items: center;
	transition:
		background 0.16s ease,
		border-color 0.16s ease;
	width: 42px;
}
.icon-btn:hover,
.menu-btn:hover {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.26);
}
.menu-btn {
	display: none;
	font-size: 1.3rem;
}
.profile-chip {
	align-items: center;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 14px;
	color: #eef4ff;
	cursor: pointer;
	display: flex;
	font-weight: 700;
	gap: 9px;
	height: 42px;
	padding: 6px 14px;
	transition:
		background 0.16s ease,
		border-color 0.16s ease;
}
.profile-chip:hover {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.26);
}
.avatar {
	background: linear-gradient(145deg, #24324a, #6683ad);
	border-radius: 11px;
	color: white;
	display: grid;
	flex-shrink: 0;
	font-weight: 800;
	height: 34px;
	overflow: hidden;
	place-items: center;
	width: 34px;
}
.avatar img {
	border-radius: 11px;
	height: 100%;
	object-fit: cover;
	width: 100%;
}
.profile-chip span {
	font-size: 0.9rem;
	font-weight: 800;
}

/* Account menu (JS-toggled dropdown) */
.account-menu {
	position: relative;
}
.profile-chip .account-copy {
	display: grid;
	line-height: 1.05;
	text-align: left;
}
.profile-chip .account-copy small {
	color: #8b9ab3;
	font-size: 0.7rem;
	font-weight: 650;
	margin-top: 4px;
}
.profile-chip .chevron {
	color: #8b9ab3;
	font-size: 0.72rem;
	margin-left: 2px;
}
.account-dropdown {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 17px;
	box-shadow: var(--shadow);
	opacity: 0;
	padding: 9px;
	position: absolute;
	right: 0;
	top: calc(100% + 12px);
	transform: translateY(-7px);
	transition: 0.18s ease;
	visibility: hidden;
	width: 265px;
	z-index: 60;
}
.account-menu.open .account-dropdown {
	opacity: 1;
	transform: translateY(0);
	visibility: visible;
}
.account-summary {
	align-items: center;
	border-bottom: 1px solid var(--line);
	display: flex;
	gap: 11px;
	margin-bottom: 6px;
	padding: 10px 10px 13px;
}
.account-summary strong,
.account-summary small {
	display: block;
}
.account-summary small {
	color: var(--muted);
	margin-top: 3px;
}
.account-dropdown a:not(.btn):not(.text-link),
.account-dropdown button:not(.btn) {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 11px;
	color: var(--text);
	display: flex;
	font-size: 0.92rem;
	font-weight: 750;
	gap: 11px;
	padding: 11px 12px;
	text-align: left;
	width: 100%;
}
.account-dropdown a:hover:not(.btn):not(.text-link),
.account-dropdown button:hover:not(.btn) {
	background: var(--surface-2);
}
.account-dropdown .danger {
	border-radius: 0;
	border-top: 1px solid var(--line);
	color: var(--red);
	margin-top: 5px;
	padding-top: 14px;
}
.account-dropdown .active {
	background: var(--surface-2);
}

/* Login popover (same open/close pattern as the account menu) */
.login-menu .account-dropdown {
	padding: 16px;
	width: 280px;
}
.login-menu .btn {
	width: 100%;
}
.password-input {
	position: relative;
}
.password-input input {
	padding-right: 44px;
}
.account-dropdown .password-input .password-toggle {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 9px;
	color: var(--muted);
	display: flex;
	height: 36px;
	justify-content: center;
	padding: 0;
	position: absolute;
	right: 5px;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
}
.account-dropdown .password-input .password-toggle:hover {
	background: var(--surface-2);
	color: var(--text);
}

.mobile-nav {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	box-shadow: var(--shadow);
	display: grid;
	inset: 76px 16px auto 16px;
	opacity: 0;
	padding: 14px;
	pointer-events: none;
	position: fixed;
	transform: translateY(-10px) scale(0.98);
	transform-origin: top right;
	transition:
		opacity 0.18s ease,
		transform 0.18s ease,
		visibility 0.18s;
	visibility: hidden;
	z-index: 70;
}
.mobile-nav.open {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
	visibility: visible;
}
.mobile-nav a,
.mobile-nav button {
	background: none;
	border: 0;
	border-radius: 12px;
	color: var(--text);
	font-size: 1rem;
	font-weight: 800;
	padding: 14px;
	text-align: left;
	width: 100%;
}
.mobile-nav a:hover,
.mobile-nav button:hover {
	background: var(--surface-2);
}

/* ---------- Buttons ---------- */
.btn {
	align-items: center;
	border: 0;
	border-radius: 14px;
	display: inline-flex;
	font-size: 0.95rem;
	font-weight: 850;
	gap: 8px;
	justify-content: center;
	padding: 13px 18px;
}
.btn-sm {
	border-radius: 11px;
	font-size: 0.85rem;
	padding: 9px 14px;
}
.btn-primary {
	background: var(--green);
	color: white;
}
.btn-primary:hover {
	background: var(--green-dark);
}
.btn-secondary {
	background: var(--surface-2);
	border: 1px solid var(--line);
	color: var(--text);
}
.btn-secondary:hover {
	background: var(--surface);
}
.btn-outline-primary {
	background: var(--surface);
	border: 1px solid var(--line);
	color: var(--text);
}
.btn-outline-primary:hover {
	background: var(--green);
	border-color: var(--green);
	color: #fff;
}
.btn-outline-secondary {
	background: var(--surface);
	border: 1px solid var(--line);
	color: var(--muted);
}
.btn-outline-secondary:hover {
	background: var(--surface-2);
	color: var(--text);
}
.btn-outline-danger {
	background: var(--surface);
	border: 1px solid var(--line);
	color: var(--red);
}
.btn-outline-danger:hover {
	background: var(--red);
	border-color: var(--red);
	color: #fff;
}
.btn-danger {
	background: var(--red);
	color: #fff;
}
.btn-danger:hover {
	background: #8a3535;
}
.btn-admin {
	background: var(--purple-soft);
	border: 1px solid var(--purple-dark);
	color: var(--purple-dark);
}
.btn-admin:hover {
	background: var(--purple-dark);
	border-color: var(--purple-dark);
	color: #fff;
}
.btn-member {
	background: var(--teal-soft);
	border: 1px solid var(--teal-dark);
	color: var(--teal-dark);
}
.btn-member:hover {
	background: var(--teal-dark);
	border-color: var(--teal-dark);
	color: #fff;
}
.btn-link {
	background: none;
	border: 0;
	color: var(--green);
	font-weight: 750;
	padding: 0;
}
a.btn {
	text-decoration: none;
}
.mp-segmented {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 999px;
	display: inline-flex;
	gap: 2px;
	padding: 4px;
}
.mp-segmented .btn {
	border-radius: 999px !important;
}
.view-toggle {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 13px;
	display: inline-flex;
	gap: 2px;
	padding: 4px;
}
.view-toggle-btn {
	border-radius: 9px;
	color: var(--muted);
	display: grid;
	height: 34px;
	place-items: center;
	width: 34px;
}
.view-toggle-btn.active {
	background: var(--surface);
	box-shadow: var(--shadow);
	color: var(--text);
}
.view-toggle-btn:hover:not(.active) {
	color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 30px;
	box-shadow: var(--shadow);
	overflow: hidden;
	padding: 38px;
	position: relative;
}
.hero:after {
	background: radial-gradient(circle, rgba(37, 99, 185, 0.23), rgba(37, 99, 185, 0) 68%);
	border-radius: 50%;
	content: '';
	height: 360px;
	position: absolute;
	right: -90px;
	top: -130px;
	width: 360px;
}
.hero-grid {
	display: grid;
	gap: 28px;
	grid-template-columns: 1.35fr 0.8fr;
	position: relative;
	z-index: 1;
}
.eyebrow {
	color: var(--green);
	font-size: 0.76rem;
	font-weight: 900;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.hero h1 {
	font-size: clamp(2rem, 5vw, 3.6rem);
	letter-spacing: -0.05em;
	line-height: 0.98;
	margin: 12px 0 18px;
	max-width: 760px;
}
.hero-copy {
	color: var(--muted);
	font-size: 1.02rem;
	font-weight: 400;
	line-height: 1.7;
	max-width: 660px;
}
.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
}

.next-game {
	align-self: stretch;
	background: linear-gradient(145deg, var(--green-dark), #1d2e49);
	border-radius: 24px;
	color: white;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 200px;
	padding: 24px;
}
.next-game .meta {
	color: #dce9fb;
	display: flex;
	font-size: 0.9rem;
	gap: 12px;
	justify-content: space-between;
}
.next-game h3 {
	color: #fff;
	font-size: 1.7rem;
	letter-spacing: -0.03em;
	margin: 16px 0 6px;
}
.next-game .game-info {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, 1fr);
	margin: 16px 0;
}
.next-game .info-pill {
	background: rgba(255, 255, 255, 0.09);
	border-radius: 14px;
	padding: 12px;
}
.next-game .info-pill small {
	color: #bfd0e8;
	display: block;
	margin-bottom: 4px;
}
.next-game .info-pill strong {
	color: #fff;
	font-weight: 800;
}
.next-game .btn {
	background: white;
	color: #17345e;
	width: 100%;
}
.next-game-compact {
	min-height: 180px;
	padding: 20px;
}
.next-game-compact h3 {
	font-size: 1.9rem;
	margin: 10px 0 4px;
}
.next-game-empty {
	gap: 14px;
	justify-content: flex-start;
}
.next-game-empty h3 {
	margin: 0;
}

/* ---------- Stat cards ---------- */
.stats-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(4, 1fr);
}
.stat-card,
.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.stat-card {
	padding: 22px;
}
.stat-card .label {
	color: var(--muted);
	font-size: 0.88rem;
	font-weight: 700;
}
.stat-card .value {
	color: var(--text);
	font-size: 2rem;
	font-weight: 900;
	letter-spacing: -0.04em;
	margin: 8px 0 4px;
}
.stat-link {
	color: inherit;
	text-decoration: none;
}
.stat-link:hover {
	color: var(--green);
	text-decoration: underline;
}
.trend {
	color: var(--green);
	font-size: 0.82rem;
	font-weight: 800;
}
.trend.down {
	color: var(--red);
}

/* ---------- Financial Summary (profile page) -- styled like an actual ledger, not a plain list ---------- */
.finance-sheet {
	font-variant-numeric: tabular-nums;
}
.finance-group {
	border-bottom: 1px solid var(--line);
	margin-bottom: 6px;
	padding-bottom: 6px;
}
.finance-group:last-of-type {
	border-bottom: none;
}
.finance-row {
	align-items: baseline;
	display: flex;
	justify-content: space-between;
	padding: 8px 4px;
}
.finance-row span:last-child {
	font-weight: 700;
}
.finance-row.finance-muted {
	color: var(--muted);
	font-size: 0.86rem;
}
.finance-row.finance-muted span:last-child {
	color: var(--muted);
	font-weight: 600;
}
.finance-row.finance-subtotal {
	border-top: 1px solid var(--line);
	font-weight: 800;
	margin-top: 2px;
	padding-top: 12px;
}
.finance-row.finance-total {
	border-top: 3px double var(--text);
	font-size: 1.2rem;
	font-weight: 900;
	margin-top: 6px;
	padding: 16px 4px 6px;
}
.finance-row.finance-total.is-positive span:last-child {
	color: var(--green-dark);
}
.finance-row.finance-total.is-negative span:last-child {
	color: var(--red);
}
/* ---------- DataTables theming (search box, pagination, info line) ---------- */
.dt-container {
	width: 100%;
}
.dt-search input,
div.dt-search input {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
	color: var(--text);
	font-family: inherit;
	font-size: 0.9rem;
	padding: 9px 13px;
}
.dt-search label {
	color: var(--muted);
	font-size: 0.86rem;
	font-weight: 650;
}
.dt-info {
	color: var(--muted);
	font-size: 0.86rem;
}
.dt-paging {
	margin-top: 14px;
}
.dt-paging button,
.dt-paging .dt-paging-button,
div.dt-container .dt-paging .dt-paging-button {
	background: var(--surface) !important;
	border: 1px solid var(--line) !important;
	border-radius: 10px !important;
	color: var(--text) !important;
	font-weight: 700;
	margin-left: 4px;
	opacity: 1 !important;
	padding: 7px 12px !important;
}
.dt-paging button:hover,
.dt-paging .dt-paging-button:hover,
div.dt-container .dt-paging .dt-paging-button:hover {
	background: var(--surface-2) !important;
	color: var(--text) !important;
}
.dt-paging button.current,
.dt-paging .dt-paging-button.current,
.dt-paging button.current:hover,
.dt-paging .dt-paging-button.current:hover,
div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover {
	background: var(--green) !important;
	border: 1px solid var(--green) !important;
	color: #fff !important;
}
.dt-paging button.disabled,
.dt-paging .dt-paging-button.disabled,
div.dt-container .dt-paging .dt-paging-button.disabled,
.dt-paging button.disabled:hover,
.dt-paging .dt-paging-button.disabled:hover,
div.dt-container .dt-paging .dt-paging-button.disabled:hover {
	color: var(--muted) !important;
	opacity: 0.5 !important;
}
table.dataTable thead th {
	cursor: pointer;
}
table.dataTable thead th.dt-orderable-asc:hover,
table.dataTable thead th.dt-orderable-desc:hover {
	color: var(--text);
}
table.dataTable td {
	vertical-align: middle;
}

/* ---------- Searchable combobox (used by the Search page's Player filter) ---------- */
.combo {
	position: relative;
}
.combo-list {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 13px;
	box-shadow: var(--shadow);
	left: 0;
	margin-top: 6px;
	max-height: 260px;
	overflow: auto;
	position: absolute;
	right: 0;
	top: 100%;
	z-index: 40;
}
.combo-option {
	cursor: pointer;
	font-size: 0.92rem;
	font-weight: 650;
	padding: 10px 14px;
}
.combo-option:hover,
.combo-option.is-active {
	background: var(--surface-2);
}

/* ---------- Generic modal (used for the player points breakdown, reusable elsewhere) ---------- */
.modal-overlay {
	align-items: center;
	backdrop-filter: blur(8px);
	background:
		radial-gradient(circle at 20% 10%, rgba(37, 99, 185, 0.28), transparent 34%),
		rgba(10, 18, 32, 0.72);
	display: flex;
	inset: 0;
	justify-content: center;
	opacity: 0;
	padding: 24px;
	position: fixed;
	transition:
		opacity 0.2s ease,
		visibility 0.2s ease;
	visibility: hidden;
	z-index: 90;
}
.modal-overlay.open {
	opacity: 1;
	visibility: visible;
}
.modal-box {
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 24px;
	box-shadow: 0 34px 110px rgba(4, 11, 24, 0.46);
	display: flex;
	flex-direction: column;
	height: min(820px, calc(100vh - 48px));
	max-width: 900px;
	overflow: hidden;
	position: relative;
	transform: translateY(18px) scale(0.975);
	transition: transform 0.2s ease;
	width: 100%;
}
.modal-box::before {
	background: linear-gradient(90deg, var(--green), #5aa9ff 52%, #8b5cf6);
	content: '';
	height: 5px;
	inset: 0 0 auto;
	position: absolute;
	z-index: 5;
}
.modal-overlay.open .modal-box {
	transform: translateY(0) scale(1);
}
.modal-header {
	align-items: center;
	background:
		linear-gradient(135deg, rgba(37, 99, 185, 0.07), rgba(91, 58, 160, 0.04)),
		var(--surface);
	border-bottom: 1px solid var(--line);
	display: flex;
	flex: 0 0 auto;
	gap: 20px;
	justify-content: space-between;
	min-height: 84px;
	padding: 23px 26px 20px;
	position: relative;
	z-index: 2;
}
.modal-header::before {
	align-items: center;
	background: linear-gradient(135deg, var(--green), var(--green-dark));
	border-radius: 14px;
	box-shadow: 0 7px 18px rgba(37, 99, 185, 0.16);
	color: #fff;
	content: '\f51e';
	display: inline-flex;
	flex: 0 0 46px;
	font-family: 'Font Awesome 6 Free';
	font-size: 1.05rem;
	font-weight: 900;
	height: 46px;
	justify-content: center;
}
.modal-header h3 {
	flex: 1 1 auto;
	font-size: clamp(1.15rem, 2vw, 1.45rem);
	line-height: 1.2;
	margin: 0;
	min-width: 0;
}
.modal-close {
	align-items: center;
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid var(--line);
	border-radius: 12px;
	box-shadow: 0 7px 18px rgba(32, 65, 112, 0.08);
	color: var(--muted);
	display: flex;
	flex: 0 0 42px;
	font-size: 1.05rem;
	height: 42px;
	justify-content: center;
	padding: 0;
	transition:
		background 0.18s ease,
		border-color 0.18s ease,
		color 0.18s ease,
		transform 0.18s ease;
	width: 42px;
}
body.dark .modal-close {
	background: var(--surface-2);
}
.modal-close:hover {
	background: var(--green);
	border-color: var(--green);
	color: #fff;
	transform: rotate(4deg) scale(1.04);
}
.modal-body {
	background:
		linear-gradient(180deg, rgba(237, 242, 250, 0.72), rgba(243, 246, 251, 0.3)),
		var(--surface);
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 24px 26px 28px;
	scrollbar-gutter: stable;
}
body.dark .modal-body {
	background: linear-gradient(180deg, rgba(32, 45, 66, 0.72), rgba(24, 34, 51, 0.35));
}
.modal-body > :first-child {
	margin-top: 0;
}
.modal-body > :last-child {
	margin-bottom: 0;
}
.modal-footer {
	align-items: center;
	background: var(--surface);
	border-top: 1px solid var(--line);
	display: flex;
	flex: 0 0 auto;
	justify-content: flex-end;
	min-height: 76px;
	padding: 15px 26px;
	position: relative;
	z-index: 2;
}
.modal-footer .btn {
	box-shadow: 0 8px 20px rgba(32, 65, 112, 0.1);
	min-width: 120px;
}
.modal-loading {
	align-items: center;
	color: var(--muted);
	display: flex;
	font-weight: 750;
	justify-content: center;
	min-height: 220px;
	text-align: center;
}
body.modal-open {
	overflow: hidden;
}

/* ---------- Player points ledger ---------- */
.points-ledger {
	display: grid;
	gap: 18px;
}
.points-ledger-summary {
	background:
		linear-gradient(135deg, rgba(37, 99, 185, 0.9), rgba(91, 58, 160, 0.65)),
		var(--green-dark);
	border-radius: 20px;
	box-shadow: 0 12px 28px rgba(37, 99, 185, 0.15);
	color: #fff;
	display: grid;
	gap: 14px;
	grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(120px, 0.6fr));
	overflow: hidden;
	padding: 22px;
	position: relative;
}
.points-ledger-summary::after {
	border: 28px solid rgba(255, 255, 255, 0.05);
	border-radius: 50%;
	content: '';
	height: 150px;
	position: absolute;
	right: -54px;
	top: -74px;
	width: 150px;
}
.points-ledger-total,
.points-ledger-stat {
	position: relative;
	z-index: 1;
}
.points-ledger-total span,
.points-ledger-stat span {
	display: block;
	font-size: 0.73rem;
	font-weight: 850;
	letter-spacing: 0.1em;
	opacity: 0.76;
	text-transform: uppercase;
}
.points-ledger-total strong {
	display: block;
	font-size: clamp(2rem, 5vw, 3rem);
	letter-spacing: -0.06em;
	line-height: 1;
	margin-top: 7px;
}
.points-ledger-total em {
	font-size: 0.9rem;
	font-style: normal;
	font-weight: 750;
	opacity: 0.8;
}
.points-ledger-stat {
	align-self: stretch;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 15px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 14px 16px;
}
.points-ledger-stat strong {
	font-size: 1.35rem;
	line-height: 1;
	margin-top: 7px;
}
.points-ledger-groups {
	display: grid;
	gap: 14px;
}
.points-ledger-group {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	box-shadow: 0 9px 28px rgba(32, 65, 112, 0.07);
	overflow: hidden;
}
.points-ledger-date {
	align-items: center;
	background: var(--surface-2);
	border-bottom: 1px solid var(--line);
	border-left: 3px solid var(--green);
	display: flex;
	font-size: 0.85rem;
	font-weight: 900;
	gap: 10px;
	justify-content: space-between;
	padding: 12px 16px;
}
.points-ledger-date-label {
	align-items: center;
	display: inline-flex;
	gap: 9px;
}
.points-ledger-date-label i {
	color: var(--green);
}
.points-ledger-date-total {
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid rgba(37, 99, 185, 0.16);
	border-radius: 999px;
	color: var(--green-dark);
	font-size: 0.76rem;
	padding: 5px 9px;
}
body.dark .points-ledger-date-total {
	background: rgba(16, 23, 34, 0.36);
	color: var(--text);
}
.points-ledger-row {
	align-items: center;
	border-bottom: 1px solid var(--line);
	display: grid;
	gap: 14px;
	grid-template-columns: 38px minmax(0, 1fr) auto;
	padding: 14px 16px;
	transition: background 0.16s ease;
}
.points-ledger-row:last-child {
	border-bottom: 0;
}
.points-ledger-row:hover {
	background: var(--surface-2);
}
.points-ledger-icon {
	align-items: center;
	background: linear-gradient(135deg, var(--cyan-soft), var(--green-soft));
	border-radius: 11px;
	color: var(--green-dark);
	display: flex;
	height: 38px;
	justify-content: center;
	width: 38px;
}
.points-ledger-activity {
	font-size: 0.93rem;
	font-weight: 800;
	line-height: 1.35;
	min-width: 0;
}
.points-ledger-activity a {
	color: var(--green);
	text-decoration: underline;
	text-decoration-color: rgba(37, 99, 185, 0.3);
	text-underline-offset: 3px;
}
.points-ledger-points {
	align-items: center;
	background: var(--green-soft);
	border: 1px solid rgba(37, 99, 185, 0.14);
	border-radius: 999px;
	color: var(--green-dark);
	display: inline-flex;
	font-size: 0.9rem;
	font-weight: 950;
	gap: 5px;
	justify-content: center;
	min-width: 68px;
	padding: 7px 10px;
}
.points-ledger-points::before {
	content: '+';
	opacity: 0.66;
}

/* ---------- Standings breakdown trigger ---------- */
.standings-player-cell {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	min-width: 220px;
	width: 100%;
}
.standings-player-cell .player-cell {
	flex: 1 1 auto;
	min-width: 0;
}
.standings-player-cell .player-cell span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.points-details-btn {
	align-items: center;
	background: linear-gradient(135deg, var(--green) 0%, #6d4bd6 100%);
	border: 0;
	border-radius: 13px;
	box-shadow: 0 7px 18px rgba(37, 99, 185, 0.2);
	color: #fff;
	display: inline-flex;
	flex: 0 0 38px;
	height: 38px;
	justify-content: center;
	position: relative;
	transition:
		box-shadow 0.16s ease,
		transform 0.16s ease,
		filter 0.16s ease;
	width: 38px;
}
.points-details-btn i {
	font-size: 0.88rem;
}
.points-details-btn::after {
	background: #15223a;
	border-radius: 8px;
	bottom: calc(100% + 9px);
	color: #fff;
	content: attr(data-tooltip);
	font-size: 0.72rem;
	font-weight: 800;
	left: 50%;
	opacity: 0;
	padding: 7px 9px;
	pointer-events: none;
	position: absolute;
	transform: translate(-50%, 4px);
	transition:
		opacity 0.14s ease,
		transform 0.14s ease;
	white-space: nowrap;
	z-index: 5;
}
.points-details-btn:hover,
.points-details-btn:focus-visible {
	box-shadow: 0 10px 24px rgba(37, 99, 185, 0.3);
	filter: saturate(1.08);
	transform: translateY(-2px) scale(1.03);
}
.points-details-btn:hover::after,
.points-details-btn:focus-visible::after {
	opacity: 1;
	transform: translate(-50%, 0);
}
.points-details-btn:focus-visible {
	outline: 3px solid rgba(37, 99, 185, 0.24);
	outline-offset: 3px;
}

@media (max-width: 640px) {
	.standings-player-cell {
		gap: 8px;
		min-width: 190px;
	}
	.points-details-btn {
		border-radius: 11px;
		flex-basis: 34px;
		height: 34px;
		width: 34px;
	}
	.points-details-btn::after {
		display: none;
	}
	.modal-overlay {
		align-items: stretch;
		padding: 10px;
	}
	.modal-box {
		border-radius: 19px;
		height: calc(100vh - 20px);
		max-height: none;
	}
	.modal-header {
		gap: 12px;
		min-height: 72px;
		padding: 18px 16px 15px;
	}
	.modal-header::before {
		border-radius: 11px;
		flex-basis: 38px;
		height: 38px;
	}
	.modal-header h3 {
		font-size: 1rem;
	}
	.modal-close {
		flex-basis: 38px;
		height: 38px;
		width: 38px;
	}
	.modal-body {
		padding: 16px;
	}
	.modal-footer {
		min-height: 66px;
		padding: 11px 16px;
	}
	.modal-footer .btn {
		width: 100%;
	}
	.points-ledger-summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding: 18px;
	}
	.points-ledger-total {
		grid-column: 1 / -1;
	}
	.points-ledger-row {
		gap: 10px;
		grid-template-columns: 34px minmax(0, 1fr) auto;
		padding: 12px;
	}
	.points-ledger-icon {
		border-radius: 10px;
		height: 34px;
		width: 34px;
	}
	.points-ledger-points {
		min-width: 58px;
		padding-inline: 8px;
	}
	.points-details-btn span {
		display: none;
	}
	.points-details-btn {
		margin-left: 6px;
		padding: 6px 8px;
	}
}

/* ---------- Player tendencies (profile page) -- a divided spec-sheet instead of a plain grid with no structure ---------- */
.tendency-list {
	display: flex;
	flex-direction: column;
}
.tendency-row {
	align-items: baseline;
	border-bottom: 1px solid var(--line);
	display: grid;
	gap: 8px 24px;
	grid-template-columns: 200px 1fr;
	padding: 16px 4px;
}
.tendency-row:first-child {
	padding-top: 4px;
}
.tendency-row:last-child {
	border-bottom: none;
	padding-bottom: 4px;
}
.tendency-label {
	color: var(--text);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.tendency-value {
	color: var(--muted);
	line-height: 1.6;
}
@media (max-width: 680px) {
	.tendency-row {
		gap: 4px;
		grid-template-columns: 1fr;
	}
}

/* ---------- Homepage "pop" stat cards -- more visual interest than the plain .stat-card used on other pages ---------- */
.stat-pop {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	display: block;
	overflow: hidden;
	padding: 22px;
	position: relative;
	text-decoration: none;
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease;
}
.stat-pop:hover {
	box-shadow: 0 22px 45px rgba(32, 65, 112, 0.16);
	transform: translateY(-4px);
}
.stat-pop::before {
	content: '';
	height: 4px;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
	z-index: 2;
}
.stat-pop::after {
	border-radius: 50%;
	content: '';
	height: 100px;
	position: absolute;
	right: -32px;
	top: -32px;
	width: 100px;
	z-index: 0;
}
.stat-pop-icon {
	align-items: center;
	border-radius: 13px;
	display: grid;
	font-size: 1.15rem;
	height: 44px;
	margin-bottom: 16px;
	place-items: center;
	position: relative;
	width: 44px;
	z-index: 1;
}
.stat-pop-label {
	font-size: 0.74rem;
	font-weight: 850;
	letter-spacing: 0.07em;
	position: relative;
	text-transform: uppercase;
	z-index: 1;
}
.stat-pop-value {
	color: var(--text);
	font-size: 2rem;
	font-weight: 900;
	letter-spacing: -0.04em;
	margin-top: 6px;
	position: relative;
	z-index: 1;
}
.stat-pop-blue::before {
	background: var(--green);
}
.stat-pop-blue::after {
	background: var(--green-soft);
}
.stat-pop-blue .stat-pop-icon {
	background: var(--green-soft);
	color: var(--green-dark);
}
.stat-pop-blue .stat-pop-label {
	color: var(--green-dark);
}
.stat-pop-purple::before {
	background: var(--purple-dark);
}
.stat-pop-purple::after {
	background: var(--purple-soft);
}
.stat-pop-purple .stat-pop-icon {
	background: var(--purple-soft);
	color: var(--purple-dark);
}
.stat-pop-purple .stat-pop-label {
	color: var(--purple-dark);
}
.stat-pop-orange::before {
	background: var(--orange-dark);
}
.stat-pop-orange::after {
	background: var(--orange-soft);
}
.stat-pop-orange .stat-pop-icon {
	background: var(--orange-soft);
	color: var(--orange-dark);
}
.stat-pop-orange .stat-pop-label {
	color: var(--orange-dark);
}
.stat-pop-teal::before {
	background: var(--teal-dark);
}
.stat-pop-teal::after {
	background: var(--teal-soft);
}
.stat-pop-teal .stat-pop-icon {
	background: var(--teal-soft);
	color: var(--teal-dark);
}
.stat-pop-teal .stat-pop-label {
	color: var(--teal-dark);
}

.content-grid {
	display: grid;
	gap: 22px;
	grid-template-columns: 1.35fr 0.75fr;
}
.content-side {
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.schedule-empty {
	align-items: flex-start;
	background: var(--surface-2);
	border: 1px dashed var(--line);
	border-radius: 18px;
	display: grid;
	gap: 14px;
	grid-template-columns: 44px minmax(0, 1fr);
	padding: 20px;
}
.schedule-empty-icon {
	align-items: center;
	background: var(--green-soft);
	border-radius: 13px;
	color: var(--green-dark);
	display: flex;
	font-size: 1.25rem;
	height: 44px;
	justify-content: center;
	width: 44px;
}
.schedule-empty h3 {
	margin: 0 0 4px;
}
.schedule-empty p {
	color: var(--muted);
	font-size: 0.9rem;
	margin: 0;
}
.schedule-empty .btn {
	grid-column: 1 / -1;
	width: 100%;
}

/* ---------- Official rules ---------- */
.rules-category,
.rules-points,
.rules-documents {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	margin-bottom: 20px;
	overflow: hidden;
	scroll-margin-top: 24px;
}
.rules-category-header,
.rules-section-heading {
	align-items: center;
	background: linear-gradient(135deg, var(--surface-2), var(--surface));
	border-bottom: 1px solid var(--line);
	display: flex;
	gap: 14px;
	padding: 20px 22px;
}
.rules-category-header h2,
.rules-section-heading h2 {
	font-size: 1.35rem;
}
.rules-category-icon {
	align-items: center;
	background: var(--green-soft);
	border-radius: 14px;
	color: var(--green-dark);
	display: flex;
	flex: 0 0 46px;
	font-size: 1.12rem;
	height: 46px;
	justify-content: center;
}
.rules-category-body {
	padding: 4px 22px;
}
.rules-entry {
	border-bottom: 1px solid var(--line);
	padding: 18px 0;
}
.rules-entry:last-child {
	border-bottom: 0;
}
.rules-entry > :first-child {
	margin-top: 0;
}
.rules-entry > :last-child {
	margin-bottom: 0;
}
.rules-entry li + li {
	margin-top: 8px;
}
.rules-points-grid,
.rules-document-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding: 18px;
}
.rules-point-card,
.rules-document-card {
	align-items: center;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 16px;
	display: flex;
	gap: 13px;
	min-width: 0;
	padding: 15px;
}
.rules-point-icon,
.rules-document-icon {
	align-items: center;
	background: var(--surface);
	border-radius: 12px;
	color: var(--green-dark);
	display: flex;
	flex: 0 0 42px;
	height: 42px;
	justify-content: center;
}
.rules-point-copy,
.rules-document-copy {
	flex: 1;
	min-width: 0;
}
.rules-point-copy h3,
.rules-document-copy strong {
	display: block;
	font-size: 0.95rem;
	margin: 0;
}
.rules-point-copy p,
.rules-document-copy small {
	color: var(--muted);
	display: block;
	font-size: 0.8rem;
	line-height: 1.4;
	margin: 3px 0 0;
}
.rules-point-card > strong {
	color: var(--green-dark);
	font-size: 1.45rem;
	white-space: nowrap;
}
.rules-point-card > strong small {
	font-size: 0.68rem;
	margin-left: 2px;
	text-transform: uppercase;
}
.rules-document-card {
	transition: 0.18s ease;
}
.rules-document-card:hover {
	border-color: var(--green);
	box-shadow: 0 12px 28px rgba(32, 65, 112, 0.1);
	transform: translateY(-2px);
}
.rules-document-icon {
	color: var(--red);
}
.rules-document-arrow {
	color: var(--muted);
	font-size: 0.8rem;
}
@media (max-width: 700px) {
	.rules-category-header,
	.rules-section-heading {
		padding: 17px;
	}
	.rules-category-body {
		padding: 2px 17px;
	}
	.rules-points-grid,
	.rules-document-grid {
		grid-template-columns: 1fr;
		padding: 13px;
	}
}
.card {
	padding: 22px;
}
.card h3 {
	font-size: 1.15rem;
	margin: 0 0 14px;
}
.news-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(2, 1fr);
}
.rc-news-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}
.news-image {
	background:
		linear-gradient(135deg, rgba(37, 99, 185, 0.92), rgba(25, 45, 77, 0.82)),
		repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(255, 255, 255, 0.05) 12px, rgba(255, 255, 255, 0.05) 24px);
	color: white;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 130px;
	padding: 18px;
}
.news-image-suit {
	font-size: 1.7rem;
	opacity: 0.55;
}
.news-image-title {
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: white;
	display: -webkit-box;
	font-size: 1.1rem;
	line-height: 1.3;
	margin: 0;
	overflow: hidden;
}
.news-body {
	flex: 1 0 auto;
	padding: 17px 17px 4px;
}
.news-body p {
	color: var(--muted);
	font-size: 0.92rem;
	line-height: 1.55;
	margin: 0;
}
.news-footer {
	align-items: center;
	background: var(--surface-2);
	border-top: 1px solid var(--line);
	color: var(--muted);
	display: flex;
	font-size: 0.78rem;
	justify-content: space-between;
	margin-top: 15px;
	padding: 13px 17px;
}

.table-wrap {
	overflow: auto;
}
.drag-handle {
	color: var(--muted);
	cursor: grab;
	text-align: center;
	width: 32px;
}
.drag-handle:active {
	cursor: grabbing;
}
tr[data-drag-row].dragging {
	background: var(--surface-2);
	opacity: 0.5;
}
.standings-table input,
.standings-table select {
	text-align: center;
	text-align-last: center;
}
table {
	border-collapse: collapse;
	min-width: 560px;
	width: 100%;
}
th,
td {
	border-bottom: 1px solid var(--line);
	padding: 14px 12px;
	text-align: left;
}
th {
	color: var(--muted);
	font-size: 0.77rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
td {
	font-weight: 650;
}
.rank {
	background: var(--surface-2);
	border-radius: 11px;
	display: inline-grid;
	font-weight: 900;
	height: 34px;
	place-items: center;
	width: 34px;
}
.rank.top {
	background: var(--green-soft);
	color: var(--green-dark);
}
.rank.gold {
	background: #f5d78e;
	color: #7a5b00;
}
.rank.silver {
	background: #dde2e8;
	color: #4d5a67;
}
.rank.bronze {
	background: #e8c3a3;
	color: #7a4520;
}
/* DataTables auto-detects numeric columns and right-aligns them by default;
   these overrides keep Rank/Points/Wins centered on Players & Standings. */
.data-table th.col-center,
.data-table td.col-center {
	text-align: center !important;
}
.data-table th.col-rank,
.data-table td.col-rank {
	width: 64px;
}
.data-table th.col-narrow,
.data-table td.col-narrow {
	width: 100px;
}
.rank-ordinal {
	background: var(--surface-2);
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	height: 34px;
	min-width: 34px;
	padding: 0 13px;
}
.rank-ordinal.top {
	background: var(--green-soft);
	color: var(--green-dark);
}
.rank-ordinal.gold {
	background: #f5d78e;
	color: #7a5b00;
}
.rank-ordinal.silver {
	background: #dde2e8;
	color: #4d5a67;
}
.rank-ordinal.bronze {
	background: #e8c3a3;
	color: #7a4520;
}
.player-cell {
	align-items: center;
	color: var(--text);
	display: flex;
	gap: 10px;
}
.player-cell .avatar,
.player-cell .player-thumb {
	height: 36px;
	width: 36px;
}
.pill {
	align-items: center;
	background: var(--surface-2);
	border-radius: 999px;
	color: var(--muted);
	display: inline-flex;
	font-size: 0.76rem;
	font-weight: 850;
	padding: 6px 9px;
}
.pill.green {
	background: var(--green-soft);
	color: var(--green-dark);
}
.pill.gold {
	background: #f6ead2;
	color: #8a611e;
}
.pill.red {
	background: #fae3e3;
	color: #9e3838;
}
.pill.teal {
	background: var(--teal-soft);
	color: var(--teal-dark);
}
.pill.purple {
	background: var(--purple-soft);
	color: var(--purple-dark);
}
.pill.orange {
	background: var(--orange-soft);
	color: var(--orange-dark);
}
.pill.pink {
	background: var(--pink-soft);
	color: var(--pink-dark);
}
.pill.cyan {
	background: var(--cyan-soft);
	color: var(--cyan-dark);
}

.timeline {
	display: grid;
	gap: 12px;
}
.timeline-item {
	align-items: center;
	border: 1px solid var(--line);
	border-radius: 16px;
	display: grid;
	gap: 14px;
	grid-template-columns: 58px 1fr auto;
	padding: 14px;
}
.timeline-item:hover {
	background: var(--surface-2);
}
.date-box {
	background: var(--green-soft);
	border-radius: 12px;
	padding: 6px 8px;
	text-align: center;
}
.date-box strong {
	color: var(--green-dark);
	display: block;
	font-size: 1.05rem;
	line-height: 1.15;
}
.date-box small {
	color: var(--green-dark);
	font-size: 0.66rem;
	font-weight: 800;
	text-transform: uppercase;
}
.timeline-item h4 {
	font-size: 1rem;
	margin: 0 0 4px;
}
.timeline-item p {
	color: var(--muted);
	font-size: 0.86rem;
	margin: 0;
}
.season-archive-winners {
	display: flex;
	gap: 22px;
	text-align: right;
}
.season-archive-winners small {
	color: var(--muted);
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
}
.season-archive-winners small i {
	margin-right: 3px;
}
.season-archive-winners strong {
	display: block;
	font-size: 0.9rem;
	white-space: nowrap;
}

.page-title {
	margin: 8px 0 24px;
}
.toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 18px;
}
.rc-filters {
	align-items: center;
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
}
.rc-filters-left {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.search {
	flex: 1;
	max-width: 460px;
	min-width: 200px;
	position: relative;
}
.rc-search {
	flex: 1;
	max-width: 420px;
	min-width: 220px;
	position: relative;
}
.rc-search-icon {
	color: var(--muted);
	font-size: 0.85rem;
	left: 15px;
	pointer-events: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}
.rc-search input[type='text'] {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 13px;
	color: var(--text);
	font-family: inherit;
	font-size: 0.92rem;
	padding: 11px 16px 11px 40px;
	width: 100%;
}
.rc-search input[type='text']:focus {
	border-color: var(--green);
	outline: none;
}
.search input,
select,
.field,
.form-control,
.form-select,
input[type='text'],
input[type='email'],
input[type='password'],
input[type='date'],
input[type='time'],
input[type='number'],
input[type='tel'],
textarea {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 13px;
	color: var(--text);
	outline: none;
	padding: 12px 14px;
	width: 100%;
}
.search input {
	padding-left: 42px;
}
.search:before {
	color: var(--muted);
	content: '\26B2';
	font-size: 1.4rem;
	left: 15px;
	position: absolute;
	top: 8px;
}
.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
input:focus,
select:focus,
textarea:focus {
	border-color: var(--green);
	box-shadow: 0 0 0 4px var(--green-soft);
}

.player-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(3, 1fr);
}
.game-row,
.player-row {
	cursor: pointer;
	position: relative;
}
.data-table tbody tr:where(:nth-child(odd), :nth-child(even)),
table.dataTable tbody tr:where(:nth-child(odd), :nth-child(even)) {
	background: var(--surface) !important;
}
.player-row.rank-gold {
	background: rgba(245, 215, 142, 0.16) !important;
}
.player-row.rank-silver {
	background: rgba(221, 226, 232, 0.22) !important;
}
.player-row.rank-bronze {
	background: rgba(232, 195, 163, 0.16) !important;
}
body.dark .player-row.rank-gold {
	background: rgba(245, 215, 142, 0.08) !important;
}
body.dark .player-row.rank-silver {
	background: rgba(221, 226, 232, 0.08) !important;
}
body.dark .player-row.rank-bronze {
	background: rgba(232, 195, 163, 0.08) !important;
}
.game-row:hover,
.player-row:hover {
	background: var(--surface-2) !important;
}
.game-cell {
	align-items: center;
	color: inherit;
	display: flex;
	gap: 11px;
}
.game-type-dot {
	border-radius: 50%;
	flex-shrink: 0;
	height: 10px;
	width: 10px;
}
.game-type-dot.teal {
	background: var(--teal-dark);
}
.game-type-dot.purple {
	background: var(--purple-dark);
}
.game-type-dot.orange {
	background: var(--orange-dark);
}
.game-type-dot.pink {
	background: var(--pink-dark);
}
.game-type-dot.cyan {
	background: var(--cyan-dark);
}

.type-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 18px;
}
.type-legend span {
	align-items: center;
	color: var(--muted);
	display: inline-flex;
	font-size: 0.82rem;
	font-weight: 700;
	gap: 7px;
}
.type-legend i {
	border-radius: 50%;
	display: inline-block;
	height: 11px;
	width: 11px;
}
.type-legend i.teal {
	background: var(--teal-dark);
}
.type-legend i.purple {
	background: var(--purple-dark);
}
.type-legend i.orange {
	background: var(--orange-dark);
}
.type-legend i.pink {
	background: var(--pink-dark);
}
.type-legend i.cyan {
	background: var(--cyan-dark);
}

.calendar-head {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 16px;
}
.calendar-head h2 {
	font-size: 1.3rem;
}
.calendar-nav {
	align-items: center;
	display: flex;
	gap: 8px;
}
.calendar-daynames {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(7, 1fr);
	margin-bottom: 8px;
}
.calendar-daynames div {
	color: var(--muted);
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}
.calendar-grid {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(7, 1fr);
}
.calendar-cell {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-height: 112px;
	padding: 8px;
}
.calendar-cell.is-empty {
	background: transparent;
	border-color: transparent;
}
.calendar-cell.is-today {
	border-color: var(--green);
	box-shadow: 0 0 0 2px var(--green-soft) inset;
}
.calendar-daynum {
	color: var(--muted);
	font-size: 0.82rem;
	font-weight: 850;
}
.calendar-cell.is-today .calendar-daynum {
	color: var(--green-dark);
}
.calendar-game {
	border-radius: 8px;
	color: inherit;
	display: block;
	font-size: 0.71rem;
	font-weight: 750;
	overflow: hidden;
	padding: 4px 7px;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.calendar-game.teal {
	background: var(--teal-soft);
	color: var(--teal-dark);
}
.calendar-game.purple {
	background: var(--purple-soft);
	color: var(--purple-dark);
}
.calendar-game.orange {
	background: var(--orange-soft);
	color: var(--orange-dark);
}
.calendar-game.pink {
	background: var(--pink-soft);
	color: var(--pink-dark);
}
.calendar-game.cyan {
	background: var(--cyan-soft);
	color: var(--cyan-dark);
}
.calendar-more {
	color: var(--muted);
	font-size: 0.71rem;
	font-weight: 750;
	padding-left: 2px;
}
@media (max-width: 760px) {
	.calendar-cell {
		min-height: 64px;
		padding: 6px;
	}
	.calendar-game {
		border-radius: 50%;
		display: block;
		height: 8px;
		overflow: visible;
		padding: 0;
		width: 8px;
	}
	.calendar-game span {
		display: none;
	}
}

.player-card {
	padding: 24px;
	position: relative;
	text-align: center;
}
.player-card .avatar,
.player-card .player-thumb {
	border-radius: 25px;
	font-size: 1.4rem;
	height: 80px;
	margin: 0 auto 14px;
	width: 80px;
}
.player-card h3 {
	margin: 0;
}
.player-card p {
	color: var(--muted);
	margin: 5px 0 16px;
}
.mini-stats {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(3, 1fr);
}
.mini-stats div {
	background: var(--surface-2);
	border-radius: 12px;
	padding: 10px;
}
.mini-stats strong,
.mini-stats small {
	display: block;
}
.mini-stats small {
	color: var(--muted);
	font-size: 0.72rem;
	margin-top: 3px;
}

.profile-hero {
	align-items: center;
	display: grid;
	gap: 22px;
	grid-template-columns: auto 1fr auto;
}
.profile-hero .avatar,
.profile-hero .player-thumb {
	border-radius: 30px;
	font-size: 2.2rem;
	height: 110px;
	width: 110px;
}
.profile-hero h1 {
	font-size: 2.4rem;
	margin: 0;
}
.profile-hero p {
	color: var(--muted);
	margin: 8px 0 14px;
}
.badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.badge {
	background: var(--green-soft);
	border-radius: 999px;
	color: var(--green-dark);
	font-size: 0.8rem;
	font-weight: 850;
	padding: 8px 11px;
}
.profile-rank {
	text-align: right;
}
.profile-rank strong {
	color: var(--green);
	display: block;
	font-size: 2.5rem;
}
.profile-rank span {
	color: var(--muted);
}
.chart {
	background:
		linear-gradient(to top, var(--surface-2) 1px, transparent 1px) 0 0/100% 25%,
		linear-gradient(to right, var(--surface-2) 1px, transparent 1px) 0 0/12.5% 100%;
	border: 1px dashed var(--line);
	border-radius: 18px;
	height: 250px;
	overflow: hidden;
	position: relative;
}
.chart svg {
	height: calc(100% - 36px);
	inset: 18px;
	position: absolute;
	width: calc(100% - 36px);
}
.chart polyline {
	fill: none;
	stroke: var(--green);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 4;
}

.footer {
	background: #1b2b4a;
	color: #aab6c9;
	font-size: 0.88rem;
	padding: 36px 0 52px;
}
.footer-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: space-between;
}
.footer a {
	color: #eef4ff;
	font-weight: 700;
}
.footer a:hover {
	color: #71a7f7;
}

/* ---------- Authentication-style card (used for standalone form pages) ---------- */
.auth-page {
	display: grid;
	min-height: calc(100vh - 76px);
	padding: 34px 0;
	place-items: center;
}
.auth-layout {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 30px;
	box-shadow: var(--shadow);
	display: grid;
	grid-template-columns: 1fr 440px;
	overflow: hidden;
	width: min(calc(100% - 28px), 1020px);
}
.auth-showcase {
	background: linear-gradient(145deg, #174b94, #233b61);
	color: white;
	overflow: hidden;
	padding: 52px;
	position: relative;
}
.auth-showcase:after {
	bottom: -86px;
	color: rgba(255, 255, 255, 0.055);
	content: '\2660';
	font-size: 19rem;
	position: absolute;
	right: -20px;
	transform: rotate(-12deg);
}
.auth-showcase h1 {
	color: #fff;
	font-size: clamp(2.5rem, 5vw, 4.6rem);
	letter-spacing: -0.06em;
	line-height: 0.96;
	margin: 18px 0;
}
.auth-showcase p {
	color: #d8e6fb;
	line-height: 1.7;
	max-width: 500px;
}
.auth-benefits {
	display: grid;
	gap: 13px;
	margin-top: 34px;
}
.auth-benefit {
	align-items: center;
	display: flex;
	gap: 12px;
}
.auth-check {
	background: rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	display: grid;
	height: 30px;
	place-items: center;
	width: 30px;
}
.auth-card {
	align-self: center;
	padding: 48px 42px;
}
.auth-card h2 {
	font-size: 2rem;
	letter-spacing: -0.04em;
	margin: 0;
}
.auth-card > p {
	color: var(--muted);
	font-weight: 400;
	margin: 8px 0 26px;
}
.form-group {
	margin-bottom: 17px;
}
.form-group label,
.form-label {
	color: var(--text);
	display: block;
	font-size: 0.88rem;
	font-weight: 800;
	margin-bottom: 8px;
}
.form-row {
	align-items: center;
	display: flex;
	font-size: 0.87rem;
	gap: 15px;
	justify-content: space-between;
	margin: 4px 0 22px;
}
.check-row {
	align-items: center;
	color: var(--muted);
	display: flex;
	gap: 8px;
}
.text-link {
	color: var(--green);
	font-weight: 800;
}
.login-menu .btn {
	width: 100%;
}
.auth-card .btn {
	width: 100%;
}
.auth-note {
	color: var(--muted);
	font-size: 0.85rem;
	margin-top: 20px;
	text-align: center;
}

/* ---------- Misc real-app pieces the mockup didn't need ---------- */
.alert {
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	font-size: 0.92rem;
	font-weight: 600;
	margin: 20px 0;
	padding: 14px 16px;
}
.alert-success {
	background: #eafaf0;
	border-color: #c9ecd6;
	color: #1e7a45;
}
.alert-danger {
	background: #fbeeee;
	border-color: #f0d3d3;
	color: #8a3535;
}
.alert-warning {
	background: #fdf4e2;
	border-color: #f0dfae;
	color: #8a651d;
}
.alert-secondary {
	background: var(--surface-2);
	border-color: var(--line);
	color: var(--muted);
}
.required-mark {
	color: var(--red);
	font-weight: 800;
	margin-left: 0.2rem;
}
.rich-content img {
	display: inline-block;
	height: auto;
	margin: 0 3px;
	max-width: 100%;
	vertical-align: middle;
}
.rich-content {
	line-height: 1.7;
	word-wrap: break-word;
}
.player-thumb {
	border-radius: 50%;
	object-fit: cover;
}
.progress {
	background: var(--line);
	border-radius: 999px;
	height: 6px;
	overflow: hidden;
}
.progress-bar {
	background: var(--green);
	border-radius: 999px;
	height: 100%;
}
.form-check {
	align-items: center;
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
}
.form-check input {
	padding: 0;
	width: auto;
}
.form-check label {
	color: var(--text);
	font-size: 0.9rem;
	font-weight: 500;
}

/* ---------- Grouped edit forms (e.g. Manage Players) ---------- */
.form-section {
	margin-bottom: 28px;
}
.form-section:last-of-type {
	margin-bottom: 0;
}
.form-section-title {
	align-items: center;
	border-bottom: 1px solid var(--line);
	color: var(--muted);
	display: flex;
	font-size: 0.78rem;
	font-weight: 800;
	gap: 8px;
	letter-spacing: 0.03em;
	margin-bottom: 18px;
	padding-bottom: 10px;
	text-transform: uppercase;
}
.form-section-title i {
	color: var(--green);
	font-size: 0.9rem;
}
.field-icon {
	position: relative;
}
.field-icon > i {
	color: var(--muted);
	font-size: 0.85rem;
	left: 14px;
	pointer-events: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}
.field-icon > .form-control,
.field-icon > .form-select {
	padding-left: 38px;
}
.form-check-tile {
	align-items: center;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 13px;
	display: flex;
	gap: 10px;
	height: 100%;
	padding: 12px 14px;
}
.form-check-tile input {
	flex: 0 0 auto;
	height: 16px;
	width: 16px;
}
.form-check-tile label {
	align-items: center;
	color: var(--text);
	display: flex;
	font-size: 0.9rem;
	font-weight: 600;
	gap: 8px;
	margin: 0;
}
.form-check-tile label i {
	color: var(--green);
}
dl.row {
	display: grid;
	gap: 8px 16px;
	grid-template-columns: 1fr 2fr;
	margin: 0;
}
dl.row dt {
	color: var(--text);
	font-weight: 800;
}
dl.row dd {
	color: var(--muted);
	margin: 0;
}

/* Card header/body/footer -- used by the form-style pages (account, admin
   tools, contact, etc.) that don't have a literal mockup page of their own.
   Same card shell, styled consistently with the rest of the theme. */
.card-header {
	background: linear-gradient(145deg, var(--green-dark), #1d2e49);
	border-radius: var(--radius) var(--radius) 0 0;
	color: #fff;
	margin: -22px -22px 18px;
	padding: 18px 22px;
}
.card-header .card-title {
	color: #fff;
	font-size: 1.05rem;
	font-weight: 800;
	margin: 0;
}
body.dark .card-header .card-title {
	color: #101722;
}
.card-header .card-title a {
	color: inherit;
}
.card-header .text-muted,
.card-header .small {
	color: #bcd7ff !important;
}
.card-body {
	padding: 0;
}
.card-footer {
	align-items: center;
	background: var(--surface-2);
	border-radius: 0 0 var(--radius) var(--radius);
	border-top: 1px solid var(--line);
	display: flex;
	gap: 0.5rem;
	margin: 18px -22px -22px;
	padding: 16px 22px;
}
.card.h-100 {
	display: flex;
	flex-direction: column;
}
.card.h-100 .card-footer {
	margin-top: auto;
}
.account-recovery-grid > [class*='col'] {
	display: flex;
}
.account-recovery-card {
	width: 100%;
}
.account-recovery-card form {
	display: flex;
	flex: 1;
	flex-direction: column;
}
.account-recovery-card .card-body {
	flex: 1;
	padding-bottom: 18px;
}
.account-recovery-card .card-footer {
	margin-top: 0;
}
.table-responsive {
	overflow-x: auto;
}
.list-group {
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	list-style: none;
	margin: 0;
	overflow: hidden;
	padding: 0;
}
.list-group-flush {
	border: 0;
	border-radius: 0;
}
.list-group-item {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	display: block;
	padding: 14px 16px;
}
.list-group-item:last-child {
	border-bottom: 0;
}
.list-group-item-action:hover {
	background: var(--surface-2);
}
.badge.bg-success {
	background: #dcf5e4 !important;
	color: #1e7a45 !important;
}
.badge.bg-secondary {
	background: var(--surface-2) !important;
	color: var(--muted) !important;
}

/* ---------- Compatibility utilities (Bootstrap-named classes PHP templates
   still use for spacing/layout; recreated here since Bootstrap itself is
   no longer loaded) ---------- */
.d-flex {
	display: flex;
}
.d-inline {
	display: inline;
}
.d-inline-flex {
	display: inline-flex;
}
.d-block {
	display: block;
}
.d-none {
	display: none;
}
.flex-wrap {
	flex-wrap: wrap;
}
.flex-grow-1 {
	flex-grow: 1;
}
.align-items-center {
	align-items: center;
}
.justify-content-end {
	justify-content: flex-end;
}
.justify-content-between {
	justify-content: space-between;
}
.gap-1 {
	gap: 0.25rem;
}
.gap-2 {
	gap: 0.5rem;
}
.gap-3 {
	gap: 1rem;
}
.text-muted {
	color: var(--muted) !important;
}
.text-danger {
	color: var(--red) !important;
}
.text-center {
	text-align: center;
}
.text-end {
	text-align: right;
}
.text-start {
	text-align: left;
}
.text-decoration-none {
	text-decoration: none;
}
.small {
	font-size: 0.87rem;
}
.fw-bold {
	font-weight: 800;
}
.w-100 {
	width: 100%;
}
.h-100 {
	height: 100%;
}
.border-top {
	border-top: 1px solid var(--line);
}
.rounded-circle {
	border-radius: 50%;
}
.stretched-link::after {
	content: '';
	inset: 0;
	position: absolute;
	z-index: 1;
}
.card-clickable {
	cursor: pointer;
	position: relative;
}

/* ---------- Drag-to-reorder rows (Update Season Standings) ---------- */
.drag-handle {
	color: var(--muted);
	cursor: grab;
	text-align: center;
	width: 32px;
}
.drag-handle:active {
	cursor: grabbing;
}
[data-sortable-rows] tbody tr.dragging {
	background: var(--surface-2);
	opacity: 0.6;
}
[data-position-input] {
	background: var(--surface-2) !important;
	color: var(--muted);
	cursor: default;
}

/* ---------- Admin Centre menu (icon tiles) ---------- */
.admin-menu-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(2, 1fr);
}
.admin-menu-item {
	align-items: center;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	color: var(--text);
	display: flex;
	gap: 16px;
	padding: 20px;
	text-decoration: none;
	transition:
		transform 0.16s ease,
		box-shadow 0.16s ease,
		border-color 0.16s ease;
}
.admin-menu-item:hover {
	border-color: transparent;
	box-shadow: 0 22px 45px rgba(32, 65, 112, 0.16);
	transform: translateY(-3px);
}
.admin-menu-icon {
	align-items: center;
	border-radius: 14px;
	display: grid;
	flex: 0 0 52px;
	font-size: 1.2rem;
	height: 52px;
	place-items: center;
	width: 52px;
}
.admin-menu-copy {
	min-width: 0;
}
.admin-menu-copy h3 {
	font-size: 1rem;
	margin: 0 0 4px;
}
.admin-menu-copy p {
	color: var(--muted);
	font-size: 0.85rem;
	line-height: 1.5;
	margin: 0;
}
.admin-menu-arrow {
	color: var(--muted);
	flex: 0 0 auto;
	font-size: 0.85rem;
	margin-left: auto;
	transition: transform 0.16s ease;
}
.admin-menu-item:hover .admin-menu-arrow {
	transform: translateX(3px);
}
.admin-menu-item-blue .admin-menu-icon {
	background: var(--green-soft);
	color: var(--green-dark);
}
.admin-menu-item-purple .admin-menu-icon {
	background: var(--purple-soft);
	color: var(--purple-dark);
}
.admin-menu-item-orange .admin-menu-icon {
	background: var(--orange-soft);
	color: var(--orange-dark);
}
.admin-menu-item-teal .admin-menu-icon {
	background: var(--teal-soft);
	color: var(--teal-dark);
}
@media (max-width: 760px) {
	.admin-menu-grid {
		grid-template-columns: 1fr;
	}
	.admin-menu-item {
		padding: 16px;
	}
}
.card-link-above {
	position: relative;
	z-index: 2;
}
.mb-0 {
	margin-bottom: 0 !important;
}
.mb-1 {
	margin-bottom: 0.25rem !important;
}
.mb-2 {
	margin-bottom: 0.5rem !important;
}
.mb-3 {
	margin-bottom: 1rem !important;
}
.mb-4 {
	margin-bottom: 1.5rem !important;
}
.mt-1 {
	margin-top: 0.25rem !important;
}
.mt-2 {
	margin-top: 0.5rem !important;
}
.mt-3 {
	margin-top: 1rem !important;
}
.mt-4 {
	margin-top: 1.5rem !important;
}
.mt-5 {
	margin-top: 3rem !important;
}
.me-1 {
	margin-right: 0.25rem;
}
.me-2 {
	margin-right: 0.5rem;
}
.ms-1 {
	margin-left: 0.25rem;
}
.ms-2 {
	margin-left: 0.5rem;
}
.ms-lg-auto {
	margin-left: auto;
}
.p-0 {
	padding: 0;
}
.p-2 {
	padding: 0.5rem;
}
.p-3 {
	padding: 1rem;
}
.py-2 {
	padding-bottom: 0.5rem;
	padding-top: 0.5rem;
}
.py-4 {
	padding-bottom: 1.5rem;
	padding-top: 1.5rem;
}
.py-5 {
	padding-bottom: 3rem;
	padding-top: 3rem;
}
.pt-2 {
	padding-top: 0.5rem;
}
.pb-0 {
	padding-bottom: 0;
}
/* 12-column grid, used by a handful of two-column forms */
.row {
	display: flex;
	flex-wrap: wrap;
	margin-left: -0.5rem;
	margin-right: -0.5rem;
}
.row > [class*='col'] {
	margin-bottom: 1rem;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
}
.col-12 {
	flex: 0 0 100%;
	max-width: 100%;
}
.col-8 {
	flex: 0 0 66.6667%;
	max-width: 66.6667%;
}
.col-4 {
	flex: 0 0 33.3333%;
	max-width: 33.3333%;
}
.col-sm-4,
.col-sm-6,
.col-sm-8 {
	flex: 0 0 100%;
	max-width: 100%;
}
@media (min-width: 576px) {
	.col-sm-4 {
		flex: 0 0 33.3333%;
		max-width: 33.3333%;
	}
	.col-sm-6 {
		flex: 0 0 50%;
		max-width: 50%;
	}
	.col-sm-8 {
		flex: 0 0 66.6667%;
		max-width: 66.6667%;
	}
}
@media (min-width: 768px) {
	.col-md-4 {
		flex: 0 0 33.3333%;
		max-width: 33.3333%;
	}
	.col-md-6 {
		flex: 0 0 50%;
		max-width: 50%;
	}
	.col-md-8 {
		flex: 0 0 66.6667%;
		max-width: 66.6667%;
	}
}

@media (max-width: 980px) {
	.nav {
		display: none;
	}
	.menu-btn {
		display: grid;
	}
	.profile-chip .account-copy {
		display: none;
	}
	.hero-grid,
	.content-grid {
		grid-template-columns: 1fr;
	}
	.stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.player-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 680px) {
	.hide-mobile {
		display: none;
	}
	.container {
		width: min(calc(100% - 20px), var(--container));
	}
	.header-row {
		gap: 10px;
		height: 68px;
	}
	.hero {
		border-radius: 22px;
		padding: 24px;
	}
	.hero h1 {
		font-size: 2.7rem;
	}
	.hero-actions {
		justify-content: center;
	}
	.next-game {
		min-height: auto;
		padding: 18px;
	}
	.next-game h3 {
		font-size: 1.4rem;
		margin: 12px 0 6px;
	}
	.next-game .game-info {
		gap: 8px;
		margin: 12px 0;
	}
	.next-game .info-pill {
		padding: 10px;
	}
	.stats-grid,
	.news-grid,
	.player-grid {
		grid-template-columns: 1fr;
	}
	.stats-grid .stat-pop {
		text-align: center;
	}
	.stats-grid .stat-pop-icon {
		margin-left: auto;
		margin-right: auto;
	}
	.section-head,
	.toolbar {
		align-items: stretch;
		flex-direction: column;
	}
	.footer-row {
		align-items: center;
		flex-direction: column;
		text-align: center;
	}
	.filters {
		width: 100%;
	}
	.filters select {
		flex: 1;
	}
	.profile-hero {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.profile-hero .avatar,
	.profile-hero .player-thumb {
		margin: auto;
	}
	.profile-rank {
		text-align: center;
	}
	.timeline-item {
		grid-template-columns: 52px 1fr;
	}
	.timeline-item .season-archive-winners {
		grid-column: 2;
		justify-content: flex-start;
		text-align: left;
	}
	.auth-layout {
		grid-template-columns: 1fr;
	}
	.auth-showcase {
		display: none;
	}
	.account-dropdown {
		left: 10px;
		position: fixed;
		right: 10px;
		top: 76px;
		width: auto;
	}
	.login-menu .account-dropdown {
		width: auto;
	}
}

/* ---------- Player dashboard ---------- */

.player-dashboard-hero {
	align-items: center;
	background:
		radial-gradient(circle at 92% 0, rgba(37, 99, 185, 0.28), transparent 34%),
		linear-gradient(145deg, #172a4a, #213b65);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 28px;
	box-shadow: var(--shadow);
	color: #fff;
	display: flex;
	gap: 28px;
	justify-content: space-between;
	overflow: hidden;
	padding: 30px;
	position: relative;
}

.player-dashboard-identity {
	align-items: center;
	display: flex;
	gap: 22px;
	min-width: 0;
	position: relative;
	z-index: 1;
}

.player-dashboard-photo {
	background: rgba(255, 255, 255, 0.12);
	border: 4px solid rgba(255, 255, 255, 0.18);
	border-radius: 24px;
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
	flex: 0 0 auto;
	height: 118px;
	overflow: hidden;
	width: 118px;
}

.player-dashboard-photo img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.player-dashboard-copy {
	min-width: 0;
}

.player-dashboard-copy .eyebrow {
	color: #9fc4ff;
}

.player-dashboard-copy h1 {
	color: #fff;
	font-size: clamp(2rem, 5vw, 3.3rem);
	letter-spacing: -0.05em;
	line-height: 1;
	margin: 8px 0 10px;
}

.player-dashboard-subtitle {
	align-items: center;
	color: #c7d7ed;
	display: flex;
	flex-wrap: wrap;
	font-size: 0.98rem;
	gap: 9px;
	margin: 0;
}

.player-dashboard-subtitle i {
	margin-right: 4px;
}

.player-dashboard-dot {
	color: #7189aa;
}

.player-dashboard-badges {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 18px;
}

.player-status-badge,
.player-edit-profile {
	align-items: center;
	background: rgba(255, 255, 255, 0.09);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	color: #fff;
	display: inline-flex;
	font-size: 0.82rem;
	font-weight: 800;
	gap: 8px;
	padding: 9px 13px;
}

.player-edit-profile {
	transition:
		background 0.2s ease,
		transform 0.2s ease;
}

.player-edit-profile:hover {
	background: rgba(255, 255, 255, 0.16);
	transform: translateY(-1px);
}

.player-status-dot {
	background: #94a3b8;
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.15);
	height: 8px;
	width: 8px;
}

.player-status-badge.is-active .player-status-dot {
	background: #58d49e;
	box-shadow: 0 0 0 4px rgba(88, 212, 158, 0.15);
}

.player-season-rank {
	align-items: center;
	background: rgba(255, 255, 255, 0.09);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 22px;
	display: flex;
	flex: 0 0 auto;
	gap: 14px;
	padding: 17px 20px;
	position: relative;
	z-index: 1;
}

.player-season-rank-icon {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 15px;
	display: grid;
	font-size: 1.25rem;
	height: 48px;
	place-items: center;
	width: 48px;
}

.player-season-rank strong,
.player-season-rank span {
	display: block;
}

.player-season-rank strong {
	color: #fff;
	font-size: 1.65rem;
	line-height: 1;
}

.player-season-rank div > span {
	color: #aebfd7;
	font-size: 0.75rem;
	font-weight: 750;
	margin-top: 5px;
	text-transform: uppercase;
}

.player-dashboard-stats {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.player-dashboard-stat {
	align-items: center;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	display: flex;
	gap: 15px;
	min-width: 0;
	padding: 20px;
	transition:
		border-color 0.2s ease,
		transform 0.2s ease;
}

a.player-dashboard-stat:hover {
	border-color: rgba(37, 99, 185, 0.45);
	transform: translateY(-2px);
}

.player-dashboard-stat-icon {
	border-radius: 16px;
	display: grid;
	flex: 0 0 auto;
	font-size: 1.12rem;
	height: 50px;
	place-items: center;
	width: 50px;
}

.player-dashboard-stat-icon.is-blue {
	background: var(--green-soft);
	color: var(--green-dark);
}

.player-dashboard-stat-icon.is-gold {
	background: #fff2cf;
	color: #9a6810;
}

.player-dashboard-stat-icon.is-purple {
	background: var(--purple-soft);
	color: var(--purple-dark);
}

.player-dashboard-stat-icon.is-green {
	background: var(--teal-soft);
	color: var(--teal-dark);
}

.player-dashboard-stat-icon.is-red {
	background: #f8dddd;
	color: var(--red);
}

.player-dashboard-stat > div {
	min-width: 0;
}

.player-dashboard-stat-label,
.player-dashboard-stat strong,
.player-dashboard-stat small {
	display: block;
}

.player-dashboard-stat-label {
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
}

.player-dashboard-stat strong {
	color: var(--text);
	font-size: 1.75rem;
	letter-spacing: -0.04em;
	line-height: 1;
	margin-top: 5px;
}

.player-dashboard-stat small {
	color: var(--muted);
	font-size: 0.76rem;
	margin-top: 6px;
}

.player-dashboard-stat strong.is-positive {
	color: var(--teal-dark);
}

.player-dashboard-stat strong.is-negative {
	color: var(--red);
}

.player-dashboard-main-grid,
.player-dashboard-secondary-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.8fr);
}

.player-dashboard-secondary-grid {
	grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
}

.player-dashboard-panel {
	padding: 24px;
}

.player-dashboard-panel-head {
	align-items: flex-start;
	display: flex;
	gap: 18px;
	justify-content: space-between;
	margin-bottom: 22px;
}

.player-dashboard-panel-head h2 {
	font-size: clamp(1.35rem, 2.5vw, 1.8rem);
	margin-top: 5px;
}

.player-dashboard-panel-head p {
	color: var(--muted);
	line-height: 1.55;
	margin: 6px 0 0;
}

.player-dashboard-panel-icon {
	background: var(--green-soft);
	border-radius: 15px;
	color: var(--green-dark);
	display: grid;
	flex: 0 0 auto;
	font-size: 1.05rem;
	height: 46px;
	place-items: center;
	width: 46px;
}
.player-about-icon i,
.player-achievement-icon i,
.player-dashboard-stat-icon i,
.player-dashboard-panel-icon i {
	align-items: center;
	display: flex;
	height: 100%;
	justify-content: center;
	line-height: 1;
	width: 100%;
}

.game-type-dashboard-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-type-dashboard-card {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 18px;
	transition:
		border-color 0.2s ease,
		transform 0.2s ease;
}

.game-type-dashboard-card:hover {
	border-color: rgba(37, 99, 185, 0.35);
	transform: translateY(-2px);
}

.game-type-dashboard-top {
	align-items: center;
	display: flex;
	gap: 12px;
}

.game-type-dashboard-icon {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 13px;
	color: var(--red);
	display: grid;
	flex: 0 0 auto;
	height: 42px;
	place-items: center;
	width: 42px;
}

.game-type-dashboard-title {
	min-width: 0;
}

.game-type-dashboard-title h3 {
	font-size: 1rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.game-type-dashboard-title span {
	color: var(--muted);
	display: block;
	font-size: 0.74rem;
	margin-top: 3px;
}

.game-type-dashboard-link {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 11px;
	color: var(--muted);
	display: grid;
	flex: 0 0 auto;
	height: 36px;
	margin-left: auto;
	place-items: center;
	transition:
		background 0.2s ease,
		color 0.2s ease,
		transform 0.2s ease;
	width: 36px;
}

.game-type-dashboard-link:hover {
	background: var(--green);
	border-color: var(--green);
	color: #fff;
	transform: translateX(2px);
}

.game-type-dashboard-numbers {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(3, 1fr);
	margin-top: 18px;
}

.game-type-dashboard-numbers div {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 11px;
}

.game-type-dashboard-numbers strong,
.game-type-dashboard-numbers span {
	display: block;
}

.game-type-dashboard-numbers strong {
	font-size: 1.12rem;
}

.game-type-dashboard-numbers span {
	color: var(--muted);
	font-size: 0.7rem;
	margin-top: 3px;
}

.game-type-dashboard-progress {
	margin-top: 16px;
}

.game-type-dashboard-progress-label {
	align-items: center;
	color: var(--muted);
	display: flex;

	font-size: 0.72rem;
	justify-content: space-between;
	margin-bottom: 7px;
}

.game-type-dashboard-progress-label strong {
	color: var(--text);
}

.game-type-dashboard-track {
	background: var(--surface);
	border-radius: 999px;
	height: 7px;
	overflow: hidden;
}

.game-type-dashboard-track span {
	background: linear-gradient(90deg, var(--green), #6ca6f7);
	border-radius: inherit;
	display: block;
	height: 100%;
	min-width: 2px;
}

.player-about-list {
	display: grid;
	gap: 10px;
}

.player-about-row {
	align-items: center;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 15px;
	display: flex;
	gap: 13px;
	padding: 13px;
}

.player-about-icon {
	background: var(--surface);
	border-radius: 11px;
	color: var(--green);
	display: grid;
	flex: 0 0 auto;
	height: 39px;
	place-items: center;
	width: 39px;
}

.player-about-row span,
.player-about-row strong {
	display: block;
}

.player-about-row div > span {
	color: var(--muted);
	font-size: 0.7rem;
	font-weight: 750;
	text-transform: uppercase;
}

.player-about-row strong {
	font-size: 0.88rem;
	margin-top: 3px;
	overflow-wrap: anywhere;
}

.player-about-row a:hover {
	color: var(--green);
}

.player-about-locked {
	align-items: center;
	background: var(--surface-2);
	border: 1px dashed var(--line);
	border-radius: 15px;
	color: var(--muted);
	display: flex;
	gap: 12px;
	padding: 15px;
}

.player-about-locked > i {
	color: var(--green);
	font-size: 1.15rem;
}

.player-about-locked strong,
.player-about-locked span {
	display: block;
}

.player-about-locked strong {
	color: var(--text);
	font-size: 0.87rem;
}

.player-about-locked span {
	font-size: 0.75rem;
	margin-top: 3px;
}

.player-dashboard-empty {
	align-items: center;
	background: var(--surface-2);
	border: 1px dashed var(--line);
	border-radius: 18px;
	display: flex;
	flex-direction: column;
	padding: 42px 20px;
	text-align: center;
}

.player-dashboard-empty > span {
	background: var(--surface);
	border-radius: 16px;
	color: var(--muted);
	display: grid;
	font-size: 1.3rem;
	height: 54px;
	place-items: center;
	width: 54px;
}

.player-dashboard-empty h3 {
	margin-top: 14px;
}

.player-dashboard-empty p {
	color: var(--muted);
	margin: 6px 0 0;
	max-width: 420px;
}

.player-finance-highlight {
	border-radius: 19px;
	color: #fff;
	padding: 22px;
}

.player-finance-highlight.is-positive {
	background: linear-gradient(145deg, #146657, #238d78);
}

.player-finance-highlight.is-negative {
	background: linear-gradient(145deg, #833a3a, #b94949);
}

.player-finance-highlight span,
.player-finance-highlight strong,
.player-finance-highlight small {
	display: block;
}

.player-finance-highlight span {
	font-size: 0.78rem;
	font-weight: 800;
	opacity: 0.82;
	text-transform: uppercase;
}

.player-finance-highlight strong {
	color: #fff;
	font-size: clamp(2rem, 4vw, 3rem);
	letter-spacing: -0.05em;
	line-height: 1;
	margin-top: 8px;
}

.player-finance-highlight small {
	margin-top: 8px;
	opacity: 0.82;
}

.player-finance-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 14px;
}

.player-finance-card {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 15px;
	padding: 15px;
}

.player-finance-card span,
.player-finance-card strong,
.player-finance-card small {
	display: block;
}

.player-finance-card span {
	color: var(--muted);
	font-size: 0.72rem;
	font-weight: 750;
	text-transform: uppercase;
}

.player-finance-card strong {
	font-size: 1.15rem;
	margin-top: 6px;
}

.player-finance-card small {
	color: var(--muted);
	font-size: 0.72rem;
	margin-top: 5px;
}

.player-achievement-list {
	display: grid;
	gap: 11px;
}

.player-achievement {
	align-items: center;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 15px;
	display: flex;
	gap: 13px;
	padding: 13px;
}

.player-achievement-icon {
	border-radius: 12px;
	display: grid;
	flex: 0 0 auto;
	height: 43px;
	place-items: center;
	width: 43px;
}

.player-achievement-icon.is-gold {
	background: #fff2cf;
	color: #9a6810;
}

.player-achievement-icon.is-green {
	background: var(--teal-soft);
	color: var(--teal-dark);
}

.player-achievement-icon.is-purple {
	background: var(--purple-soft);
	color: var(--purple-dark);
}

.player-achievement-icon.is-blue {
	background: var(--green-soft);
	color: var(--green-dark);
}

.player-achievement strong,
.player-achievement span {
	display: block;
}

.player-achievement strong {
	font-size: 0.9rem;
}

.player-achievement div > span {
	color: var(--muted);
	font-size: 0.73rem;
	margin-top: 4px;
}

.player-tendency-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-tendency-card {
	align-items: flex-start;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 17px;
	display: flex;
	gap: 14px;
	padding: 17px;
}

.player-tendency-icon {
	background: var(--surface);
	border-radius: 12px;
	color: var(--green);
	display: grid;
	flex: 0 0 auto;
	height: 42px;
	place-items: center;
	width: 42px;
}

.player-tendency-card h3 {
	font-size: 0.9rem;
	margin-bottom: 7px;
}

.player-tendency-card .rich-content {
	color: var(--muted);
	font-size: 0.88rem;
	line-height: 1.55;
}

.player-tendency-card .rich-content > :first-child {
	margin-top: 0;
}

.player-tendency-card .rich-content > :last-child {
	margin-bottom: 0;
}

.player-season-grid {
	display: grid;
	gap: 12px;
}

.player-season-card {
	align-items: center;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 17px;
	display: grid;
	gap: 18px;
	grid-template-columns: minmax(100px, 0.8fr) minmax(160px, 1.2fr) minmax(90px, 0.7fr) 38px;
	padding: 15px 17px;
	transition:
		border-color 0.2s ease,
		transform 0.2s ease;
}

.player-season-card:hover {
	border-color: rgba(37, 99, 185, 0.42);
	transform: translateX(3px);
}

.player-season-number span,
.player-season-number strong,
.player-season-finish span,
.player-season-finish strong,
.player-season-points span,
.player-season-points strong {
	display: block;
}

.player-season-number span,
.player-season-finish div > span,
.player-season-points span {
	color: var(--muted);
	font-size: 0.7rem;
	font-weight: 750;
	text-transform: uppercase;
}

.player-season-number strong,
.player-season-finish strong,
.player-season-points strong {
	font-size: 1.05rem;
	margin-top: 4px;
}

.player-season-finish {
	align-items: center;
	display: flex;
	gap: 11px;
}

.player-season-medal {
	background: var(--surface);
	border-radius: 11px;
	color: var(--muted);
	display: grid !important;
	flex: 0 0 auto;
	height: 39px;
	place-items: center;
	width: 39px;
}

.player-season-card.is-first .player-season-medal {
	background: #fff2cf;
	color: #9a6810;
}

.player-season-card.is-second .player-season-medal {
	background: #e8edf4;
	color: #667085;
}

.player-season-card.is-third .player-season-medal {
	background: var(--orange-soft);
	color: var(--orange-dark);
}

.player-season-arrow {
	background: var(--surface);
	border-radius: 10px;
	color: var(--muted);
	display: grid;
	height: 36px;
	place-items: center;
	width: 36px;
}

body.dark .player-dashboard-hero {
	background:
		radial-gradient(circle at 92% 0, rgba(113, 167, 247, 0.22), transparent 34%),
		linear-gradient(145deg, #17243a, #203656);
}

body.dark .player-dashboard-stat-icon.is-gold,
body.dark .player-achievement-icon.is-gold {
	background: #403415;
	color: #efc86c;
}

body.dark .player-dashboard-stat-icon.is-red {
	background: #44252b;
}

body.dark .player-season-card.is-first .player-season-medal {
	background: #403415;
	color: #efc86c;
}

body.dark .player-season-card.is-second .player-season-medal {
	background: #303b4d;
	color: #c7d0de;
}

@media ( max-width: 980px ) {
	.player-dashboard-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.player-dashboard-main-grid,
	.player-dashboard-secondary-grid {
		grid-template-columns: 1fr;
	}
}

@media ( max-width: 700px ) {
	.player-dashboard-hero {
		align-items: flex-start;
		flex-direction: column;
		padding: 23px;
	}

	.player-dashboard-identity {
		align-items: flex-start;
	}

	.player-dashboard-photo {
		border-radius: 19px;
		height: 88px;
		width: 88px;
	}

	.player-dashboard-copy h1 {
		font-size: 2rem;
	}

	.player-season-rank {
		width: 100%;
	}

	.game-type-dashboard-grid,
	.player-tendency-grid,
	.player-finance-grid {
		grid-template-columns: 1fr;
	}

	.player-season-card {
		grid-template-columns: 1fr 1fr;
	}

	.player-season-arrow {
		display: none;
	}
}

@media ( max-width: 520px ) {
	.player-dashboard-identity {
		flex-direction: column;
	}

	.player-dashboard-stats {
		grid-template-columns: 1fr;
	}

	.player-dashboard-stat {
		padding: 17px;
	}

	.player-dashboard-panel {
		padding: 19px;
	}

	.player-dashboard-panel-head {
		gap: 12px;
	}

	.player-dashboard-panel-icon {
		height: 40px;
		width: 40px;
	}

	.game-type-dashboard-numbers {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.game-type-dashboard-numbers div {
		padding: 9px 7px;
	}

	.player-season-card {
		grid-template-columns: 1fr;
	}

	.player-season-finish {
		border-bottom: 1px solid var(--line);
		border-top: 1px solid var(--line);
		padding: 12px 0;
	}
}

/* New season roster picker */
.season-roster-picker {
	border-top: 1px solid var(--line);
	padding-top: 24px;
}
.season-roster-heading {
	align-items: flex-start;
	display: flex;
	gap: 16px;
	justify-content: space-between;
	margin-bottom: 14px;
}
.season-roster-heading h3 {
	font-size: 1.05rem;
	margin: 0 0 4px;
}
.season-roster-heading p {
	color: var(--muted);
	margin: 0;
}
.season-roster-count {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 800;
	padding: 7px 11px;
	white-space: nowrap;
}
.season-roster-tools {
	align-items: center;
	display: grid;
	gap: 12px;
	grid-template-columns: minmax( 0, 1fr ) auto;
	margin-bottom: 14px;
}
.season-roster-actions {
	display: flex;
	gap: 8px;
}
.season-roster-grid {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	max-height: 430px;
	overflow-y: auto;
	padding-right: 4px;
}
.season-roster-player {
	align-items: center;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 12px;
	cursor: pointer;
	display: flex;
	gap: 11px;
	padding: 12px 14px;
}
.season-roster-player:has(input:checked) {
	border-color: var(--blue);
	box-shadow: 0 0 0 2px rgba( 37, 99, 235, 0.12 );
}
.season-roster-player input {
	flex: 0 0 auto;
	height: 18px;
	width: 18px;
}
.season-roster-player span {
	display: grid;
	min-width: 0;
}
.season-roster-player strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.season-roster-player small {
	color: var(--muted);
}
.season-roster-player.is-hidden {
	display: none;
}
@media ( max-width: 700px ) {
	.season-roster-heading,
	.season-roster-tools {
		align-items: stretch;
		grid-template-columns: 1fr;
	}
	.season-roster-heading {
		display: grid;
	}
	.season-roster-count {
		justify-self: start;
	}
	.season-roster-actions {
		flex-wrap: wrap;
	}
	.season-roster-grid {
		grid-template-columns: 1fr;
		max-height: 520px;
	}
}
