.b16-stats-page {
	padding: 8px 0 28px;
	max-width: none;
	width: 100%;
}

.b16-stats-page__layout {
	display: grid;
	grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
	gap: 18px;
	align-items: start;
}

.b16-stats-page__servers {
	background: #101014;
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 18px;
	padding: 14px;
	position: sticky;
	top: 88px;
}

.b16-stats-page__servers-title {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
	margin: 0 0 10px;
}

.b16-stats-page__server-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.b16-stats-page__server-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	border: 1px solid transparent;
	background: rgba(255, 255, 255, 0.03);
	color: rgba(255, 255, 255, 0.88);
	border-radius: 14px;
	padding: 11px 12px;
	text-align: left;
	font-size: 13px;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
	box-sizing: border-box;
}

.b16-stats-page__server-btn i {
	font-size: 18px;
	color: rgba(255, 255, 255, 0.35);
	flex-shrink: 0;
}

.b16-stats-page__server-btn:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	text-decoration: none;
}

.b16-stats-page__server-btn.is-active {
	border-color: rgba(124, 107, 255, 0.45);
	background: rgba(124, 107, 255, 0.12);
}

.b16-stats-page__server-btn.is-active i {
	color: #a994ff;
}

.b16-stats-page__aside-empty {
	margin: 0;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.45);
}

.b16-stats-page__main {
	min-width: 0;
}

/* Растянуть контент статистики на всю ширину main */
.b16-layout--inner .b16-layout__main > .container:has(.b16-stats-page-wrap) {
	max-width: 100% !important;
	width: 100% !important;
	padding-left: 16px;
	padding-right: 16px;
}

.b16-stats-page-wrap {
	width: 100%;
	max-width: none;
	flex: 0 0 100%;
}

.b16-stats-page__toolbar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 14px;
	padding: 4px 2px 10px;
}

.b16-stats-page__heading {
	margin: 0 0 4px;
	font-size: clamp(20px, 2.6vw, 26px);
	font-weight: 800;
	color: #fff;
}

.b16-stats-page__sub {
	margin: 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.42);
}

.b16-stats-page__sub strong {
	color: rgba(255, 255, 255, 0.78);
	font-weight: 700;
}

.b16-stats-search {
	display: flex;
	align-items: stretch;
	min-width: min(100%, 320px);
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(18, 18, 24, 0.95);
}

.b16-stats-search input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: #fff;
	padding: 11px 14px;
	font-size: 13px;
}

.b16-stats-search input::placeholder {
	color: rgba(255, 255, 255, 0.35);
}

