:root {
	--tj-primary: #ff6d14;
	--tj-primary-dark: #e35c09;
	--tj-primary-light: #fff1e6;
}

.tj-driver-form-wrap,
.tj-driver-wizard {
	max-width: 720px;
	margin: 0 auto;
	font-size: 15px;
}

/* The dashboard page renders through its own bare app-shell template
   (no theme header/footer), so give the page a sane base look here
   instead of relying on the theme's body/reset styles. */
body.tj-driver-app-shell {
	margin: 0;
	padding: 16px;
	background: #f5f6f8;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}
body.tj-driver-app-shell * {
	box-sizing: inherit;
}

/* ===================================================================
   Premium Driver Dashboard — topbar + sticky sidebar (30%) + content
   =================================================================== */

.tj-dash-shell {
	max-width: 1180px;
	margin: 0 auto;
	font-size: 15px;
	color: #1f2937;
}

.tj-dash-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 14px 20px;
	margin-bottom: 18px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.tj-dash-topbar-user {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.tj-dash-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 2px solid var(--tj-primary-light);
}

.tj-dash-avatar-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tj-primary);
	color: #fff;
	font-weight: 700;
	font-size: 18px;
	text-transform: uppercase;
}

.tj-dash-welcome {
	font-size: 15px;
	color: #6b7280;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tj-dash-welcome strong {
	color: #111827;
	font-size: 17px;
	display: block;
	line-height: 1.25;
}

.tj-btn-logout {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border-color: #fecaca;
	color: #b91c1c;
	flex-shrink: 0;
}

.tj-btn-logout:hover {
	background: #fef2f2;
}

.tj-dash-layout {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}

.tj-dash-sidebar {
	flex: 0 0 30%;
	max-width: 30%;
	position: sticky;
	top: 16px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 10px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.tj-dash-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.tj-dash-nav li a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 12px;
	border-radius: 9px;
	color: #4b5563;
	font-weight: 500;
	font-size: 14px;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
	position: relative;
}

.tj-dash-nav li a:hover {
	background: var(--tj-primary-light);
	color: var(--tj-primary-dark);
}

.tj-dash-nav li.is-active a {
	background: var(--tj-primary);
	color: #fff;
	font-weight: 600;
}

.tj-nav-icon {
	display: inline-flex;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.tj-nav-icon svg {
	width: 100%;
	height: 100%;
}

.tj-nav-label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tj-nav-badge {
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	padding: 3px 6px;
	border-radius: 999px;
	min-width: 18px;
	text-align: center;
	flex-shrink: 0;
}

.tj-dash-nav li.is-active .tj-nav-badge {
	background: #fff;
	color: var(--tj-primary-dark);
}

.tj-dash-content {
	flex: 1;
	min-width: 0;
}

.tj-dash-content .tj-driver-dashboard-body {
	max-width: none;
	margin: 0;
}

/* Responsive: sidebar becomes a horizontally-scrollable strip above the
   content instead of a fixed-width column, and stops being sticky so it
   doesn't eat vertical space on small screens. */
@media (max-width: 800px) {
	.tj-dash-layout {
		flex-direction: column;
	}

	.tj-dash-sidebar {
		flex-basis: auto;
		max-width: 100%;
		width: 100%;
		position: static;
		padding: 8px;
	}

	.tj-dash-nav ul {
		flex-direction: row;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		gap: 4px;
	}

	.tj-dash-nav li {
		flex-shrink: 0;
	}

	.tj-dash-nav li a {
		white-space: nowrap;
	}

	.tj-dash-welcome strong {
		font-size: 15px;
	}
}

@media (max-width: 480px) {
	.tj-dash-topbar {
		padding: 12px 14px;
	}

	.tj-dash-welcome {
		font-size: 13px;
	}

	.tj-btn-logout .tj-logout-label {
		display: none;
	}
}

.tj-driver-dashboard-body {
	max-width: 960px;
	margin: 0 auto;
	font-size: 15px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 28px 32px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04), 0 1px 2px rgba(16, 24, 40, 0.06);
}

.tj-driver-dashboard-body h2 {
	margin-top: 0;
}

.tj-driver-notice {
	padding: 14px 18px;
	background: #f3f4f6;
	border-radius: 8px;
}

.tj-driver-errors {
	background: #fee2e2;
	border: 1px solid #fecaca;
	color: #991b1b;
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 16px;
}

