.tb-dash {
	max-width: 100%;
}

.tb-dash-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
}

.tb-dash-user {
	color: #666;
	font-size: 0.9em;
}

.tb-dash-tabs {
	display: flex;
	gap: 4px;
	border-bottom: 2px solid #e5e7eb;
	margin-bottom: 20px;
}

.tb-dash-tab {
	padding: 10px 18px;
	text-decoration: none;
	color: #555;
	font-weight: 600;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}

.tb-dash-break { display: none; }

.tb-dash-subtabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: -6px 0 20px;
}

.tb-dash-subtab {
	padding: 7px 16px;
	border-radius: 999px;
	background: #f3f4f6;
	color: #444;
	font-weight: 600;
	font-size: 0.92em;
	text-decoration: none;
}

.tb-dash-subtab:hover {
	background: #e5e7eb;
}

.tb-dash-subtab-active,
.tb-dash-subtab-active:hover {
	background: #2563eb;
	color: #fff;
}

.tb-dash-tab-active {
	color: #2563eb;
	border-bottom-color: #2563eb;
}

.tb-dash-badge {
	display: inline-block;
	background: #dc2626;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	padding: 3px 6px;
	border-radius: 999px;
	margin-left: 6px;
	vertical-align: middle;
}

.tb-dash-btn {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 6px;
	background: #eee;
	color: #333;
	text-decoration: none;
	font-size: 0.85em;
	font-weight: 600;
}

.tb-dash-btn:hover {
	background: #ddd;
}

.tb-dash-btn-primary {
	background: #2563eb;
	color: #fff;
}

.tb-dash-btn-primary:hover {
	background: #1d4ed8;
}

.tb-dash-muted {
	color: #888;
	font-size: 0.85em;
}

/* Calendar */
.tb-dash-calendar-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

/* Bookings table */
.tb-dash-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
}

.tb-dash-table th,
.tb-dash-table td {
	text-align: left;
	padding: 10px;
	border: 1px solid #e5e7eb;
	font-size: 0.9em;
	vertical-align: top;
}

.tb-dash-table th {
	background: #f3f4f6;
}

/* Reports */
.tb-dash-stat-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.tb-dash-stat-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 16px 20px;
	min-width: 180px;
}

.tb-dash-stat-label {
	color: #666;
	font-size: 0.85em;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.tb-dash-stat-value {
	font-size: 1.4em;
	font-weight: 700;
}

.tb-dash-stat-sub {
	font-weight: 700;
	color: #2563eb;
}

/* Styling for reused wp-admin markup (Booking Details content) */
.tb-dash .button {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 6px;
	background: #eee;
	color: #333;
	text-decoration: none;
	font-size: 0.85em;
	font-weight: 600;
	border: none;
	cursor: pointer;
}

.tb-dash .button:hover {
	background: #ddd;
}

.tb-dash .button-primary {
	background: #2563eb;
	color: #fff;
}

.tb-dash .button-primary:hover {
	background: #1d4ed8;
}

.tb-dash .form-table {
	width: 100%;
	margin: 10px 0;
}

.tb-dash .form-table th {
	text-align: left;
	padding: 8px 10px 8px 0;
	width: 160px;
	font-weight: 600;
	vertical-align: top;
}

.tb-dash .form-table td {
	padding: 8px 0;
}

.tb-dash .description {
	color: #666;
	font-size: 0.85em;
}

.tb-dash .tb-payment-actions a {
	margin-right: 10px;
	font-size: 0.85em;
}

.tb-dash .tb-vehicle-select {
	max-width: 170px;
	font-size: 0.85em;
}

.tb-dash-table td span {
	white-space: nowrap;
}

.tb-dash-table td.tb-dash-col-route {
	max-width: 160px;
}

.tb-dash-notice {
	padding: 10px 14px;
	border-radius: 6px;
	margin-bottom: 16px;
	font-size: 0.9em;
}

.tb-dash-notice-success {
	background: #dcfce7;
	color: #166534;
}

.tb-dash-notice-error {
	background: #fee2e2;
	color: #991b1b;
}

.tb-dash .small-text {
	width: 90px !important;
	display: inline-block;
}

.tb-dash .regular-text {
	width: auto;
	max-width: 300px;
}

.tb-dash .wp-list-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #e5e7eb;
}

