.tcsp-wrapper {
	max-width: 1400px;
	margin: 0 auto;
}

.tcsp-dashboard {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 22px;
}

.tcsp-metric,
.tcsp-ranking,
.tcsp-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
}

.tcsp-metric {
	padding: 16px;
}

.tcsp-metric-label {
	display: block;
	color: #646970;
	font-size: 13px;
	margin-bottom: 6px;
}

.tcsp-metric strong {
	color: #1d2327;
	font-size: 26px;
	line-height: 1;
}

.tcsp-toolbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) minmax(160px, 220px) minmax(220px, 280px);
	gap: 14px;
	margin-bottom: 20px;
	align-items: end;
}

.tcsp-search-wrapper {
	position: relative;
	display: block;
}

.tcsp-search-icon {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 18px;
}

#tcsp-search,
#tcsp-sort,
#tcsp-status-filter,
#tcsp-gallery-search,
#tcsp-gallery-sort,
#tcsp-gallery-status-filter {
	width: 100%;
	border: 1px solid #8c8f94;
	border-radius: 8px;
	box-sizing: border-box;
	font-size: 16px;
}

#tcsp-search,
#tcsp-gallery-search {
	padding: 13px 15px 13px 45px;
}

#tcsp-sort,
#tcsp-status-filter,
#tcsp-gallery-sort,
#tcsp-gallery-status-filter {
	min-height: 49px;
	padding: 10px 12px;
}

.tcsp-sort-wrapper span,
.tcsp-filter-wrapper span {
	display: block;
	color: #646970;
	font-size: 13px;
	margin-bottom: 4px;
}

#tcsp-search:focus,
#tcsp-sort:focus,
#tcsp-status-filter:focus,
#tcsp-gallery-search:focus,
#tcsp-gallery-sort:focus,
#tcsp-gallery-status-filter:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.tcsp-checkbox-wrapper {
	align-items: center;
	display: flex;
	gap: 8px;
	min-height: 49px;
}

.tcsp-checkbox-wrapper input {
	margin: 0;
}

.tcsp-checkbox-wrapper span {
	color: #50575e;
	font-size: 14px;
	line-height: 1.25;
}

.tcsp-ranking {
	margin-bottom: 22px;
	padding: 18px;
}

.tcsp-ranking h2 {
	font-size: 22px;
	margin: 0 0 14px;
}

.tcsp-ranking ol {
	display: grid;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tcsp-ranking li {
	align-items: center;
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr) auto;
	gap: 12px;
	padding: 10px 0;
}

.tcsp-rank-number {
	align-items: center;
	background: #f0f6fc;
	border-radius: 50%;
	color: #2271b1;
	display: inline-flex;
	font-weight: 700;
	height: 32px;
	justify-content: center;
	width: 32px;
}

.tcsp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
}

.tcsp-card {
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}

.tcsp-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	transform: translateY(-3px);
}

.tcsp-image img {
	display: block;
	height: 210px;
	object-fit: cover;
	width: 100%;
}

.tcsp-card-body {
	padding: 18px;
}

.tcsp-card-header {
	align-items: flex-start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 16px;
}

.tcsp-card h3 {
	font-size: 21px;
	line-height: 1.25;
	margin: 0;
}

.tcsp-status {
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	padding: 7px 10px;
	white-space: nowrap;
}

.tcsp-status-geplant {
	background: #f0f6fc;
	color: #135e96;
}

.tcsp-status-aktiv {
	background: #edfaef;
	color: #008a20;
}

.tcsp-status-beendet {
	background: #fcf0f1;
	color: #b32d2e;
}

.tcsp-period {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0 0 16px;
}

.tcsp-period div {
	background: #f6f7f7;
	border-radius: 8px;
	padding: 10px;
}

.tcsp-period dt {
	color: #646970;
	font-size: 12px;
	margin-bottom: 4px;
}

.tcsp-period dd {
	font-weight: 700;
	margin: 0;
}

.tcsp-stats {
	color: #50575e;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin-bottom: 18px;
}

.tcsp-button {
	background: #2271b1;
	border-radius: 8px;
	color: #fff !important;
	display: inline-block;
	font-weight: 700;
	padding: 10px 16px;
	text-decoration: none;
}

.tcsp-button:hover {
	background: #135e96;
}

.tcsp-empty,
.tcsp-error {
	background: #fff8e5;
	border: 1px solid #f0d38a;
	border-radius: 8px;
	padding: 20px;
}

.tcsp-gallery-wrapper {
	display: grid;
	gap: 28px;
	max-width: 1400px;
	margin: 0 auto;
}

.tcsp-gallery-toolbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) minmax(160px, 220px) minmax(220px, 280px);
	gap: 14px;
	align-items: end;
}

.tcsp-gallery-contest {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 18px;
}

.tcsp-gallery-contest h2 {
	font-size: 24px;
	margin: 0 0 18px;
}

.tcsp-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.tcsp-gallery-card {
	margin: 0;
}

.tcsp-gallery-card a {
	display: block;
	position: relative;
	text-decoration: none;
}

.tcsp-gallery-card img {
	aspect-ratio: 4 / 3;
	border-radius: 8px;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.tcsp-gallery-rank {
	align-items: center;
	background: #2271b1;
	border-radius: 50%;
	color: #fff;
	display: inline-flex;
	font-weight: 700;
	height: 34px;
	justify-content: center;
	left: 10px;
	position: absolute;
	top: 10px;
	width: 34px;
}

.tcsp-gallery-card h3 {
	font-size: 18px;
	line-height: 1.3;
	margin: 12px 0 4px;
}

.tcsp-gallery-card p {
	color: #50575e;
	margin: 0;
}

.tcsp-gallery-card p span {
	display: block;
	font-weight: 700;
	margin-top: 4px;
}

@media (max-width: 900px) {
	.tcsp-dashboard,
	.tcsp-toolbar,
	.tcsp-gallery-toolbar,
	.tcsp-gallery-grid {
		grid-template-columns: 1fr;
	}

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

@media (max-width: 600px) {
	.tcsp-dashboard,
	.tcsp-grid,
	.tcsp-period,
	.tcsp-ranking li {
		grid-template-columns: 1fr;
	}

	.tcsp-ranking li {
		align-items: start;
	}
}