/* Register/Login tabs on the [tj_driver_registration] page. */
.tj-driver-auth-tabs {
	max-width: 720px;
	margin: 0 auto;
}
.tj-auth-tab-buttons {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
	border-bottom: 1px solid #e5e7eb;
}
.tj-auth-tab-btn {
	background: none;
	border: none;
	padding: 10px 18px;
	font-size: 15px;
	font-weight: 600;
	color: #6b7280;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}
.tj-auth-tab-btn.is-active {
	color: var(--tj-primary);
	border-bottom-color: var(--tj-primary);
}
.tj-auth-tab-panel {
	display: none;
}
.tj-auth-tab-panel.is-active {
	display: block;
}

.tj-driver-progress {
	display: flex;
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	gap: 8px;
}

.tj-driver-progress li {
	flex: 1;
	text-align: center;
	padding: 10px 6px;
	border-radius: 8px;
	background: #f3f4f6;
	color: #6b7280;
	font-size: 13px;
}

.tj-driver-progress li.is-active {
	background: var(--tj-primary);
	color: #fff;
	font-weight: 600;
}

.tj-driver-progress li.is-done {
	background: #dcfce7;
	color: #166534;
}

.tj-step-num {
	display: block;
	font-weight: 700;
	margin-bottom: 2px;
}

.tj-field {
	margin-bottom: 14px;
}

.tj-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.tj-field input[type="text"],
.tj-field input[type="tel"],
.tj-field input[type="email"],
.tj-field input[type="password"],
.tj-field input[type="date"],
.tj-field input[type="number"],
.tj-field input[type="file"],
.tj-field select,
.tj-field textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tj-field input:focus,
.tj-field select:focus,
.tj-field textarea:focus {
	outline: none;
	border-color: var(--tj-primary);
	box-shadow: 0 0 0 3px var(--tj-primary-light);
}

/* Required-field asterisk, added next to the label text of every
   mandatory field (see tj-required-mark spans in the PHP templates). */
.tj-required-mark {
	color: #e0342a;
	margin-left: 2px;
	font-weight: 700;
}

.tj-field-note {
	display: block;
	font-weight: 400;
	font-size: 12px;
	color: #6b7280;
	margin-top: 2px;
}

.tj-doc-group {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 14px 16px;
	margin-bottom: 16px;
}

.tj-doc-group legend {
	font-weight: 700;
	padding: 0 6px;
}

.tj-doc-conditional-field.is-active-conditional input {
	border-color: var(--tj-primary);
}

.tj-uploaded-file {
	display: inline-block;
	margin-top: 4px;
	font-size: 13px;
	color: #166534;
}

.tj-btn {
	display: inline-block;
	padding: 9px 18px;
	border-radius: 6px;
	border: 1px solid #d1d5db;
	background: #fff;
	color: #111827;
	text-decoration: none;
	cursor: pointer;
	font-size: 14px;
}

.tj-btn-primary {
	background: var(--tj-primary);
	border-color: var(--tj-primary);
	color: #fff;
}

.tj-btn-primary:hover {
	background: var(--tj-primary-dark);
	border-color: var(--tj-primary-dark);
}

.tj-btn-primary:disabled {
	opacity: 0.7;
	cursor: default;
}

.tj-btn-small {
	padding: 4px 10px;
	font-size: 12px;
	border-radius: 4px;
}

.tj-driver-nav {
	margin-top: 20px;
}

.tj-review-section {
	margin-bottom: 20px;
}

.tj-review-table {
	width: 100%;
	border-collapse: collapse;
}

.tj-review-table th,
.tj-review-table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid #f0f0f0;
}

.tj-bookings-table.tj-review-table thead th {
	background: #f9fafb;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #6b7280;
	border-bottom: 1px solid #e5e7eb;
}

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

.tj-driver-status-card {
	padding: 20px;
	background: #f9fafb;
	border-radius: 10px;
	text-align: center;
}

.tj-driver-nav ul {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	padding: 5px;
	margin: 0 0 24px;
	background: #f3f4f6;
	border-radius: 10px;
	border-bottom: none;
	gap: 2px;
}

.tj-driver-nav li {
	margin-right: 0;
}

.tj-driver-nav a {
	display: block;
	padding: 9px 16px;
	text-decoration: none;
	color: #6b7280;
	font-size: 14px;
	font-weight: 500;
	border-radius: 7px;
	transition: background 0.15s ease, color 0.15s ease;
}