.tb-dash .wp-list-table th,
.tb-dash .wp-list-table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid #e5e7eb;
	font-size: 0.9em;
}

.tb-dash .wp-list-table th {
	background: #f3f4f6;
	font-weight: 600;
}

.tb-dash .wp-list-table.striped tbody tr:nth-child(odd) {
	background: #f9fafb;
}

.tb-dash .description {
	color: #666;
	font-size: 0.85em;
}

.tb-dash .nav-tab-wrapper {
	border-bottom: 2px solid #e5e7eb;
	margin-bottom: 16px;
}

.tb-dash .nav-tab {
	display: inline-block;
	padding: 8px 14px;
	text-decoration: none;
	color: #555;
	font-weight: 600;
	font-size: 0.9em;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}

.tb-dash .nav-tab-active {
	color: #2563eb;
	border-bottom-color: #2563eb;
}

.tb-dash .tb-time-select {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.tb-dash .tb-time-select select,
.tb-dash .tb-field .tb-time-select select {
	padding: 6px;
	width: auto;
}

.tb-dash .tb-time-sep {
	font-weight: 700;
}

.tb-dash .tb-field {
	margin-bottom: 16px;
}

.tb-dash .tb-field-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.tb-dash .tb-field-row .tb-field {
	flex: 1;
	min-width: 160px;
}

.tb-dash .tb-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.tb-dash .tb-field select,
.tb-dash .tb-field input[type="number"],
.tb-dash .tb-field input[type="date"],
.tb-dash .tb-field input[type="text"],
.tb-dash .tb-field input[type="email"],
.tb-dash .tb-field input[type="tel"],
.tb-dash .tb-field textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
}

/* Mobile */
@media (max-width: 700px) {
	.tb-dash-tabs {
		flex-wrap: wrap;
		gap: 2px;
	}

	.tb-dash-tab {
		padding: 8px 12px;
		font-size: 0.9em;
	}

	.tb-dash-table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.tb-dash-table {
		min-width: 640px;
	}

	.tb-dash .wp-list-table {
		min-width: 600px;
	}

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

	.tb-dash-stat-row {
		flex-direction: column;
	}

	.tb-dash-stat-card {
		width: 100%;
		box-sizing: border-box;
	}
}

/* Phones, small tablets and phones in landscape: grouped, centered category rows
   Row 1: Calendar | Row 2: Bookings | Row 3: Partners, Setup, Reports, Settings */
@media (max-width: 960px) {
	.tb-dash-tabs {
		flex-wrap: wrap;
		justify-content: center;
		gap: 8px;
		border-bottom: none;
		margin-bottom: 16px;
	}

	.tb-dash-break {
		display: block;
		flex-basis: 100%;
		height: 0;
	}

	.tb-dash-tab {
		margin-bottom: 0;
		padding: 9px 16px;
		border: 1px solid #e5e7eb;
		border-radius: 999px;
		background: #fff;
		font-size: 0.92em;
		text-align: center;
	}

	.tb-dash-tab-active {
		background: #2563eb;
		border-color: #2563eb;
		color: #fff;
	}

	.tb-dash-subtabs {
		justify-content: center;
		margin-top: 0;
	}
}

@media (max-width: 480px) {
	.tb-dash-tabs { gap: 6px; }
	.tb-dash-tab { padding: 8px 11px; font-size: 0.85em; }
}

/* ===== Manual booking forms (transfer + tour), card layout ===== */
.tb-mb { max-width: 1100px; }
.tb-mb * { box-sizing: border-box; }

