/* CIDB Tender Manager - Frontend Styles */

.ctm-list.ctm-layout-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.ctm-card {
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 18px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ctm-card-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.ctm-tender-no {
	font-family: monospace;
	font-size: 13px;
	color: #666;
}

.ctm-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.ctm-badge-open    { background: #e6f6ea; color: #1a7d3a; }
.ctm-badge-closed  { background: #fce8e8; color: #b02a2a; }
.ctm-badge-awarded { background: #eaeefb; color: #2a4bb0; }

.ctm-tender-title {
	margin: 4px 0;
	font-size: 17px;
	line-height: 1.4;
}
.ctm-tender-title a { text-decoration: none; color: #1a1a1a; }
.ctm-tender-title a:hover { color: #0b5fff; }

.ctm-kod-bidang { font-size: 13px; color: #555; margin: 0; }

.ctm-dates { font-size: 13px; color: #333; margin: 6px 0; }
.ctm-dates div { margin-bottom: 2px; }

.ctm-countdown {
	font-size: 13px;
	font-weight: 600;
	color: #b02a2a;
	margin: 4px 0;
}
.ctm-countdown.ctm-countdown-large { font-size: 16px; margin: 16px 0; }
.ctm-countdown.ctm-countdown-expired { color: #888; }

.ctm-btn {
	display: inline-block;
	align-self: flex-start;
	padding: 8px 16px;
	background: #0b5fff;
	color: #fff !important;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	margin-top: 6px;
}
.ctm-btn:hover { background: #0947c4; }

.ctm-empty { color: #777; font-style: italic; }

/* Single view */
.ctm-single {
	max-width: 800px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 28px;
}
.ctm-single-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}
.ctm-tender-no-large { font-family: monospace; color: #555; }
.ctm-notice { color: #b02a2a; font-weight: 600; }

.ctm-single-table {
	width: 100%;
	border-collapse: collapse;
	margin: 18px 0;
}
.ctm-single-table th {
	text-align: left;
	vertical-align: top;
	width: 200px;
	padding: 10px;
	background: #f7f7f9;
	font-size: 13px;
	border-bottom: 1px solid #ececec;
}
.ctm-single-table td {
	padding: 10px;
	font-size: 14px;
	border-bottom: 1px solid #ececec;
}

.ctm-download-box { margin-top: 20px; }
.ctm-gate-form {
	margin-top: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.ctm-gate-form input {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	flex: 1 1 200px;
}
.ctm-gate-msg { width: 100%; font-size: 13px; margin: 4px 0 0; }

/* Archive filters */
.ctm-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}
.ctm-filters input[type="text"],
.ctm-filters select {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
}

@media (max-width: 480px) {
	.ctm-list.ctm-layout-cards { grid-template-columns: 1fr; }
	.ctm-single-table th { width: 130px; }
}