.tj-driver-nav a:hover {
	color: #111827;
}

.tj-driver-nav li.is-active a {
	color: var(--tj-primary);
	font-weight: 700;
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
	border-bottom: none;
}

.tj-dash-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 14px;
	margin: 18px 0;
}

.tj-dash-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 18px 14px;
	text-align: center;
	transition: box-shadow 0.15s ease;
}

.tj-dash-card:hover {
	box-shadow: 0 2px 6px rgba(16, 24, 40, 0.08);
}

.tj-dash-card strong {
	display: block;
	font-size: 22px;
	color: var(--tj-primary);
	margin-bottom: 4px;
}

.tj-dash-card p {
	margin: 0;
	font-size: 12px;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.tj-dash-card p a {
	color: inherit;
	text-decoration: none;
}

.tj-dash-card p a:hover {
	text-decoration: underline;
}

.tj-dash-card-highlight {
	background: var(--tj-primary-light);
	border-color: var(--tj-primary);
}

.tj-dash-card-highlight strong {
	color: var(--tj-primary);
}

.tj-notification-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tj-notification-list li {
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f0;
}

.tj-notification-list li.is-unread {
	font-weight: 600;
	background: #fff8f1;
	border-left: 3px solid #d97706;
	padding-left: 12px;
}
.tj-notification-list li.is-hidden {
	display: none;
}

.tj-notification-date {
	display: block;
	font-size: 12px;
	color: #9ca3af;
}

/* Phase 3 — Bookings */
.tj-driver-subnav {
	margin-bottom: 16px;
}

.tj-bookings-table {
	width: 100%;
	overflow-x: auto;
	display: block;
}

/* My Vehicles table has more columns than fit a phone screen — scroll
   the table itself horizontally instead of letting it blow out the
   dashboard layout. */
.tj-table-scroll {
	width: 100%;
	overflow-x: auto;
}
.tj-table-scroll table {
	min-width: 720px;
}

.tj-booking-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 18px 20px;
	margin-bottom: 16px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}

.tj-booking-card h4 {
	margin-top: 0;
	color: #0d2c54;
}

/* Driver Login (inline + popup) */
.tj-driver-login-form {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 20px 24px;
}

.tj-driver-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: center;
	justify-content: center;
}

.tj-driver-modal.is-open {
	display: flex;
}

.tj-driver-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.6);
}

.tj-driver-modal-panel {
	position: relative;
	max-width: 420px;
	width: calc(100% - 32px);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: transparent;
}

.tj-driver-modal-close {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid #d1d5db;
	background: #fff;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	z-index: 1;
}

/* Restricted (not-yet-approved) dashboard view */
.tj-driver-restricted-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.tj-driver-restricted-header h2 {
	margin: 0;
}

/* Editable Profile tab */
.tj-profile-photo-field {
	margin-bottom: 18px;
}

.tj-profile-photo-preview {
	display: block;
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: 50%;
	margin: 6px 0 10px;
	border: 1px solid #e5e7eb;
}

/* ===================================================================
   /driver-auth/ — Login first, "Driver Registration" link underneath
   =================================================================== */
body.tj-driver-app-shell .tj-auth-page {
	max-width: 440px;
	margin: 6vh auto 0;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 28px 26px 22px;
	box-shadow: 0 6px 24px rgba(16, 24, 40, 0.08);
}
body.tj-driver-app-shell .tj-auth-page.tj-auth-page--wizard {
	max-width: 760px;
}
.tj-auth-page .tj-driver-form-wrap {
	max-width: none;
}
.tj-auth-page .tj-driver-form-wrap h2 {
	margin-top: 0;
	text-align: center;
}
.tj-auth-page .tj-field input[type="text"],
.tj-auth-page .tj-field input[type="email"],
.tj-auth-page .tj-field input[type="tel"],
.tj-auth-page .tj-field input[type="password"] {
	width: 100%;
	box-sizing: border-box;
}
.tj-auth-page .tj-btn-primary {
	width: 100%;
}
.tj-auth-switch {
	margin: 18px 0 0;
	padding-top: 16px;
	border-top: 1px solid #eef0f3;
	text-align: center;
	font-size: 14px;
	color: #4b5563;
}
.tj-auth-switch a {
	color: var(--tj-primary-dark);
	font-weight: 600;
	text-decoration: none;
}
.tj-auth-switch a:hover {
	text-decoration: underline;
}

