:root{
	--gray: #1e1e1e;
	--orange: #df4e19;
	--light-orange: #fff4ee;
	--lighter-orange: #ffe3d8;
}

.leaderboard-shell {
	margin-top: 8px;
	margin-bottom: 18px;
	position: relative;
}

.leaderboard-header {
	position: relative;
	border: 1px solid #ececec;
	border-radius: 16px;
	padding: 26px 26px 22px;
	background:
		radial-gradient(1200px 260px at 95% -40%, rgba(223, 78, 25, 0.1), transparent 45%),
		radial-gradient(500px 180px at 10% -50%, rgba(30, 30, 30, 0.08), transparent 45%),
		#ffffff;
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.05);
	margin-bottom: 14px;
}

.leaderboard-eyebrow {
	display: inline-block;
	font-size: 0.62rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--orange);
	margin-bottom: 10px;
}

.leaderboard-title {
	font-size: clamp(1.5rem, 2.9vw, 2.2rem);
	font-weight: 900;
	line-height: 1.06;
	letter-spacing: -0.01em;
	color: var(--gray);
	text-transform: uppercase;
	margin-bottom: 8px;
}

.leaderboard-subtitle {
	max-width: 740px;
	color: #6b6b6b;
	font-size: 0.82rem;
	line-height: 1.65;
}

#standing.intrams-content.standing {
	margin-top: 0;
	width: 100%;
}

p.leaderboard-last-updated {
	margin: 0 0 12px;
	width: 100%;
	border: 1px solid var(--lighter-orange);
	border-radius: 999px;
	background: var(--light-orange);
	color: var(--gray);
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 700;
	padding: 8px 14px;
}

div.standing-container {
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	counter-reset: standings-rank;
}

div.standing-header {
	width: 100%;
	display: grid;
	grid-template-columns: 2.25fr 0.85fr 0.85fr 0.85fr 0.9fr;
	align-items: center;
	border-radius: 14px;
	background: linear-gradient(115deg, #1d1d1d, #343434);
	border: 1px solid #323232;
	padding: 10px 12px;
	box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

div.standing-header-item {
	color: #ffffff;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	display: flex;
	justify-content: center;
	align-items: center;
}

div.standing-header-item.name {
	justify-content: flex-start;
	padding-left: 84px;
}

div.department-standing {
	width: 100%;
	display: grid;
	grid-template-columns: 2.25fr 0.85fr 0.85fr 0.85fr 0.9fr;
	align-items: center;
	border: 1px solid #e8e8e8;
	border-radius: 14px;
	overflow: hidden;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
	counter-increment: standings-rank;
}

div.department-standing:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
	border-color: #d8d8d8;
}

div.department-standing-item {
	min-height: 58px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-weight: 800;
	font-size: 1rem;
	color: #2b2b2b;
	border-left: 1px solid #f0f0f0;
}

div.department-standing-item:first-child {
	border-left: none;
}

div.department-standing-banner-item {
	position: relative;
	justify-content: flex-start;
	overflow: hidden;
}

div.department-standing-banner-item::before {
	content: counter(standings-rank);
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	z-index: 2;
	background: rgba(0, 0, 0, 0.54);
	color: #ffffff;
	font-size: 0.83rem;
	font-weight: 900;
	letter-spacing: 0.02em;
}

div.department-standing-banner-item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 22%, rgba(0, 0, 0, 0.58) 100%);
	pointer-events: none;
}

img.department-standing-item.logo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: left;
	display: block;
}

span.department-standing-name {
	position: absolute;
	left: 66px;
	right: 12px;
	top: 8px;
	bottom: 8px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	color: #ffffff;
	font-size: 0.88rem;
	font-weight: 800;
	letter-spacing: 0.01em;
	text-shadow: 0 2px 7px rgba(0, 0, 0, 0.45);
	overflow: hidden;
	overflow-wrap: anywhere;
}