.tb-mb-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.tb-mb-head h3 { margin: 0 0 2px; font-size: 1.45em; line-height: 1.2; }
.tb-mb-head p { margin: 0; color: #6b7280; font-size: 0.95em; }
.tb-mb-head-ico { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; background: #2563eb; color: #fff; display: flex; align-items: center; justify-content: center; }
.tb-mb-head-ico .tb-mb-ico { width: 26px; height: 26px; }

.tb-mb-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px 16px; margin-bottom: 16px; }
.tb-mb-card-head { min-height: 44px; display: flex; align-items: center; gap: 10px; background: #f3f4f6; border-radius: 9px; padding: 9px 12px; margin-bottom: 14px; color: #1f2937; }
.tb-mb-card-head h4 { margin: 0; font-size: 1.02em; font-weight: 700; flex: 1; color: inherit; }
.tb-mb-card-head .tb-mb-ico { color: #2563eb; flex: 0 0 auto; }

.tb-mb-grid { display: grid; gap: 14px 16px; }
.tb-mb-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tb-mb-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tb-mb-return { display: grid; }
.tb-mb-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.tb-mb-cols-1 { grid-template-columns: minmax(0, 1fr); }
.tb-mb-cols .tb-mb-card { margin-bottom: 16px; }

.tb-mb-field label { display: block; font-weight: 600; font-size: 0.9em; margin-bottom: 6px; color: #1f2937; }
.tb-mb-req { color: #dc2626; }
.tb-mb-flight { margin-top: 14px; max-width: 360px; }

.tb-mb input[type="text"], .tb-mb input[type="email"], .tb-mb input[type="tel"], .tb-mb input[type="number"], .tb-mb input[type="date"], .tb-mb select {
	display: block; width: 100%; min-width: 0; min-height: 40px; padding: 8px 11px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font: inherit; font-size: 0.95em; color: #111827; text-align: left;
}
.tb-mb input:focus, .tb-mb select:focus { outline: 2px solid #2563eb; outline-offset: -1px; border-color: #2563eb; }
.tb-mb input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.tb-mb .tb-mb-readonly { background: #f3f4f6; color: #374151; }

.tb-mb-phone { display: flex; gap: 8px; }
.tb-mb-phone select { flex: 0 0 112px; width: 112px; }
.tb-mb-phone input { flex: 1; }

.tb-dash .tb-mb .tb-time-select { display: flex; align-items: center; gap: 6px; width: 100%; }
.tb-dash .tb-mb .tb-time-select select { flex: 1; width: auto; padding: 8px 11px; }

/* Vehicle pills */
.tb-mb-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tb-mb-pill { display: block; cursor: pointer; margin: 0; }
.tb-mb-pill input { position: absolute; opacity: 0; pointer-events: none; }
.tb-mb-pill span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 10px; font-weight: 700; color: #374151; background: #fff; transition: border-color .15s, background .15s; }
.tb-mb-pill span .tb-mb-ico { color: #6b7280; }
.tb-mb-pill input:checked + span { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; box-shadow: 0 0 0 1px #2563eb; }
.tb-mb-pill input:checked + span .tb-mb-ico { color: #2563eb; }
.tb-mb-pill input:focus-visible + span { outline: 2px solid #2563eb; outline-offset: 2px; }

/* Toggle switch */
.tb-mb-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; margin: 0; cursor: pointer; }
.tb-mb-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.tb-mb-switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 99px; transition: background .2s; }
.tb-mb-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.tb-mb-switch input:checked + span { background: #2563eb; }
.tb-mb-switch input:checked + span::after { transform: translateX(20px); }
.tb-mb-switch input:focus-visible + span { outline: 2px solid #2563eb; outline-offset: 2px; }

.tb-mb-hint { margin: 10px 0 0; color: #6b7280; font-size: 0.88em; }

/* Price */
.tb-mb-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tb-mb-price-val { flex: 1; min-width: 120px; font-size: 1.15em; font-weight: 700; color: #111827; }

/* Tour specifics */
.tb-mb-fixed-times { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-mb .tb-manual-fixed-time-btn { margin: 0 !important; padding: 8px 16px; border: 1px solid #d1d5db; border-radius: 99px; background: #fff; color: #374151; font: inherit; font-weight: 700; cursor: pointer; }
.tb-mb .tb-manual-fixed-time-btn.button-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.tb-mb-warning { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-weight: 600; }

/* Actions */
.tb-mb-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e5e7eb; padding-top: 16px; margin-top: 4px; }
.tb-mb-cancel { text-decoration: none; }
.tb-mb-submit { min-width: 190px; padding-top: 11px; padding-bottom: 11px; font-size: 1em; }
.tb-mb-submit:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 820px) {
	.tb-mb-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 700px) {
	.tb-mb-grid-3, .tb-mb-grid-2 { grid-template-columns: minmax(0, 1fr); }
	.tb-mb-head h3 { font-size: 1.2em; }
	.tb-mb-actions { flex-direction: column-reverse; align-items: stretch; }
	.tb-mb-actions .tb-dash-btn { text-align: center; width: 100%; }
}

/* ===== Calendar: Days Off button on the month line (desktop), centered layout (phones) ===== */
.tb-dash-cal-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 16px;
	align-items: start;
}

.tb-dash-cal-wrap > .tb-dash-calendar-toolbar { grid-column: 1; grid-row: 1; }
.tb-dash-cal-wrap > .tb-calendar-legend { grid-column: 1 / -1; grid-row: 2; }
.tb-dash-cal-wrap > .tb-days-off-panel { grid-column: 2; grid-row: 1; justify-self: end; }

.tb-dash .tb-days-off-panel {
	position: relative;
	margin: 0 !important;
	z-index: 20;
}

.tb-dash .tb-days-off-panel > summary {
	list-style: none;
	cursor: pointer;
	display: inline-block;
	padding: 8px 18px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: #1f2937;
	font-weight: 600;
	font-size: 0.92em;
	user-select: none;
	white-space: nowrap;
}

.tb-dash .tb-days-off-panel > summary::-webkit-details-marker { display: none; }
.tb-dash .tb-days-off-panel > summary::marker { content: ""; }

.tb-dash .tb-days-off-panel[open] > summary {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

.tb-dash .tb-days-off-panel > div {
	position: absolute;
	top: 100%;
	right: 0;
	width: 500px;
	max-width: 90vw !important;
	margin-top: 8px !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	box-sizing: border-box;
}

@media (max-width: 700px) {
	.tb-dash-cal-wrap {
		display: block;
	}

	.tb-dash-cal-wrap > .tb-days-off-panel {
		justify-self: stretch;
	}

	.tb-dash-calendar-toolbar {
		justify-content: center;
	}

	.tb-dash .tb-days-off-panel {
		text-align: center;
		margin: 0 0 16px !important;
	}

	.tb-dash .tb-days-off-panel > div {
		position: static;
		width: 100%;
		max-width: none !important;
		text-align: left;
		box-shadow: none;
		overflow-x: auto;
	}
}

/* Calendar legend: 3 rows [Transfer, Tour] / [Paid, Unpaid, Pay on Pickup] / [Pending acceptance, Round Trip].
   Desktop: rows flow inline as one line. Phones/tablets: stacked, centered. */
.tb-calendar-legend .tb-legend-row { display: contents; }

@media (max-width: 960px) {
	.tb-dash .tb-dash-cal-wrap .tb-calendar-legend {
		display: block !important;
		text-align: center;
		margin-bottom: 14px !important;
	}

	.tb-dash .tb-dash-cal-wrap .tb-calendar-legend .tb-legend-row {
		display: flex !important;
		flex-wrap: wrap;
		justify-content: center;
		gap: 6px 16px;
		margin-bottom: 10px;
	}

	.tb-dash .tb-dash-cal-wrap .tb-calendar-legend .tb-legend-item {
		white-space: nowrap;
	}
}
