.tm-wrapper {
	font-family: inherit;
	margin: 1.5em 0;
}

.tm-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	margin-bottom: 16px;
	padding: 16px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
}

.tm-control {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tm-control label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #50575e;
}

.tm-control-search {
	flex: 1 1 260px;
}

.tm-control input[type="text"],
.tm-control select {
	padding: 8px 10px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	font-size: 14px;
	min-width: 180px;
	background: #fff;
}

.tm-control-search input {
	min-width: 100%;
}

.tm-reset-btn {
	padding: 8px 16px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	height: 37px;
}

.tm-reset-btn:hover {
	background: #f0f0f1;
}

.tm-results-count {
	font-size: 13px;
	color: #50575e;
	margin: 0 0 8px;
}

.tm-table-scroll {
	overflow-x: auto;
}

.tm-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
}

.tm-table thead th {
	text-align: left;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #50575e;
	background: #f0f0f1;
	padding: 12px;
	border-bottom: 2px solid #dcdcde;
	white-space: nowrap;
}

.tm-table tbody td {
	padding: 12px;
	border-bottom: 1px solid #e5e5e5;
	font-size: 14px;
	vertical-align: middle;
}

.tm-table tbody tr:hover {
	background: #fafafa;
}

.tm-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	text-transform: capitalize;
}

.tm-badge-open { background: #e6f4ea; color: #1e7e34; }
.tm-badge-closed { background: #f1f1f1; color: #555; }
.tm-badge-awarded { background: #e7f0fd; color: #1a56c4; }
.tm-badge-cancelled { background: #fdeaea; color: #b32d2e; }

.tm-badge-overdue {
	background: #fdeaea;
	color: #b32d2e;
	margin-left: 6px;
}

.tm-doc-link {
	font-weight: 600;
	text-decoration: none;
}

.tm-doc-link:hover {
	text-decoration: underline;
}

.tm-no-results {
	padding: 20px;
	text-align: center;
	color: #50575e;
	background: #f6f7f7;
	border-radius: 6px;
	margin-top: 12px;
}

/* Responsive: collapse table into stacked cards on small screens */
@media (max-width: 720px) {
	.tm-table thead {
		display: none;
	}
	.tm-table, .tm-table tbody, .tm-table tr, .tm-table td {
		display: block;
		width: 100%;
	}
	.tm-table tr {
		margin-bottom: 12px;
		border: 1px solid #e5e5e5;
		border-radius: 6px;
		padding: 8px 0;
	}
	.tm-table td {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		border-bottom: none;
		padding: 8px 12px;
	}
	.tm-table td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #50575e;
		flex-shrink: 0;
	}
}