div.department-standing-item[department-standing-gold] {
	color: #9a6b00;
	background: linear-gradient(180deg, #fff7d9, #ffedb7);
}

div.department-standing-item[department-standing-silver] {
	color: #5f646f;
	background: linear-gradient(180deg, #f7f8fa, #eceff3);
}

div.department-standing-item[department-standing-bronze] {
	color: #7d4e33;
	background: linear-gradient(180deg, #f9ede6, #f3dccf);
}

div.department-standing-item[department-standing-total] {
	color: #ffffff;
	background: linear-gradient(140deg, #df4e19, #b93a0f);
	font-size: 1.04rem;
}

.leaderboard-admin-actions {
	width: 100%;
	display: flex;
	justify-content: flex-start;
	margin-top: 8px;
}

.leaderboard-edit-trigger {
	border: 1px solid #2f2f2f;
	background: linear-gradient(145deg, #2a2a2a, #1b1b1b);
	color: #ffffff;
	border-radius: 999px;
	padding: 10px 16px;
	font-size: 0.74rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
	transition: transform 0.16s ease, box-shadow 0.16s ease;
	margin-bottom: 14px;
}

.leaderboard-edit-trigger:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.leaderboard-edit-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
}

.leaderboard-edit-modal.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
}

.leaderboard-edit-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.leaderboard-edit-dialog {
	position: relative;
	width: 100%;
	max-width: 460px;
	padding: 22px;
	border-radius: 16px;
	background: #ffffff;
	border: 1px solid #ececec;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
	z-index: 9999999999999;
}

.leaderboard-edit-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid #dadada;
	background: #ffffff;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}

.leaderboard-edit-dialog h2 {
	margin: 0 34px 14px 0;
	font-size: 1.18rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #272727;
}

.leaderboard-edit-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 7px;
}

.leaderboard-edit-form label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #4f4f4f;
	margin-top: 6px;
}

.leaderboard-edit-form input,
.leaderboard-edit-form select {
	width: 100%;
	border: 1px solid #dddddd;
	border-radius: 10px;
	padding: 10px 12px;
	font: inherit;
	font-size: 0.84rem;
	color: #222222;
	background: #ffffff;
}

.leaderboard-edit-form select {
	padding-right: 40px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, #6b6b6b 50%),
		linear-gradient(135deg, #6b6b6b 50%, transparent 50%);
	background-position:
		calc(100% - 18px) calc(50% - 2px),
		calc(100% - 13px) calc(50% - 2px);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}

.leaderboard-edit-form input.invalid-field,
.leaderboard-edit-form select.invalid-field {
	border-color: #d63b34;
	background: #fff5f5;
}

.leaderboard-edit-validation {
	min-height: 18px;
	margin: 6px 0 0;
	font-size: 0.74rem;
	font-weight: 700;
	color: #b22b25;
}

.leaderboard-edit-form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 14px;
}

.leaderboard-edit-cancel,
.leaderboard-edit-save {
	border: 1px solid #d8d8d8;
	border-radius: 999px;
	padding: 9px 14px;
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: #ffffff;
	cursor: pointer;
}

.leaderboard-edit-save {
	background: var(--orange);
	color: #ffffff;
	border-color: #e2e2e2;
}

@media (max-width: 940px) {
	.leaderboard-header {
		padding: 22px 18px 18px;
	}

	div.standing-header {
		grid-template-columns: 2.1fr 0.9fr 0.9fr 0.9fr 0.95fr;
	}

	div.department-standing {
		grid-template-columns: 2.1fr 0.9fr 0.9fr 0.9fr 0.95fr;
	}

	div.standing-header-item.name {
		padding-left: 66px;
	}

	span.department-standing-name {
		left: 58px;
		font-size: 0.8rem;
	}

	div.department-standing-banner-item::before {
		width: 30px;
		height: 30px;
		left: 12px;
		font-size: 0.72rem;
	}
}

@media (max-width: 760px) {
	div.standing-header-item {
		font-size: 0.62rem;
		letter-spacing: 0.05em;
	}

	div.standing-header-item.name {
		padding-left: 12px;
	}

	div.department-standing-item {
		min-height: 54px;
		font-size: 0.9rem;
	}


	span.department-standing-name {
		left: 58px;
		font-size: 0.72rem;
		justify-content: flex-start;
	}
}

@media (max-width: 560px) {
	.leaderboard-subtitle {
		font-size: 0.76rem;
	}

	p.leaderboard-last-updated {
		font-size: 0.62rem;
	}

	div.standing-header {
		border-radius: 10px;
		padding: 9px 8px;
	}

	div.department-standing {
		border-radius: 10px;
	}

	div.department-standing-item {
		min-height: 48px;
		font-size: 0.82rem;
	}

	span.department-standing-name {
		font-size: 0.66rem;
	}

	.leaderboard-admin-actions {
		justify-content: stretch;
	}

	.leaderboard-edit-trigger {
		width: 100%;
	}

	.leaderboard-edit-dialog {
		padding: 18px;
	}
}