.b16-stats-search button {
	width: 46px;
	border: 0;
	cursor: pointer;
	background: linear-gradient(145deg, #7c5cff, #5b43d6);
	color: #1a1208;
	font-size: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: filter 0.15s ease;
}

.b16-stats-search button:hover {
	filter: brightness(1.08);
}

.b16-stats-page__panel--cards {
	padding: 0;
	background: transparent;
	border: none;
}

.b16-stats-top__empty {
	margin: 0;
	padding: 18px 14px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.45);
	line-height: 1.5;
	border-radius: 14px;
	background: rgba(18, 18, 24, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.b16-stats-cards {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.b16-stats-card {
	display: grid;
	grid-template-columns: minmax(150px, 220px) 1fr 56px;
	align-items: stretch;
	min-height: 84px;
	border-radius: 14px;
	overflow: hidden;
	background: linear-gradient(90deg, #1c1c21 0%, #16161c 100%);
	border: 1px solid rgba(255, 255, 255, 0.07);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.b16-stats-card:hover {
	border-color: rgba(124, 92, 255, 0.28);
	transform: translateY(-1px);
}

.b16-stats-card__player {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	min-width: 0;
}

.b16-stats-card__avatar {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.04);
}

.b16-stats-card__avatar.avatar-frame-wrap {
	overflow: visible;
	border-radius: 50%;
}

.b16-stats-card__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.b16-stats-card__avatar > img:first-child {
	border-radius: 50%;
}

.b16-stats-card__name {
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 140px;
}

.b16-stats-card__name[style*="background-clip"],
.b16-stats-card__name[style*="text-fill-color"] {
	display: inline-block;
	vertical-align: middle;
}

a.b16-stats-card__name:hover {
	opacity: 0.92;
}

a.b16-stats-card__name:not([style]):hover {
	color: #7c5cff;
}

.b16-stats-card__stats {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	min-width: 0;
}

.b16-stats-card__stats-label {
	font-size: 11px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.38);
}

.b16-stats-card__metrics {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
}

.b16-stats-card__metric {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-width: 68px;
	padding: 8px 12px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(0, 0, 0, 0.28);
	color: #f2f2f5;
	font-size: 14px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.b16-stats-card__metric i {
	font-size: 16px;
	color: rgba(255, 255, 255, 0.72);
	line-height: 1;
}

/* Скилл — оранжевый outlined-бейдж как на референсе */
.b16-stats-card__skill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 78px;
	padding: 8px 14px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.01em;
	color: #7c5cff;
	background: rgba(124, 92, 255, 0.08);
	border: 1px solid rgba(124, 92, 255, 0.55);
	box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.08);
}

.b16-stats-card__place {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	min-height: 100%;
	background: linear-gradient(180deg, #3a3a44 0%, #2a2a32 100%);
	color: rgba(255, 255, 255, 0.85);
	font-size: 22px;
	font-weight: 800;
}

.b16-stats-card__place--1 {
	background: linear-gradient(180deg, #f6d365 0%, #e8b923 55%, #c9920e 100%);
	color: #1a1408;
}

.b16-stats-card__place--2 {
	background: linear-gradient(180deg, #e8e8ec 0%, #b8bcc6 55%, #8e94a0 100%);
	color: #1c1e24;
}

.b16-stats-card__place--3 {
	background: linear-gradient(180deg, #e8a878 0%, #c67a3a 55%, #a05e28 100%);
	color: #1a1008;
}

.b16-stats-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 16px;
	padding: 4px 0 8px;
}

.b16-stats-pager__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(22, 22, 28, 0.95);
	color: rgba(255, 255, 255, 0.75);
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.b16-stats-pager__btn:hover {
	border-color: rgba(124, 92, 255, 0.4);
	color: #fff;
}

.b16-stats-pager__btn.is-active {
	background: linear-gradient(145deg, #7c5cff, #5b43d6);
	border-color: transparent;
	color: #1a1208;
}

.b16-stats-pager__dots {
	color: rgba(255, 255, 255, 0.35);
	padding: 0 2px;
}

@media (max-width: 820px) {
	.b16-stats-page__layout {
		grid-template-columns: 1fr;
	}

	.b16-stats-page__servers {
		position: static;
	}

	.b16-stats-page__server-list {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.b16-stats-page__server-btn {
		width: auto;
		flex: 1 1 180px;
	}

	.b16-stats-card {
		grid-template-columns: 1fr 48px;
		grid-template-rows: auto auto;
	}

	.b16-stats-card__player {
		grid-column: 1;
		grid-row: 1;
	}

	.b16-stats-card__place {
		grid-column: 2;
		grid-row: 1 / span 2;
		width: 48px;
		font-size: 20px;
	}

	.b16-stats-card__stats {
		grid-column: 1;
		grid-row: 2;
		align-items: flex-start;
		padding-top: 0;
		padding-bottom: 14px;
	}

	.b16-stats-card__metrics {
		justify-content: flex-start;
	}

	.b16-stats-card__name {
		max-width: 180px;
	}

	.b16-stats-search {
		width: 100%;
		min-width: 0;
	}
}

@media (max-width: 480px) {
	.b16-stats-page {
		padding-inline: 10px;
	}

	.b16-stats-card__metric {
		min-width: 0;
		padding: 6px 9px;
		font-size: 13px;
	}
}

/* Админ-панель статистики */
.b16-stats-admin {
	margin: 0 0 16px;
	padding: 16px 18px;
	border-radius: 14px;
	border: 1px solid rgba(124, 92, 255, 0.28);
	background:
		linear-gradient(135deg, rgba(124, 92, 255, 0.1), transparent 55%),
		rgba(18, 18, 24, 0.95);
}

.b16-stats-admin__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.b16-stats-admin__badge {
	display: inline-flex;
	align-items: center;
	margin-bottom: 6px;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #1a1208;
	background: linear-gradient(145deg, #7c5cff, #5b43d6);
}

.b16-stats-admin__title {
	display: block;
	font-size: 15px;
	font-weight: 800;
	color: #fff;
}

.b16-stats-admin__desc {
	margin: 6px 0 0;
	max-width: 42em;
	font-size: 13px;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.5);
}

.b16-stats-admin__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 12px;
	border: 1px solid rgba(239, 68, 68, 0.45);
	background: rgba(239, 68, 68, 0.14);
	color: #fecaca;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.b16-stats-admin__btn:hover:not(:disabled) {
	background: rgba(239, 68, 68, 0.28);
	border-color: rgba(239, 68, 68, 0.7);
	transform: translateY(-1px);
}

.b16-stats-admin__btn:disabled {
	opacity: 0.55;
	cursor: wait;
}

.b16-stats-admin__btn i {
	font-size: 16px;
}

.b16-stats-admin__status {
	margin: 12px 0 0;
	font-size: 13px;
	font-weight: 600;
}

.b16-stats-admin__status.is-ok {
	color: #86efac;
}

.b16-stats-admin__status.is-err {
	color: #fca5a5;
}

@media (max-width: 640px) {
	.b16-stats-admin__btn {
		width: 100%;
	}
}

/* Карточка кликабельна → модалка подробной статистики */
.b16-stats-card[data-b16-stats-open] {
	cursor: pointer;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.b16-stats-card[data-b16-stats-open]:hover {
	border-color: rgba(124, 92, 255, 0.45);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
	transform: translateY(-1px);
}

.b16-stats-card[data-b16-stats-open]:focus-visible {
	outline: 2px solid rgba(124, 92, 255, 0.7);
	outline-offset: 2px;
}

html.b16-stats-modal-open {
	overflow: hidden;
}

.b16-stats-modal {
	position: fixed;
	inset: 0;
	z-index: 12000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px 12px;
}

.b16-stats-modal[hidden] {
	display: none !important;
}

.b16-stats-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 4, 8, 0.72);
	backdrop-filter: blur(4px);
}

.b16-stats-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(980px, 100%);
	max-height: min(92vh, 920px);
	overflow: auto;
	border-radius: 20px;
	background: #121218;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
	padding: 18px 18px 22px;
}

.b16-stats-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.b16-stats-modal__badge {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border-radius: 10px;
	border: 1px dashed rgba(124, 92, 255, 0.65);
	color: #a78bfa;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.b16-stats-modal__close {
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.75);
	font-size: 22px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.b16-stats-modal__close:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.b16-stats-modal__loading,
.b16-stats-modal__error {
	margin: 24px 0;
	text-align: center;
	color: rgba(255, 255, 255, 0.55);
	font-size: 14px;
}

.b16-stats-modal__error {
	color: #fca5a5;
}

.b16-stats-detail__section {
	margin: 6px 0 12px;
	font-size: 18px;
	font-weight: 800;
	color: #fff;
}

.b16-stats-detail__section + .b16-stats-detail__grid {
	margin-bottom: 18px;
}

.b16-stats-detail__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.b16-stats-detail__tile {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 78px;
	padding: 12px 14px;
	border-radius: 16px;
	background: #1a1a22;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.b16-stats-detail__icon {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(160deg, rgba(124, 92, 255, 0.28), rgba(91, 67, 214, 0.12));
	color: #c4b5fd;
	font-size: 24px;
}

.b16-stats-detail__meta {
	min-width: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.b16-stats-detail__value {
	font-size: 18px;
	font-weight: 800;
	color: #fff;
	line-height: 1.2;
	word-break: break-word;
}

.b16-stats-detail__value.is-accent {
	color: #d6b48a;
}

.b16-stats-detail__label {
	font-size: 12px;
	color: rgba(196, 181, 253, 0.72);
	font-weight: 600;
}

.b16-stats-detail__bar {
	position: relative;
	height: 22px;
	border-radius: 999px;
	background: rgba(124, 92, 255, 0.12);
	overflow: hidden;
	margin-top: 2px;
}

.b16-stats-detail__bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #7c5cff, #a78bfa);
}

.b16-stats-detail__bar em {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-style: normal;
	font-size: 12px;
	font-weight: 800;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

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

@media (max-width: 540px) {
	.b16-stats-modal__dialog {
		padding: 14px 12px 16px;
		border-radius: 16px;
	}

	.b16-stats-detail__grid {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.b16-stats-detail__tile {
		min-height: 68px;
	}
}


