.tb-calendar-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 16px 0;
}

.tb-calendar-toolbar h2 {
	margin: 0;
	min-width: 180px;
}

.tb-calendar-legend {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin-bottom: 16px;
	font-size: 13px;
	color: #444;
}

.tb-legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.tb-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

.tb-dot-paid { background: #16a34a; }
.tb-dot-unpaid { background: #dc2626; }
.tb-dot-pickup { background: #2563eb; }

.tb-badge-return,
.tb-badge-pending {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	color: #fff;
	background: #6b7280;
	border-radius: 3px;
	padding: 0 4px;
}

.tb-badge-pending {
	background: #d97706;
}

.tb-calendar-grid {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	table-layout: fixed;
}

.tb-calendar-grid th {
	background: #f3f4f6;
	padding: 8px;
	text-align: left;
	border: 1px solid #e5e7eb;
	font-size: 13px;
}

.tb-day-cell,
.tb-empty-cell {
	border: 1px solid #e5e7eb;
	vertical-align: top;
	height: 120px;
	max-width: 14.28%;
	padding: 4px;
}

.tb-empty-cell {
	background: #fafafa;
}

.tb-day-cell.tb-today {
	background: #fffbeb;
}

.tb-day-number {
	font-weight: 700;
	font-size: 12px;
	color: #666;
	margin-bottom: 4px;
}

.tb-leg {
	display: block;
	font-size: 11px;
	line-height: 1.3;
	padding: 3px 5px;
	margin-bottom: 3px;
	border-radius: 4px;
	background: #f9fafb;
	border-left: 3px solid #999;
	color: #111;
	text-decoration: none;
}

.tb-leg:hover {
	background: #f0f0f0;
}

.tb-leg.tb-dot-paid { border-left-color: #16a34a; }
.tb-leg.tb-dot-unpaid { border-left-color: #dc2626; }
.tb-leg.tb-dot-pickup { border-left-color: #2563eb; }

.tb-leg-time {
	font-weight: 700;
}

.tb-leg-route {
	color: #666;
}

.tb-leg-vehicle {
	color: #888;
	font-size: 0.95em;
}

.tb-badge-kind {
	display: inline-block;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: #fff;
	border-radius: 3px;
	padding: 0 4px;
}

.tb-badge-transfer {
	background: #2563eb;
}

.tb-badge-tour {
	background: #7c3aed;
}

.tb-calendar-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0 -4px;
}

/* Mobile: let the grid scroll sideways instead of squeezing every day
   column down to nothing - a fixed per-day width keeps bookings readable. */
@media (max-width: 700px) {
	.tb-calendar-grid {
		table-layout: fixed;
		min-width: 700px;
	}

	.tb-day-cell,
	.tb-empty-cell {
		width: 100px;
		max-width: 100px;
		height: auto;
		min-height: 90px;
	}

	.tb-calendar-grid th {
		padding: 6px 4px;
		font-size: 11px;
	}

	.tb-leg {
		font-size: 10px;
		padding: 2px 4px;
	}

	.tb-calendar-toolbar {
		flex-wrap: wrap;
	}

	.tb-calendar-toolbar h2 {
		min-width: 0;
		width: 100%;
		order: -1;
	}
}