/* ------------------------------------------------------------------
   Validation messages, OTP row, Google button, locked fleet select
   ------------------------------------------------------------------ */
.tj-field-error {
	display: block;
	color: #b91c1c;
	font-size: 12px;
	font-weight: 500;
	margin-top: 4px;
	min-height: 0;
}

.tj-field-error:empty {
	display: none;
}

.tj-field-error.tj-field-ok {
	color: #166534;
}

.tj-field input.is-invalid,
.tj-field select.is-invalid,
.tj-field textarea.is-invalid {
	border-color: #dc2626;
	background: #fef2f2;
}

.tj-field input.is-verified {
	background: #f0fdf4;
	border-color: #86efac;
}

.tj-inline-row {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.tj-inline-row input {
	flex: 1 1 auto;
	min-width: 0;
}

.tj-inline-row .tj-btn {
	flex: 0 0 auto;
	white-space: nowrap;
}

.tj-btn-secondary {
	background: #fff;
	color: var(--tj-primary, #1a7f37);
	border: 1px solid var(--tj-primary, #1a7f37);
	border-radius: 6px;
	padding: 8px 14px;
	cursor: pointer;
	font-weight: 600;
}

.tj-btn-secondary:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.tj-driver-signup-form button[disabled].tj-btn-primary {
	opacity: 0.55;
	cursor: not-allowed;
}

.tj-google-wrap {
	margin-bottom: 8px;
}

.tj-google-btn {
	display: flex;
	justify-content: center;
	min-height: 44px;
}

.tj-divider {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #6b7280;
	font-size: 12px;
	margin: 14px 0 4px;
}

.tj-divider::before,
.tj-divider::after {
	content: "";
	flex: 1;
	border-top: 1px solid #e5e7eb;
}

/* Category is auto-filled from the chosen model, so it reads as locked. */
.tj-field select.tj-locked {
	background: #f3f4f6;
	color: #374151;
	pointer-events: none;
}

.tj-field select:disabled {
	background: #f3f4f6;
	cursor: not-allowed;
}

/* ---- Document preview + viewer popup ---- */
.tj-file-preview{margin-top:8px}
.tj-new-tag{display:block;font-size:12px;color:#b45309;margin-bottom:4px}
a.tj-doc-view{color:#2563eb;text-decoration:underline}
a.tj-doc-thumb,a.tj-doc-pdf{display:inline-flex;flex-direction:column;align-items:flex-start;gap:4px;text-decoration:none;color:#374151;cursor:zoom-in;vertical-align:top}
a.tj-doc-thumb img{width:120px;height:90px;object-fit:cover;border:1px solid #d1d5db;border-radius:8px;background:#f9fafb;display:block}
a.tj-doc-pdf{flex-direction:row;align-items:center;gap:8px;padding:8px 12px;border:1px solid #d1d5db;border-radius:8px;background:#f9fafb}
.tj-pdf-icon{background:#dc2626;color:#fff;font-weight:700;font-size:12px;padding:6px 8px;border-radius:6px}
.tj-doc-cap{font-size:12px;color:#6b7280;word-break:break-all}
.tj-uploaded-file{display:block;margin-top:6px}
.tj-missing{color:#b91c1c;font-weight:600}
.tj-driver-success{background:#dcfce7;border:1px solid #86efac;color:#166534;padding:12px 16px;border-radius:8px;margin-bottom:12px;font-weight:600}
.tj-driver-errors ul{margin:6px 0 0 18px;list-style:disc}
.tj-viewer{position:fixed;inset:0;background:rgba(0,0,0,.75);display:none;align-items:center;justify-content:center;z-index:999999;padding:12px}
.tj-viewer.is-open{display:flex}
.tj-viewer-box{background:#fff;border-radius:10px;max-width:96vw;width:900px;max-height:94vh;display:flex;flex-direction:column;overflow:hidden}
.tj-viewer-bar{display:flex;align-items:center;gap:12px;padding:8px 12px;border-bottom:1px solid #e5e7eb}
.tj-viewer-title{flex:1;font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tj-viewer-open{font-size:13px;color:#2563eb}
.tj-viewer-close{background:none;border:0;font-size:28px;line-height:1;cursor:pointer;color:#374151}
.tj-viewer-body{flex:1;overflow:auto;display:flex;align-items:center;justify-content:center;background:#f3f4f6;min-height:200px}
.tj-viewer-body img{max-width:100%;max-height:80vh;object-fit:contain}
.tj-viewer-body iframe{width:100%;height:80vh;border:0}

/* ===================================================================
   New Booking card (New Bookings tab + Notifications) — details on
   top, full-width Accept button at the bottom.
   =================================================================== */
.tj-nb-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	margin: 0 0 18px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
	max-width: 520px;
}
.tj-nb-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px;
	border-bottom: 1px dashed #e5e7eb;
}
.tj-nb-trip {
	font-weight: 700;
	letter-spacing: .4px;
	text-transform: uppercase;
	color: #4b5563;
}
.tj-nb-pay {
	background: #0d2c54;
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	padding: 6px 14px;
	border-radius: 999px;
}
.tj-nb-row {
	padding: 12px 16px;
	border-bottom: 1px dashed #e5e7eb;
	color: #374151;
}
.tj-nb-row strong { color: #1f2937; }
.tj-nb-k { color: #6b7280; }
.tj-nb-route {
	padding: 12px 16px;
	border-bottom: 1px dashed #e5e7eb;
}
.tj-nb-stop {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #4b5563;
	font-size: 16px;
}
.tj-nb-dot {
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
}
.tj-nb-dot-from { border: 4px solid #0d2c54; background: #fff; }
.tj-nb-dot-to { background: var(--tj-primary); }
.tj-nb-line {
	width: 0;
	height: 16px;
	margin: 2px 0 2px 6px;
	border-left: 2px dotted #9ca3af;
}
.tj-nb-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border-bottom: 1px dashed #e5e7eb;
}
.tj-nb-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 4px;
	padding: 14px 8px;
	border-right: 1px solid #eef0f3;
	color: #374151;
}
.tj-nb-stat:last-child { border-right: 0; }
.tj-nb-stat strong { font-size: 15px; line-height: 1.25; }
.tj-nb-stat small { color: #6b7280; font-size: 11px; }
.tj-nb-ico { font-size: 26px; line-height: 1; color: var(--tj-primary); font-weight: 700; }
.tj-nb-note {
	padding: 12px 16px;
	text-align: center;
	font-weight: 600;
	font-size: 13px;
	color: #4b5563;
	border-bottom: 1px dashed #e5e7eb;
}
.tj-nb-when { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 0; }
.tj-nb-accept-form { margin: 0; }
.tj-nb-vehicle {
	display: block;
	width: calc(100% - 32px);
	margin: 0 16px 12px;
	padding: 10px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
}
.tj-nb-accept {
	display: block;
	width: 100%;
	border: 0;
	padding: 16px;
	background: var(--tj-primary);
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: .5px;
	cursor: pointer;
}
.tj-nb-accept:hover { background: var(--tj-primary-dark); }
.tj-nb-decline-form { margin: 0; text-align: center; background: #fafafa; }
.tj-nb-decline {
	border: 0;
	background: none;
	color: #6b7280;
	padding: 10px;
	font-size: 13px;
	cursor: pointer;
	text-decoration: underline;
}
.tj-nb-closed {
	padding: 14px;
	text-align: center;
	font-weight: 600;
	color: #6b7280;
	background: #f3f4f6;
}
.tj-nb-card.is-unavailable { opacity: .75; }

/* Hardening: themes style bare <button>/<select> (the blue buttons) —
   win against them with a higher-specificity scope. */
body .tj-nb-card .tj-nb-accept,
body .tj-nb-card button.tj-nb-accept {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	padding: 16px;
	background: var(--tj-primary);
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: none;
	box-shadow: none;
}
body .tj-nb-card .tj-nb-accept:hover { background: var(--tj-primary-dark); color: #fff; }
body .tj-nb-card .tj-nb-decline,
body .tj-nb-card button.tj-nb-decline {
	background: none;
	border: 0;
	box-shadow: none;
	color: #6b7280;
	padding: 10px;
	font-size: 13px;
	font-weight: 500;
	text-decoration: underline;
}
body .tj-nb-card .tj-nb-vehicle { background: #fff; color: #111827; }
.tj-nb-card { color: #374151; font-size: 15px; }

/* ===================================================================
   Dark dashboard theme (driver dashboard page only — the login /
   register page stays light). Black background, orange accents.
   =================================================================== */
body.tj-driver-dashboard-page { background: #0a0a0b; color: #e5e7eb; }
.tj-driver-dashboard-page .tj-dash-shell { color: #e5e7eb; }
.tj-driver-dashboard-page .tj-dash-topbar,
.tj-driver-dashboard-page .tj-dash-sidebar,
.tj-driver-dashboard-page .tj-driver-dashboard-body {
	background: #141416;
	border-color: #26262b;
	color: #e5e7eb;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 24px rgba(0, 0, 0, 0.45);
}
.tj-driver-dashboard-page .tj-dash-topbar { border-bottom: 2px solid var(--tj-primary); }
.tj-driver-dashboard-page .tj-dash-welcome { color: #9ca3af; }
.tj-driver-dashboard-page .tj-dash-welcome strong { color: #fff; }
.tj-driver-dashboard-page .tj-dash-avatar { border-color: var(--tj-primary); }
.tj-driver-dashboard-page .tj-dash-nav li a { color: #a1a1aa; }
.tj-driver-dashboard-page .tj-dash-nav li a:hover { background: #22160d; color: var(--tj-primary); }
.tj-driver-dashboard-page .tj-dash-nav li.is-active a { background: var(--tj-primary); color: #fff; }
.tj-driver-dashboard-page .tj-driver-dashboard-body h2,
.tj-driver-dashboard-page .tj-driver-dashboard-body h3,
.tj-driver-dashboard-page .tj-driver-dashboard-body h4 { color: #fff; }
.tj-driver-dashboard-page .tj-driver-dashboard-body a { color: var(--tj-primary); }
.tj-driver-dashboard-page .tj-driver-dashboard-body p,
.tj-driver-dashboard-page .tj-driver-dashboard-body label,
.tj-driver-dashboard-page .tj-driver-dashboard-body td,
.tj-driver-dashboard-page .tj-driver-dashboard-body th { color: #d4d4d8; }
.tj-driver-dashboard-page .tj-review-table th,
.tj-driver-dashboard-page .tj-review-table td { border-bottom-color: #26262b; }
.tj-driver-dashboard-page .tj-bookings-table.tj-review-table thead th { background: #1b1b1f; color: #9ca3af; border-bottom-color: #2f2f35; }
.tj-driver-dashboard-page .tj-dash-card { background: #1b1b1f; border-color: #2f2f35; }
.tj-driver-dashboard-page .tj-dash-card p,
.tj-driver-dashboard-page .tj-dash-card p a { color: #a1a1aa; }
.tj-driver-dashboard-page .tj-dash-card-highlight { background: #2a1a0e; border-color: var(--tj-primary); }
.tj-driver-dashboard-page .tj-driver-notice { background: #1f1f24; color: #e5e7eb; border: 1px solid #2f2f35; }
.tj-driver-dashboard-page .tj-driver-errors { background: #2a1214; border-color: #5b1d22; color: #fca5a5; }
.tj-driver-dashboard-page .tj-btn { background: #1f1f24; border-color: #34343b; color: #e5e7eb; }
.tj-driver-dashboard-page .tj-btn:hover { border-color: var(--tj-primary); color: var(--tj-primary); }
.tj-driver-dashboard-page .tj-btn-primary { background: var(--tj-primary); border-color: var(--tj-primary); color: #fff; }
.tj-driver-dashboard-page .tj-btn-primary:hover { background: var(--tj-primary-dark); border-color: var(--tj-primary-dark); color: #fff; }
.tj-driver-dashboard-page .tj-btn-logout { color: #fca5a5; border-color: #5b1d22; }
.tj-driver-dashboard-page .tj-btn-logout:hover { background: #2a1214; }
.tj-driver-dashboard-page .tj-field input,
.tj-driver-dashboard-page .tj-field select,
.tj-driver-dashboard-page .tj-field textarea,
.tj-driver-dashboard-page .tj-driver-dashboard-body select,
.tj-driver-dashboard-page .tj-driver-dashboard-body textarea,
.tj-driver-dashboard-page .tj-driver-dashboard-body input[type="text"] {
	background: #0e0e10;
	border-color: #34343b;
	color: #f4f4f5;
}
.tj-driver-dashboard-page .tj-field-note,
.tj-driver-dashboard-page .description { color: #8b8b94; }
.tj-driver-dashboard-page .tj-notification-list li { border-bottom-color: #26262b; }
.tj-driver-dashboard-page .tj-doc-group { border-color: #2f2f35; }
.tj-driver-dashboard-page .tj-driver-subnav .tj-btn { border-radius: 999px; padding: 8px 18px; }
/* booking cards stay white on the black page so they pop, like the reference */
.tj-driver-dashboard-page .tj-driver-dashboard-body .tj-nb-card,
.tj-driver-dashboard-page .tj-driver-dashboard-body .tj-nb-card p,
.tj-driver-dashboard-page .tj-driver-dashboard-body .tj-nb-card span,
.tj-driver-dashboard-page .tj-driver-dashboard-body .tj-nb-card div { color: #374151; }
.tj-driver-dashboard-page .tj-driver-dashboard-body .tj-nb-card strong { color: #111827; }
.tj-driver-dashboard-page .tj-driver-dashboard-body .tj-nb-card .tj-nb-pay { color: #fff; }
.tj-driver-dashboard-page .tj-driver-dashboard-body .tj-nb-card .tj-nb-accept { color: #fff; }
.tj-driver-dashboard-page .tj-nb-card { border-color: #2f2f35; }
@media (max-width: 600px) {
	.tj-driver-dashboard-page .tj-driver-dashboard-body { padding: 18px 14px; }
	.tj-nb-card { max-width: 100%; }
}

/* ===================================================================
   v4.0.3 — full-width dashboard, mobile tabs, visible icons, hovers
   =================================================================== */
body.tj-driver-app-shell { padding: 12px; }
body.tj-driver-dashboard-page .tj-dash-shell { max-width: none; width: 100%; margin: 0; }
.tj-dash-shell .tj-dash-layout { gap: 16px; }
.tj-dash-shell .tj-dash-sidebar { flex: 0 0 250px; max-width: 250px; }
.tj-dash-shell .tj-dash-content { flex: 1 1 auto; width: 100%; }
.tj-dash-shell .tj-driver-dashboard-body { max-width: none; width: 100%; margin: 0; }

/* Icons: always visible, always inherit the text colour. */
.tj-nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: 0 0 18px; }
.tj-nav-icon svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.tj-btn-logout { display: inline-flex; align-items: center; gap: 8px; }
.tj-btn-logout .tj-nav-icon { display: inline-flex; }

/* Hover / focus colour changes (theme orange). */
.tj-dash-nav li a { transition: background .15s, color .15s, transform .15s; }
.tj-dash-nav li:not(.is-active) a:hover { background: var(--tj-primary-light); color: var(--tj-primary-dark); }
.tj-dash-nav li a:hover .tj-nav-icon { color: inherit; }
.tj-btn { transition: background .15s, border-color .15s, color .15s; }
.tj-btn:hover { border-color: var(--tj-primary); color: var(--tj-primary-dark); }
.tj-btn-primary:hover { color: #fff; }
.tj-btn-logout:hover { background: #ef4444; border-color: #ef4444; color: #fff; }
.tj-dash-card { transition: border-color .15s, transform .15s, box-shadow .15s; }
.tj-dash-card:hover { border-color: var(--tj-primary); transform: translateY(-2px); }
.tj-review-table tbody tr:hover td, .tj-review-table tbody tr:hover th { background: rgba(255, 109, 20, 0.07); }
.tj-nb-card { transition: box-shadow .15s, transform .15s; }
.tj-nb-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(255, 109, 20, 0.25); }
.tj-driver-dashboard-page .tj-dash-nav li:not(.is-active) a:hover { background: #2a1a0e; color: var(--tj-primary); }
.tj-driver-dashboard-page .tj-btn:hover { background: #2a1a0e; border-color: var(--tj-primary); color: var(--tj-primary); }
.tj-driver-dashboard-page .tj-btn-primary:hover { background: var(--tj-primary-dark); color: #fff; }
.tj-driver-dashboard-page .tj-btn-logout { display: inline-flex; color: #fca5a5; border-color: #5b1d22; background: #1f1f24; }
.tj-driver-dashboard-page .tj-btn-logout:hover { background: #ef4444; border-color: #ef4444; color: #fff; }
.tj-driver-dashboard-page .tj-dash-card:hover { border-color: var(--tj-primary); }
.tj-driver-dashboard-page .tj-review-table tbody tr:hover td,
.tj-driver-dashboard-page .tj-review-table tbody tr:hover th { background: rgba(255, 109, 20, 0.1); }
.tj-driver-dashboard-page .tj-nb-card:hover { box-shadow: 0 8px 26px rgba(255, 109, 20, 0.35); }

/* Latest Bookings block at the top of the dashboard */
.tj-latest { margin: 4px 0 26px; }
.tj-latest-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tj-latest-head h3 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.tj-latest-count { background: var(--tj-primary); color: #fff; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.tj-latest-all { font-weight: 600; text-decoration: none; white-space: nowrap; }
.tj-latest-all:hover { text-decoration: underline; }
.tj-latest-empty { padding: 18px; border: 1px dashed #34343b; border-radius: 12px; text-align: center; color: #9ca3af; margin: 0; }

/* Booking card grids (New Bookings, Notifications, Latest) */
.tj-nb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.tj-nb-grid .tj-nb-card { max-width: none; margin: 0; }

/* Mobile */
@media (max-width: 800px) {
	.tj-dash-shell .tj-dash-sidebar { flex: 0 0 auto; max-width: 100%; width: 100%; padding: 8px; }
	.tj-dash-nav ul { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 6px; }
	.tj-dash-nav ul::-webkit-scrollbar { display: none; }
	.tj-dash-nav li { flex: 0 0 auto; }
	.tj-dash-nav li a { white-space: nowrap; padding: 10px 14px; }
	.tj-dash-nav .tj-nav-label { overflow: visible; text-overflow: clip; flex: 0 0 auto; }
	/* the 3-4 summary tiles (status / % / unread / counts) are hidden on phones */
	.tj-dash-cards { display: none; }
	.tj-nb-grid { grid-template-columns: 1fr; }
	.tj-btn-logout .tj-logout-label { display: none; }
	.tj-btn-logout { padding: 9px 11px; }
}
@media (max-width: 480px) {
	body.tj-driver-app-shell { padding: 8px; }
	.tj-btn-logout span.tj-logout-label { display: none; }
}


/* ---- Accepted booking card + extras chips ---- */
.tj-nb-extras { padding: 12px 16px; border-bottom: 1px dashed #e5e7eb; text-align: center; }
.tj-nb-extras-title { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6b7280; margin-bottom: 8px; }
.tj-nb-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tj-nb-chip { background: #fff4ec; color: #9a3d00; border: 1px solid #ffd9bf; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.tj-nb-chip strong { color: #7a2f00; }
.tj-nb-chip-soft { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.tj-nb-card.is-mine { border: 2px solid #16a34a; box-shadow: 0 4px 14px rgba(22, 163, 74, .18); }
.tj-nb-mine-status { background: #dcfce7; color: #166534; font-weight: 700; text-align: center; padding: 10px 12px; font-size: 14px; }
.tj-nb-mine-actions { display: flex; gap: 8px; padding: 12px 16px 16px; }
.tj-nb-mine-actions form { margin: 0; flex: 1; }
.tj-nb-view, .tj-nb-cancel { display: block; width: 100%; box-sizing: border-box; text-align: center; border-radius: 8px; padding: 11px 10px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; line-height: 1.2; }
.tj-nb-mine-actions .tj-nb-view { flex: 1; background: var(--tj-primary); color: #fff; border: 0; }
body .tj-nb-card .tj-nb-cancel { background: #fff; color: #b91c1c; border: 1px solid #fca5a5; }
body .tj-nb-card .tj-nb-cancel:hover { background: #fee2e2; }
.tj-count-green { background: #16a34a; }
.tj-accepted { margin-bottom: 28px; }

/* ---- Policy consent (registration, last step) ---- */
.tj-policy-box { border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; margin: 18px 0; background: #fafafa; }
.tj-policy-box h4 { margin: 0 0 10px; font-size: 16px; }
.tj-policy-box label { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; cursor: pointer; font-size: 14px; line-height: 1.4; }
.tj-policy-box input[type=checkbox] { margin-top: 3px; flex: 0 0 auto; width: 17px; height: 17px; }
.tj-policy-box a { font-weight: 600; text-decoration: underline; }
.tj-policy-error { display: none; margin: 10px 0 0; color: #b91c1c; font-weight: 600; font-size: 14px; }
.tj-policy-box.has-error { border-color: #fca5a5; background: #fef2f2; }
.tj-policy-box.has-error .tj-policy-error { display: block; }
