:root {
	--sidebar-nav-width: 240px;
	--sidebar-content-width: 400px;
	--sidebar-width: calc(var(--sidebar-nav-width) + var(--sidebar-content-width));
	--sidebar-bg: #ffffff;
	--sidebar-nav-bg: #f8fafc;
	--border-color: #e5e7eb;
	--text-primary: #111827;
	--text-secondary: #6b7280;
	--accent-color: #000000;
	--accent-text-color: #ffffff;
	--hover-bg: #f3f4f6;
	--app-bg: #f9fafb;
	--panel-bg: #ffffff;
	--map-bg: #e5e7eb;
	--input-bg: #ffffff;
	--tab-active-bg: #ffffff;
	--range-track-bg: #e5e7eb;
	--charger-marker-green: #10b981;
	--viewport-height: 100vh;
	/* Bootstrap variable bridges */
	--bs-body-bg: var(--app-bg);
	--bs-body-color: var(--text-primary);
	--bs-border-color: var(--border-color);
	--bs-secondary-color: var(--text-secondary);
}

@supports (height: 100dvh) {
	:root {
		--viewport-height: 100dvh;
	}
}

/* Dark theme overrides */
:root[data-theme="dark"] {
	--sidebar-bg: #0f1014;
	--sidebar-nav-bg: #16181d;
	--border-color: #23262d;
	--text-primary: #e5e7eb;
	--text-secondary: #cbd5e1;
	--accent-color: #c5ff02;
	--accent-text-color: #0b0f19;
	--hover-bg: #1c1f26;
	--app-bg: #101115;
	--panel-bg: #111318;
	--map-bg: #0f1115;
	--input-bg: #0f1116;
	--tab-active-bg: #1c1f26;
	--range-track-bg: #2a2f36;
	/* Bootstrap variable bridges */
	--bs-body-bg: var(--app-bg);
	--bs-body-color: var(--text-primary);
	--bs-border-color: var(--border-color);
	--bs-secondary-color: var(--text-secondary);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	overflow: hidden;
	min-height: var(--viewport-height);
	height: var(--viewport-height);
	background: var(--app-bg);
	color: var(--text-primary);
}

/* Sidebar Layout */
.sidebar {
	position: fixed;
	left: 0;
	top: 0;
	width: var(--sidebar-nav-width);
	min-height: var(--viewport-height);
	height: var(--viewport-height);
	background: var(--sidebar-nav-bg);
	border-right: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
	z-index: 1001;
	box-shadow: 2px 0 8px rgba(0, 0, 0, 0.02);
	transition: left 0.3s ease;
}

.sidebar-nav {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 1.5rem 0;
}

.sidebar-header {
	padding: 0 1.5rem;
	margin-bottom: 1rem;
}

.sidebar-menu {
	padding: 0 0.75rem;
	gap: 0.25rem;
}

.sidebar-menu .nav-item {
	width: 100%;
}

.sidebar-menu .nav-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	color: var(--text-secondary);
	border-radius: 0.75rem;
	font-weight: 500;
	transition: all 0.2s;
	border: none;
	width: 100%;
	text-align: left;
	background: transparent;
}

.sidebar-menu .nav-link i {
	font-size: 1.25rem;
	width: 24px;
	text-align: center;
}

.sidebar-menu .nav-link:hover {
	background: var(--hover-bg);
	color: var(--text-primary);
}

.sidebar-menu .nav-link.active {
	background: var(--tab-active-bg);
	color: var(--accent-color);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] .sidebar-menu .nav-link.active {
	color: var(--accent-color);
	background: var(--tab-active-bg);
}

.sidebar-nav-footer {
	margin-top: auto;
	display: flex;
	justify-content: center;
}

.sidebar-logout-btn {
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--bs-danger);
	color: #ffffff;
	border-color: transparent;
}

.sidebar-logout-btn i {
	font-size: 1.2rem;
}

/* Keep logout icon button hover identical to default state */
.sidebar-logout-btn:hover,
.sidebar-logout-btn:focus,
.sidebar-logout-btn:active {
	background: var(--bs-danger);
	color: #ffffff;
	border-color: transparent;
	box-shadow: 0 6px 14px rgba(220, 53, 69, 0.25);
	filter: brightness(0.94);
}

/* Mobile Header */
.mobile-header {
	height: 60px;
	display: none;
	align-items: center;
	justify-content: space-between;
	padding: 0 1rem;
	background: var(--sidebar-bg);
	border-bottom: 1px solid var(--border-color);
	flex-shrink: 0;
	z-index: 10;
}

/* Only show mobile header when logged in (menu has content to show) */
body.logged-in .mobile-header {
	display: flex;
}

.mobile-header .btn {
	padding: 0;
	color: var(--text-primary);
}

/* Sidebar Overlay (for mobile drawer) */
.sidebar-overlay {
	display: none;
}

@media (max-width: 768px) {
	.sidebar-overlay {
		position: fixed;
		inset: 0;
		background: rgba(0,0,0,0.5);
		z-index: 1999;
		display: block;
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0.3s ease;
	}

	body.sidebar-open .sidebar-overlay {
		opacity: 1;
		visibility: visible;
	}
}

.sidebar-content-wrapper {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: var(--viewport-height);
	background: var(--sidebar-bg);
	border-right: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
	z-index: 1000;
}

body.logged-in .sidebar-content-wrapper {
	left: var(--sidebar-nav-width);
	width: var(--sidebar-content-width);
}

.sidebar-content {
	flex: 1;
	overflow-y: auto;
	padding: 1.5rem;
	scrollbar-width: thin;
}

.sidebar-footer {
	border-top: 1px solid var(--border-color);
	padding: 1rem 1.5rem;
	background: var(--sidebar-bg);
	flex-shrink: 0;
}

.sidebar-footer-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	width: 100%;
}

.assistant-footer {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.nav-btn {
	background: none;
	border: none;
	color: var(--text-secondary);
	font-size: 1.25rem;
	padding: 0.5rem 1rem;
	cursor: pointer;
	transition: all 0.2s;
	border-radius: 0.5rem;
}

.nav-btn:hover {
	background: var(--hover-bg);
	color: var(--text-primary);
}

.nav-btn.active {
	color: var(--accent-color);
	background: var(--tab-active-bg);
}

/* Main Content */
.main-content {
	margin-left: 0;
	min-height: var(--viewport-height);
	height: var(--viewport-height);
	position: relative;
	overflow: hidden;
	transition: margin-left 0.3s ease;
}

body.logged-in .main-content {
	margin-left: var(--sidebar-width);
}

#map {
	width: 100%;
	height: 100%;
	background: var(--map-bg);
}

/* Map Controls */
.map-controls {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 10;
	display: flex;
	gap: 0.5rem;
}

.weather-badge {
	background: var(--panel-bg);
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	font-size: 0.875rem;
	color: var(--text-secondary);
	display: none;
	cursor: pointer;
}

.weather-badge:not(:empty) {
	display: block;
}

/* Map control button styling */
.map-controls .btn.btn-outline-primary {
	background: var(--panel-bg);
	border-color: #2563eb;
	color: #2563eb;
}
.map-controls .btn.btn-outline-primary:hover {
	background: #2563eb;
	color: #ffffff;
}

/* Trip Info Card */
.trip-info-card {
	position: absolute;
	bottom: 1.5rem;
	right: 1.5rem;
	width: 360px;
	max-height: 60vh;
	background: var(--panel-bg);
	border-radius: 1rem;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
	padding: 1.5rem;
	overflow-y: auto;
	z-index: 100;
	border: 1px solid var(--border-color);
}

.trip-info-card h5 {
	font-size: 1rem;
	letter-spacing: -0.02em;
}

/* Dark: highlight key overlays with lime for visibility */
:root[data-theme="dark"] .weather-badge,
:root[data-theme="dark"] .trip-info-card {
	background: #c5ff02;
	color: #0b0f19;
	box-shadow: 0 12px 40px rgba(197, 255, 2, 0.25);
	border: none;
}
:root[data-theme="dark"] .trip-info-card .text-muted,
:root[data-theme="dark"] .trip-info-card .text-primary,
:root[data-theme="dark"] .trip-info-card strong,
:root[data-theme="dark"] .trip-info-card .fw-bold,
:root[data-theme="dark"] .trip-info-card .fw-semibold,
:root[data-theme="dark"] .trip-info-card h5,
:root[data-theme="dark"] .trip-info-card .btn-link {
	color: #0b0f19 !important;
}
:root[data-theme="dark"] .trip-info-card .opacity-75 {
	opacity: 0.6 !important;
}
:root[data-theme="dark"] .trip-info-card .btn-link:hover {
	color: #000000 !important;
}

@keyframes evrpSlideInUp {
	from {
		transform: translateY(100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.btn-slide-in-up {
	animation: evrpSlideInUp 0.28s ease-out both;
}

#map-overlay-toggle-btn {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 1.25rem;
	z-index: 1200;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	min-width: 220px;
}

body:not(.mobile-show-map) #map-overlay-toggle-btn {
	display: none !important;
}

/* Tabs */
.nav-tabs {
	border: none !important;
}

.tabs-scroll-container {
	position: relative;
}

.tabs-scroll-container::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 48px;
	height: 100%;
	pointer-events: none;
	background: linear-gradient(270deg, var(--sidebar-bg) 0%, transparent 100%);
}

.tabs-scroll-wrapper {
	overflow-x: auto;
	overflow-y: hidden;
	padding-right: 0.5rem;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.tabs-scroll-wrapper::-webkit-scrollbar {
	display: none;
}

.tabs-scroll-wrapper .nav-tabs {
	flex-wrap: nowrap;
	gap: 0.25rem;
	min-width: max-content;
}

.tabs-scroll-wrapper .nav-item {
	flex: 0 0 auto;
}

.tabs-scroll-wrapper .nav-link {
	white-space: nowrap;
}

.nav-tabs .nav-link {
	border: none;
	color: var(--text-secondary);
	padding: 0.5rem 1rem;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
}

.nav-tabs .nav-link:hover {
	background: var(--hover-bg);
	color: var(--text-primary);
}

.nav-tabs .nav-link.active {
	background: var(--tab-active-bg);
	color: var(--accent-color);
}

/* Improve active tab contrast in dark mode */
:root[data-theme="dark"] .nav-tabs .nav-link.active {
	color: var(--text-primary);
}

/* Search Box */
.search-box {
	position: relative;
}

.search-box i {
	position: absolute;
	left: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-secondary);
	font-size: 0.875rem;
}

.search-box input {
	padding-left: 2.5rem;
	border: 1px solid var(--border-color);
	border-radius: 0.5rem;
	font-size: 0.875rem;
}

.search-box input:focus {
	border-color: var(--accent-color);
	outline: none;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Make Bootstrap's text-muted readable in dark */
.text-muted { color: var(--text-secondary) !important; }

/* Forms */
.form-control {
	background: var(--input-bg);
	border: 1px solid var(--border-color);
	border-radius: 0.5rem;
	padding: 0.625rem 0.875rem;
	font-size: 0.875rem;
	transition: all 0.2s;
	color: var(--text-primary);
}

.form-control:focus {
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
	outline: none;
}

.form-control::placeholder {
	color: var(--text-secondary);
}

/* Selects */
.form-select {
	background-color: var(--input-bg);
	color: var(--text-primary);
	border: 1px solid var(--border-color);
}

/* Vehicle form selects: remove focus highlight/ring */
#vehicle-form .form-select:focus,
#vehicle-form .form-select:focus-visible {
	border-color: var(--border-color) !important;
	box-shadow: none !important;
	outline: none !important;
}

/* Switch (Bootstrap form-switch) - grayscale */
.form-check-input:checked {
	background-color: #000000;
	border-color: #000000;
}
.form-check-input:focus,
.form-check-input:focus-visible {
	border-color: #000000;
	box-shadow: none;
	outline: none;
}

/* Chargers pane preference checkbox: larger and circular (light theme default: black/white) */
#chargers-filter-prefs.form-check-input {
	width: 1.4rem;
	height: 1.4rem;
	margin-top: 0.12rem;
	border-radius: 50%;
	border: 2px solid #000000;
	background-color: #ffffff;
	cursor: pointer;
}

#chargers-filter-prefs.form-check-input:checked {
	background-color: #000000;
	border-color: #000000;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpolyline points='4,10 8,14 16,6' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
	background-size: 0.9rem 0.9rem;
}

#chargers-filter-prefs.form-check-input:focus,
#chargers-filter-prefs.form-check-input:focus-visible {
	border-color: #000000;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
	outline: none;
}

/* Dark theme override: keep high-visibility green style */
:root[data-theme="dark"] #chargers-filter-prefs.form-check-input {
	border-color: #c5ff02;
	background-color: rgba(197, 255, 2, 0.16);
}

:root[data-theme="dark"] #chargers-filter-prefs.form-check-input:checked {
	background-color: #c5ff02;
	border-color: #c5ff02;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpolyline points='4,10 8,14 16,6' fill='none' stroke='%23000000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
}

:root[data-theme="dark"] #chargers-filter-prefs.form-check-input:focus,
:root[data-theme="dark"] #chargers-filter-prefs.form-check-input:focus-visible {
	border-color: #c5ff02;
	box-shadow: 0 0 0 3px rgba(197, 255, 2, 0.35);
}

.hotels-near-me-btn {
	width: 100%;
	background-color: #000000;
	color: #ffffff;
	border-color: #000000;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.hotels-near-me-btn:hover,
.hotels-near-me-btn:focus {
	background-color: #111111;
	border-color: #111111;
	color: #ffffff;
}
.hotels-near-me-btn:disabled {
	opacity: 0.65;
}
:root[data-theme="dark"] .hotels-near-me-btn {
	background-color: #ffffff;
	border-color: #ffffff;
	color: #0b0f19;
}
:root[data-theme="dark"] .hotels-near-me-btn:hover,
:root[data-theme="dark"] .hotels-near-me-btn:focus {
	background-color: #f5f5f5;
	border-color: #f5f5f5;
	color: #000000;
}

/* Force grayscale knob for switch in both states */
.form-switch .form-check-input {
	appearance: none;
	-webkit-appearance: none;
	--bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23444444'/%3e%3c/svg%3e");
}
.form-switch .form-check-input:checked {
	--bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
}

.form-label {
	font-size: 0.8125rem;
	font-weight: 500;
	margin-bottom: 0.375rem;
	color: var(--text-secondary);
}

.section-title {
	font-weight: 600;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-secondary);
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--border-color);
}

/* Vehicle questionnaire lead-in */
#vehicle-question-copy {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-weight: 700;
	color: var(--text-primary);
	font-size: 1rem;
	margin-top: -0.25rem;
	margin-bottom: 0.75rem;
}

/* Vertically center the vehicle questionnaire content, but let trip plan start from top */
#vehicle-pane .planning-section {
	min-height: 60vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

#plan-pane .planning-section {
	min-height: 60vh;
	display: flex;
	flex-direction: column;
	padding-top: 1rem;
}

@media (max-width: 768px) {
	#vehicle-pane .planning-section {
		min-height: 45vh;
	}
}

.vehicle-summary {
	font-size: 0.8125rem;
	line-height: 1.5;
}

.vehicle-summary:empty {
	display: none;
}

/* Keep vehicle summary visible while scrolling */
.vehicle-summary {
	position: sticky;
	top: 0;
	z-index: 2;
	background: var(--sidebar-bg);
}

/* Selected vehicle summary - compact and fixed to top */
#selected-vehicle-summary {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--sidebar-bg);
	padding: 0.75rem 1.25rem;
	margin: -1.25rem -1.25rem 1rem -1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

/* Buttons */
.btn {
	border-radius: 0.5rem;
	font-weight: 500;
	font-size: 0.875rem;
	padding: 0.625rem 1.25rem;
	transition: all 0.2s;
}

.btn-primary {
	background: var(--accent-color);
	border: none;
}

.btn-primary:hover {
	background: #373737;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-primary:disabled {
	opacity: 0.6;
	transform: none;
}

/* Dark: use lime accent for primary buttons */
:root[data-theme="dark"] .btn-primary {
	background: #c5ff02;
	border-color: #c5ff02;
	color: #0b0f19;
}
:root[data-theme="dark"] .btn-primary:hover {
	background: #b2ea00;
	color: #0b0f19;
	box-shadow: 0 4px 12px rgba(197, 255, 2, 0.3);
}
:root[data-theme="dark"] .btn-primary:active,
:root[data-theme="dark"] .btn-primary:focus {
	background: #a5db00;
	color: #0b0f19;
}

.btn-primary:hover {
	background: #373737;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-primary:disabled {
	opacity: 0.6;
	transform: none;
}

/* Plan action button */
#plan-btn.btn-primary {
	--bs-btn-bg: #3a3a3a;
	--bs-btn-border-color: #3a3a3a;
	--bs-btn-hover-bg: #2f2f2f;
	--bs-btn-hover-border-color: #2f2f2f;
	--bs-btn-active-bg: #262626;
	--bs-btn-active-border-color: #262626;
	--bs-btn-disabled-bg: #3a3a3a;
	--bs-btn-disabled-border-color: #3a3a3a;
	background: #3a3a3a;
	border: none;
}
#plan-btn.btn-primary:hover:not(:disabled) {
	background: #2f2f2f;
}
#plan-btn.btn-primary:disabled {
	background: #3a3a3a;
}

/* Dark: make plan button lime too */
:root[data-theme="dark"] #plan-btn.btn-primary {
	--bs-btn-bg: #c5ff02;
	--bs-btn-border-color: #c5ff02;
	--bs-btn-hover-bg: #b2ea00;
	--bs-btn-hover-border-color: #b2ea00;
	--bs-btn-active-bg: #a5db00;
	--bs-btn-active-border-color: #a5db00;
	--bs-btn-disabled-bg: #c5ff02;
	--bs-btn-disabled-border-color: #c5ff02;
	background: #c5ff02;
	color: #0b0f19;
}

/* Continue (Select Vehicle) button: force black using Bootstrap variables */
#select-vehicle-btn.btn-primary {
    --bs-btn-bg: #000000;
    --bs-btn-border-color: #000000;
    --bs-btn-hover-bg: #111111;
    --bs-btn-hover-border-color: #111111;
    --bs-btn-active-bg: #000000;
    --bs-btn-active-border-color: #000000;
    background: #000000;
    border: none;
}

/* Dark: Select Vehicle uses lime accent */
:root[data-theme="dark"] #select-vehicle-btn.btn-primary {
    --bs-btn-bg: #c5ff02;
    --bs-btn-border-color: #c5ff02;
    --bs-btn-hover-bg: #b2ea00;
    --bs-btn-hover-border-color: #b2ea00;
    --bs-btn-active-bg: #a5db00;
    --bs-btn-active-border-color: #a5db00;
    background: #c5ff02;
    color: #0b0f19;
}

.btn-outline-secondary {
	border-color: var(--border-color);
	color: var(--text-secondary);
}

.btn-outline-secondary:hover {
	background: var(--hover-bg);
	border-color: var(--border-color);
	color: var(--text-primary);
}

/* Route Planning UI Refactor */
.route-planning-group {
	position: relative;
	padding: 0.5rem 0;
}

.primary-route-input-wrapper {
	position: relative;
	z-index: 10;
}

.stop-input-wrapper {
	position: relative;
	z-index: 10;
}

.primary-route-input-wrapper:focus-within,
.stop-input-wrapper:focus-within {
	z-index: 100;
}

.primary-route-input {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	border-radius: 0.75rem !important;
	overflow: hidden;
	border: 1px solid var(--border-color);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.primary-route-input:focus-within {
	border-color: var(--accent-color) !important;
	box-shadow: 0 0 0 1px var(--accent-color), 0 4px 12px rgba(0, 0, 0, 0.12);
}

.primary-route-input .input-group-text {
	border-radius: 0.75rem 0 0 0.75rem !important;
	padding-left: 1rem;
	background: var(--input-bg) !important;
	border: none !important;
}

.primary-route-input .form-control {
	height: 3.5rem;
	font-size: 1rem;
	font-weight: 500;
	border-radius: 0 !important;
	border: none !important;
	background: var(--input-bg) !important;
	box-shadow: none !important;
}

.primary-route-input .form-control:focus {
	box-shadow: none !important;
	border: none !important;
	outline: none !important;
	background: var(--input-bg) !important;
}

.primary-route-input .btn,
.primary-route-input .form-control:last-child {
	border-radius: 0 0.75rem 0.75rem 0 !important;
}

.primary-route-input .form-control:not(:last-child) {
	border-right: none !important;
}

.primary-route-input .btn {
	height: 3.5rem;
	padding: 0 1rem;
	border: none !important;
	background: var(--input-bg) !important;
	box-shadow: none !important;
}

.primary-route-input .btn:focus {
	box-shadow: none !important;
	outline: none !important;
}

.primary-route-input .btn:hover {
	background: var(--hover-bg) !important;
}

:root[data-theme="dark"] .primary-route-input .form-control::placeholder {
	color: var(--text-primary);
	opacity: 0.6;
}

/* Stops Section & Route Spine */
.additional-stops-container {
	position: relative;
	margin-left: 0.75rem; /* Indent stops */
	padding: 0.5rem 0 0.5rem 0.75rem;
	border-left: 2px dashed var(--border-color);
}

/* Spine Connector to Start */
.additional-stops-container::before {
	content: '';
	position: absolute;
	left: -2px;
	top: -2.75rem;
	height: calc(100% + 2.75rem);
	border-left: 2px dashed var(--border-color);
}

#destination-wrapper {
	margin-top: 2.5rem !important;
	position: relative;
}

#destination-wrapper::before {
	content: '';
	position: absolute;
	left: 0.75rem;
	top: -2.5rem;
	height: 2.5rem;
	border-left: 2px dashed var(--border-color);
}

.additional-stops {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
}

.stop-row {
	position: relative;
}

.stop-input-group {
	transition: all 0.2s ease;
}

.stop-input-wrapper {
	position: relative;
}

.stop-input {
	font-size: 0.875rem !important;
	padding: 0.5rem 3.5rem 0.5rem 0.75rem !important;
	height: 2.25rem !important;
	border-radius: 0.5rem !important;
	background: var(--input-bg);
	border-color: var(--border-color);
	box-shadow: none !important;
}

.stop-controls-overlay {
	position: absolute;
	right: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	gap: 0.25rem;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.stop-row:hover .stop-controls-overlay,
.stop-input:focus ~ .stop-controls-overlay {
	opacity: 1;
}

.stop-charge-btn, .remove-stop-btn {
	color: var(--text-secondary);
	font-size: 1.1rem;
}

.stop-charge-btn:hover { color: var(--accent-color); }
.remove-stop-btn:hover { color: #ff4d4d; }

.stop-row.dragging {
	opacity: 0.5;
}

.grab-handle {
	cursor: grab;
	color: var(--text-secondary);
	opacity: 0.4;
	transition: opacity 0.2s ease;
	padding: 0.5rem; /* Larger hit area */
	margin: -0.5rem; /* Offset padding */
}

.grab-handle:active {
	cursor: grabbing;
}

.stop-row:hover .grab-handle {
	opacity: 1;
}

.stop-charge-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-left: 0.15rem;
}

.stop-charge-badge {
	background: var(--hover-bg);
	color: var(--text-secondary);
	border: 1px solid var(--border-color);
	font-size: 0.66rem;
	font-weight: 600;
}

.stop-charge-modal .modal-content {
	background: var(--panel-bg);
	color: var(--text-primary);
	border: 1px solid var(--border-color);
}

.stop-charge-modal .form-select,
.stop-charge-modal .form-range {
	background: var(--input-bg);
	border-color: var(--border-color);
	color: var(--text-primary);
}

.stop-charge-modal .stop-charge-modal-minutes-limit {
	font-size: 0.72rem;
}

.stop-charge-modal .stop-charge-modal-speed-block {
	text-align: center;
}

.stop-charge-modal .stop-charge-modal-speed-label {
	--speed-progress: 100%;
	display: block;
	margin: 0.35rem 0 0.65rem;
	font-size: clamp(2rem, 5vw, 3.2rem);
	font-weight: 900;
	letter-spacing: -0.045em;
	line-height: 0.9;
	text-align: center;
	color: var(--accent-color);
	text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	transform-origin: center;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.stop-charge-modal .stop-charge-modal-speed-label {
		background:
			linear-gradient(
				90deg,
				var(--accent-color) 0%,
				var(--accent-color) var(--speed-progress),
				var(--text-secondary) var(--speed-progress),
				var(--text-secondary) 100%
			);
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
	}
}

.stop-charge-modal .stop-charge-modal-speed-label.speed-label-bump {
	animation: stopChargeSpeedPulse 0.22s ease-out;
}

@keyframes stopChargeSpeedPulse {
	0% {
		transform: translateY(0) scale(1);
		text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	}
	45% {
		transform: translateY(-2px) scale(1.035);
		text-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
	}
	100% {
		transform: translateY(0) scale(1);
		text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	}
}

.extra-small {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.form-range-sm::-webkit-slider-thumb {
	width: 1.25rem !important;
	height: 1.25rem !important;
	margin-top: -0.45rem !important;
}

.add-stop-btn {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--text-secondary);
	opacity: 0.8;
	transition: all 0.2s ease;
}

.add-stop-btn:hover {
	color: var(--accent-color);
	opacity: 1;
	text-decoration: underline !important;
}

.text-primary {
	color: var(--text-primary)!important;
}

/* Timeline */
#timeline-container {
	margin-top: 1rem;
}

.timeline-item {
	padding: 0.875rem;
	background: var(--hover-bg);
	border-radius: 0.5rem;
	margin-bottom: 0.75rem;
	border-left: 3px solid transparent;
	transition: all 0.2s;
}

.timeline-item:hover {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.timeline-item.drive {
	/* Cyan tint background */
	background: #e7f1fb;
	border-left-color: transparent;
}

.timeline-item.charger {
	/* Emerald tint background (swapped with start) */
	background: #ecfdf5;
	border-left-color: transparent;
}

.timeline-item.destination {
	/* Pink tint background */
	background: #fdf2f8;
	border-left-color: transparent;
}

.timeline-item.stop {
	/* Violet tint background */
	background: #f5f3ff;
	border-left-color: transparent;
}

.timeline-item.stop-charge {
	/* Sky tint background */
	background: #e0f2fe;
	border-left-color: transparent;
}

/* Start (origin) item tint */
.timeline-item.start {
	/* Amber tint background (swapped with charger) */
	background: #fffbeb;
	border-left-color: transparent;
}

.timeline-icon {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.timeline-icon.drive {
	background: #bedeff;
	color: #007aff;
}

.timeline-icon.charger {
	background: var(--charger-marker-green);
	color: #ffffff;
}

.timeline-icon.start {
	/* Swapped to orange */
	background: #fef3c7;
	color: #d97706;
}

.timeline-icon.destination {
	background: #fce7f3;
	color: #db2777;
}

.timeline-icon.stop {
	background: #ede9fe;
	color: #7c3aed;
}

.timeline-icon.stop-charge {
	background: #dbeafe;
	color: #0284c7;
}

/* Dark theme: improve timeline readability and accents */
:root[data-theme="dark"] .timeline-item {
	background: #15181e;
	color: var(--text-primary);
	border-left-color: transparent;
}
:root[data-theme="dark"] .timeline-item.drive { border-left-color: #3b82f6; }
:root[data-theme="dark"] .timeline-item.charger { border-left-color: var(--charger-marker-green); }
:root[data-theme="dark"] .timeline-item.destination { border-left-color: #ec4899; }
:root[data-theme="dark"] .timeline-item.stop { border-left-color: #8b5cf6; }
:root[data-theme="dark"] .timeline-item.stop-charge { border-left-color: #0ea5e9; }
:root[data-theme="dark"] .timeline-item.start { border-left-color: #f59e0b; }

:root[data-theme="dark"] .timeline-icon.drive { background: #1f3b63; color: #9cc4ff; }
:root[data-theme="dark"] .timeline-icon.charger { background: var(--charger-marker-green); color: #ffffff; }
:root[data-theme="dark"] .timeline-icon.destination { background: #4b1e38; color: #f9a8d4; }
:root[data-theme="dark"] .timeline-icon.stop { background: #32275b; color: #c4b5fd; }
:root[data-theme="dark"] .timeline-icon.stop-charge { background: #0b2942; color: #7dd3fc; }
:root[data-theme="dark"] .timeline-icon.start { background: #4a3413; color: #fcd34d; }

.timeline-stepper {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.timeline-stepper-progress {
	padding: 0.25rem 0.125rem 0;
}

.timeline-stepper-progress-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.timeline-stepper-kicker {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-secondary);
}

.timeline-stepper-count {
	font-size: 0.76rem;
	font-weight: 600;
	color: var(--text-secondary);
}

.timeline-stepper-progress-track {
	height: 8px;
	width: 100%;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.08);
	overflow: hidden;
}

.timeline-stepper-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #22d3ee, #3b82f6);
	border-radius: inherit;
	transition: width 0.3s ease;
}

.timeline-stepper-card {
	margin-bottom: 0;
	border-left: none !important;
	border-radius: 0.9rem;
	padding: 1rem;
}

.timeline-stepper-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.timeline-stepper-title {
	font-size: 1.28rem;
	font-weight: 700;
	line-height: 1.2;
}

.timeline-stepper-subtitle {
	font-size: 0.92rem;
	color: var(--text-secondary);
}

.timeline-stepper-subtle {
	font-size: 0.9rem;
	color: var(--text-secondary);
}

.timeline-stepper-text {
	display: inline;
}

.timeline-stepper-link {
	font-size: inherit;
	font-weight: inherit;
	text-decoration: none;
	color: inherit;
}

.timeline-stepper-link:hover {
	opacity: 0.76;
	text-decoration: underline;
	color: inherit !important;
}

.timeline-stepper-address-link {
	font-weight: 500;
}

.timeline-stepper-metric {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.6rem 0.7rem;
	border-radius: 0.7rem;
	background: rgba(15, 23, 42, 0.05);
}

.timeline-stepper-metric span {
	font-size: 0.8rem;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 600;
}

.timeline-stepper-metric strong {
	font-size: 1rem;
	font-weight: 700;
}

.timeline-stepper-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

:root[data-theme="light"] #timeline-container .timeline-item .badge {
	background-color: rgba(0, 0, 0, 0.067) !important;
	color: #111827 !important;
}

:root[data-theme="light"] #timeline-container .timeline-item .badge i {
	color: #111827 !important;
}

.timeline-stepper-action-row {
	margin-top: 0.2rem;
}

.timeline-stepper-hotels-btn {
	width: 100%;
	border-radius: 0.65rem;
}

.timeline-stepper-footer-wrap {
	position: sticky;
	bottom: 0;
	z-index: 2;
	padding-top: 0.55rem;
	padding-bottom: 0.2rem;
	background: linear-gradient(180deg, rgba(249, 250, 251, 0) 0%, var(--sidebar-bg) 32%);
}

.timeline-stepper-next-label {
	font-size: 0.82rem;
	color: var(--text-secondary);
	margin-bottom: 0.5rem;
}

.timeline-stepper-footer-actions {
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

.timeline-stepper-prev-btn {
	border-radius: 0.4rem;
	min-width: 96px;
}

.timeline-stepper-next-btn {
	flex: 1;
	font-weight: 700;
	border-radius: 0.4rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
}

.timeline-stepper-next-icon {
	font-size: 1rem;
	line-height: 1;
	transition: transform 0.2s ease;
}

.timeline-stepper-next-btn:hover .timeline-stepper-next-icon {
	transform: translateX(3px);
}

:root[data-theme="dark"] .timeline-stepper-progress-track {
	background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .timeline-stepper-footer-wrap {
	background: linear-gradient(180deg, rgba(15, 16, 20, 0) 0%, #0f1014 34%);
}

:root[data-theme="dark"] .timeline-stepper-metric {
	background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .timeline-stepper-next-btn {
	background: #ffffff;
	border-color: #ffffff;
	color: #0f172a;
}

:root[data-theme="dark"] .timeline-stepper-next-btn:hover {
	background: #e6edf8;
	border-color: #e6edf8;
	color: #0f172a;
	box-shadow: 0 4px 12px rgba(230, 237, 248, 0.35);
}

:root[data-theme="dark"] .timeline-stepper-next-btn:active,
:root[data-theme="dark"] .timeline-stepper-next-btn:focus {
	background: #d8e3f3;
	border-color: #d8e3f3;
	color: #0f172a;
}

.grab-handle {
	cursor: grab;
}

/* Spacing Adjustments */

/* Range Slider */
.form-range {
	height: 0.375rem;
	background: var(--range-track-bg);
	border-radius: 1rem;
	outline: none;
	padding: 10px 0; /* Increase hit area */
	cursor: pointer;
}
.form-range::-webkit-slider-runnable-track {
	height: 0.375rem;
	background: var(--range-track-bg);
	border-radius: 1rem;
}
.form-range::-moz-range-track {
	height: 0.375rem;
	background: var(--range-track-bg);
	border-radius: 1rem;
}
.form-range::-moz-range-progress {
	height: 0.375rem;
	background: #4b5563; /* subtle fill color on Firefox */
	border-radius: 1rem 0 0 1rem;
}

.form-range::-webkit-slider-thumb {
	width: 1.5rem;
	height: 1.5rem;
	background: var(--accent-color);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	margin-top: -0.625rem; /* align knob vertically */
}

.form-range::-moz-range-thumb {
	width: 1.5rem;
	height: 1.5rem;
	background: var(--accent-color);
	border-radius: 50%;
	cursor: pointer;
	border: none;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dark: brighter slider knob for contrast */
:root[data-theme="dark"] .form-range::-webkit-slider-thumb { background: #e5e7eb; }
:root[data-theme="dark"] .form-range::-moz-range-thumb { background: #e5e7eb; }

/* Responsive */
@media (max-width: 992px) {
	:root {
		--sidebar-nav-width: 80px;
		--sidebar-content-width: 320px;
	}
	
	.sidebar-menu .nav-link span {
		display: none;
	}
	
	.sidebar-menu .nav-link {
		justify-content: center;
		padding: 0.75rem;
	}
	
	.sidebar-header h5 {
		display: none;
	}
	
	.sidebar-header {
		padding: 0;
		display: flex;
		justify-content: center;
	}

	.sidebar-nav-footer span {
		display: none;
	}
	
	.sidebar-nav-footer .nav-link {
		justify-content: center;
	}
}

@media (max-width: 768px) {
    /* Mobile default: panes are full-height overlaying the map */
    .sidebar {
        width: 280px;
		left: -280px;
		z-index: 2000;
		transition: left 0.3s ease;
    }

	body.sidebar-open .sidebar {
		left: 0;
	}

	.sidebar-content-wrapper {
		left: 0 !important;
		width: 100% !important;
		z-index: 1001;
	}

	body.logged-in .sidebar-content-wrapper {
		left: 0 !important;
		width: 100% !important;
	}

    .main-content {
        margin-left: 0 !important;
		min-height: var(--viewport-height);
		height: var(--viewport-height);
    }

	body.logged-in .main-content {
		margin-left: 0 !important;
	}

	.sidebar-menu .nav-link span {
		display: inline;
	}
	
	.sidebar-menu .nav-link {
		justify-content: flex-start;
		padding: 0.75rem 1rem;
	}
	
	.sidebar-header h5 {
		display: block;
	}
	
	.sidebar-header {
		padding: 0 1.5rem;
		display: block !important;
	}

	.sidebar-nav-footer span {
		display: inline;
	}
	
	.sidebar-nav-footer .nav-link {
		justify-content: flex-start;
	}

	/* Dark mode close button visibility */
	:root[data-theme="dark"] .sidebar .btn-close {
		filter: invert(1);
	}

    .trip-info-card {
        width: calc(100% - 2rem);
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .sidebar-footer {
        overflow-x: auto;
    }

    /* When user taps "Show Map" on mobile, hide sidebar and let map fill screen */
    body.mobile-show-map .sidebar,
	body.mobile-show-map .sidebar-content-wrapper {
        display: none;
    }
    body.mobile-show-map .main-content {
		min-height: var(--viewport-height);
		height: var(--viewport-height);
    }

	#map-overlay-toggle-btn {
		width: calc(100% - 2.5rem);
		max-width: 420px;
	}

    /* Prevent iOS from zooming inputs (causes viewport shift past 100% width) */
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    input[type="password"],
    select,
    textarea,
    .form-control,
    .form-select,
    .stop-input,
    .primary-route-input .form-control {
        font-size: 16px !important;
    }
}

/* Dark theme: improve visibility of Close Maps button on lime card (all viewports) */
#close-map-btn,
#route-info-overlay-btn {
	padding: 0.75rem 1rem;
	font-weight: 600;
	border: none;
}

#close-map-btn {
	background: #000000;
	color: #ffffff;
}

#close-map-btn:hover {
	background: #222222;
	color: #ffffff;
}

/* Dark theme: on the lime card, we want high contrast */
:root[data-theme="dark"] #close-map-btn {
	background: #0b0f19;
	color: #ffffff;
}

:root[data-theme="dark"] #close-map-btn:hover {
	background: #000000;
}

:root[data-theme="dark"] #route-info-overlay-btn {
	background: #ffffff;
	color: #0b0f19;
}

:root[data-theme="dark"] #route-info-overlay-btn:hover {
	background: #f0f0f0;
}
/* Route Info Widgets */
.route-info-widgets {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.route-widget {
	background: #f8fafc;
	border: 1px solid var(--border-color);
	border-radius: 1rem;
	padding: 1.25rem;
}

:root[data-theme="dark"] .route-widget {
	background: #15181e!important;
	border: none;
}

.route-widget-title {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-secondary);
	margin-bottom: 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.route-widget-value {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--text-primary);
}

.route-widget-progress {
	height: 8px;
	border-radius: 999px;
	background: var(--range-track-bg);
	overflow: hidden;
	margin-top: 0.5rem;
}

.route-widget-progress-fill {
	height: 100%;
	border-radius: inherit;
	transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#trackingTabs, #tempTabs {
	position: relative;
	isolation: isolate;
	background: #e5e7eb
;
}

#tracking-tabs-controls {
	align-items: center;
}

#tracking-tabs-controls #trackingTabs {
	min-width: 0;
}

#tracking-itinerary-view-btn {
	flex: 0 0 auto;
	width: 2.55rem;
	height: 2.55rem;
	min-width: 2.55rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0 !important;
	border-radius: 999px;
	background: #0b0f19;
	color: #ffffff;
	padding: 0 !important;
	line-height: 1;
	box-shadow: none !important;
	align-self: center;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#tracking-itinerary-view-btn:hover,
#tracking-itinerary-view-btn:focus-visible {
	background: #1f2937;
	color: #ffffff;
}

#tracking-itinerary-view-btn:active {
	transform: scale(0.97);
}

#tracking-itinerary-view-btn i {
	font-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transform: translateY(-0.02em);
}

:root[data-theme="dark"] #trackingTabs,
:root[data-theme="dark"] #tempTabs {
	background: rgba(255, 255, 255, 0.05) !important;
}

:root[data-theme="dark"] #tracking-itinerary-view-btn {
	background: #c5ff02;
	color: #0b0f19;
}

:root[data-theme="dark"] #tracking-itinerary-view-btn:hover,
:root[data-theme="dark"] #tracking-itinerary-view-btn:focus-visible {
	background: #d8ff4d;
	color: #0b0f19;
}

#trackingTabs .nav-link,
#tempTabs .nav-link {
	position: relative;
	z-index: 2;
	transition: color 0.3s ease;
	border: none !important;
	background: transparent !important;
	color: var(--text-secondary);
}

#trackingTabs .nav-link.active,
#tempTabs .nav-link.active {
	color: #ffffff !important;
}

:root[data-theme="dark"] #trackingTabs .nav-link.active,
:root[data-theme="dark"] #tempTabs .nav-link.active {
	color: #0b0f19 !important;
}

/* Sliding indicator */
#trackingTabs::before,
#tempTabs::before {
	content: '';
	position: absolute;
	top: 4px;
	left: 4px;
	width: calc(50% - 4px);
	height: calc(100% - 8px);
	background: #0b0f19;
	border-radius: 6px;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 1;
}

:root[data-theme="dark"] #trackingTabs::before,
:root[data-theme="dark"] #tempTabs::before {
	background: #c5ff02;
}

#trackingTabs:has(#route-info-tab.active)::before,
#tempTabs:has(#temp-manual-tab.active)::before {
	transform: translateX(100%);
}

.progress-blue { background: #3b82f6; }
.progress-green { background: #22c55e; }
.progress-orange { background: #f59e0b; }
.progress-purple { background: #8b5cf6; }
.progress-lime { background: #10b981; }

/* Scrollbar */
.sidebar-content::-webkit-scrollbar {
	width: 0;
	height: 0;
}

.sidebar-content::-webkit-scrollbar-track {
	background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
	background: var(--border-color);
	border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
	background: var(--text-secondary);
}

/* Vehicle Selection */
.vehicle-selection-container {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding-top: 0.5rem;
}

.vehicles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 1rem;
	margin-top: 0.5rem;
}

.vehicle-card {
	background: var(--panel-bg);
	border: 1px solid var(--border-color);
	border-radius: 1.25rem;
	padding: 1rem;
	cursor: pointer;
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease, color 0.3s ease;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	position: relative;
	overflow: hidden;
	z-index: 1;
}

.vehicle-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: var(--accent-color);
	transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: -1;
}

.vehicle-card:hover,
.vehicle-card.active {
	border-color: var(--accent-color);
	color: var(--accent-text-color);
}

.vehicle-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.vehicle-card.active {
	box-shadow: none;
	border-width: 2px;
	transform: none;
}

.vehicle-card.active:hover {
	transform: translateY(-4px);
}

.vehicle-card:hover::before,
.vehicle-card.active::before {
	left: 0;
}

:root[data-theme="light"] .vehicle-card.active {
	border-color: #000;
}

.vehicle-card-img-wrapper {
	width: 100%;
	aspect-ratio: 16/10;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--hover-bg);
	border-radius: 0.75rem;
	overflow: hidden;
	padding: 0.5rem;
	transition: background 0.3s ease;
}

.vehicle-card:hover .vehicle-card-img-wrapper,
.vehicle-card.active .vehicle-card-img-wrapper {
	background: rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .vehicle-card:hover .vehicle-card-img-wrapper,
:root[data-theme="dark"] .vehicle-card.active .vehicle-card-img-wrapper {
	background: rgba(0, 0, 0, 0.1);
}

.vehicle-card-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
	filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.vehicle-card:hover .vehicle-card-img {
	transform: scale(1.05);
}

.vehicle-card-info {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.vehicle-card-name {
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--text-primary);
	line-height: 1.2;
	transition: color 0.3s ease;
}

.vehicle-card:hover .vehicle-card-name,
.vehicle-card.active .vehicle-card-name {
	color: inherit;
}

.vehicle-card-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	font-size: 0.75rem;
	color: var(--text-secondary);
	transition: color 0.3s ease;
}

.vehicle-card:hover .vehicle-card-specs,
.vehicle-card.active .vehicle-card-specs {
	color: inherit;
	opacity: 0.9;
}

.vehicle-card-spec-item {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.vehicle-card-badge {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: var(--accent-color);
	color: #fff;
	font-size: 0.625rem;
	font-weight: 700;
	padding: 0.25rem 0.5rem;
	border-radius: 2rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

:root[data-theme="dark"] .vehicle-card-badge {
	color: #0b0f19;
}

@media (max-width: 768px) {
	.vehicles-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}
}

.vehicle-selection-container .section-title {
	font-size: 1rem;
	font-weight: 700;
	text-transform: none;
	letter-spacing: -0.01em;
	color: var(--text-primary);
	border-bottom: none;
	margin-bottom: 0.5rem;
	padding-bottom: 0;
}

/* Selected Vehicle Card */
.selected-vehicle-card {
	background: var(--panel-bg);
	border-radius: 2rem;
	padding: 2rem;
	margin: 1rem 0;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
}

.selected-vehicle-card-img-wrapper {
	width: 100%;
	aspect-ratio: 16/10;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--hover-bg);
	border-radius: 1.5rem;
	padding: 1.5rem;
}

.selected-vehicle-card-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 15px 30px rgba(0,0,0,0.15));
}

.selected-vehicle-card-name {
	font-size: 1.75rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--text-primary);
	line-height: 1.1;
}

.selected-vehicle-card-specs {
	font-size: 1rem;
	color: var(--text-secondary);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	font-weight: 500;
}

.selected-vehicle-card-spec-item {
	display: flex;
	align-items: center;
}

.selected-vehicle-card .btn-outline-secondary {
	border-radius: 1rem;
	font-weight: 600;
	border-width: 1.5px;
}

/* Animations */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.timeline-item {
	animation: slideIn 0.3s ease-out;
}

/* Subtle question/step change animations */
@keyframes questionSwap {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes stepInQuick {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.question-animate { animation: questionSwap 0.2s ease-out; }
.step-animate { animation: stepInQuick 0.18s ease-out; }

/* Placeholder Hero Section */
.placeholder-hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.placeholder-hero-range {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--accent-color);
    margin: 0.75rem 0;
    line-height: 0.85;
    text-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.placeholder-hero-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
    opacity: 0.8;
}

@media (max-width: 992px) {
    .placeholder-hero-title { font-size: 1.75rem; }
    .placeholder-hero-range { font-size: 4rem; }
    .placeholder-hero-subtitle { font-size: 1.1rem; }
}

/* Charger address links */
.charger-address-link {
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	text-align: left;
	cursor: pointer;
	text-decoration: none;
	transition: opacity 0.2s ease;
}
.charger-address-link:hover {
	opacity: 0.7;
	text-decoration: underline;
	color: inherit !important;
}
.charger-address-link:focus {
	color: inherit !important;
}

/* Maps Choice Modal - Dark Theme */
[data-theme="dark"] .maps-modal .modal-content {
	background-color: var(--panel-bg);
	color: var(--text-color);
}
[data-theme="dark"] .maps-modal .btn-close {
	filter: invert(1);
}
/* Ensure all modal close icons are visible in dark mode */
[data-theme="dark"] .modal .btn-close {
	filter: invert(1);
}

/* Assistant Pane */
#assistant-pane .planning-section.assistant-pane {
	min-height: calc(var(--viewport-height) - 260px);
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

@media (max-width: 768px) {
	#assistant-pane .planning-section.assistant-pane {
		min-height: calc(var(--viewport-height) - 360px);
	}
}

.assistant-pane .assistant-chat {
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	max-height: none;
	min-height: 0;
	overflow: hidden;
}

.assistant-messages {
	flex: 1;
	max-height: none;
	min-height: 0;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding-right: 0.25rem;
}

.assistant-message {
	font-size: 0.95rem;
	line-height: 1.4;
	padding: 0.75rem 1rem;
	border-radius: 0.9rem;
	background: rgba(255, 255, 255, 0.04);
	color: inherit;
}

.assistant-message-user {
	align-self: flex-end;
	background: #c5ff02;
	color: #000000;
	margin-left: 3rem;
}

.assistant-message-assistant {
	align-self: flex-start;
	margin-right: 3rem;
}

.assistant-message-system {
	border: 1px dashed rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.06);
	color: var(--bs-secondary-color, #adb5bd);
	font-size: 0.9rem;
}

.assistant-howto-link {
	display: inline;
	margin-left: 0.45rem;
	color: var(--accent-color);
	font-size: 0.84rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.16em;
	text-decoration-thickness: 1px;
	cursor: pointer;
}

.assistant-howto-link:hover,
.assistant-howto-link:focus-visible,
.assistant-howto-link:visited {
	color: var(--accent-color);
}

.assistant-howto-link:focus-visible {
	outline: 2px solid var(--accent-color);
	outline-offset: 2px;
	border-radius: 3px;
}

.assistant-message-body i {
	color: var(--bs-warning, #facc15);
}

.assistant-message-body-structured {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.assistant-message-intro {
	margin: 0;
}

.assistant-message-section {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.assistant-message-section-title {
	font-size: 0.86rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin: 0;
	opacity: 0.9;
	text-transform: uppercase;
}

.assistant-message-list {
	margin: 0;
	padding-left: 1.2rem;
}

.assistant-message-list li {
	margin: 0.12rem 0;
}

.assistant-message-actions {
	margin-top: 0.75rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.assistant-message-actions .btn {
	font-size: 0.85rem;
	border-radius: 999px;
	padding: 0.4rem 0.95rem;
}

[data-theme="light"] .assistant-message-actions .btn.btn-outline-light {
	--bs-btn-color: var(--text-primary);
	--bs-btn-border-color: rgba(17, 24, 39, 0.4);
	--bs-btn-hover-color: #ffffff;
	--bs-btn-hover-bg: var(--text-primary);
	--bs-btn-hover-border-color: var(--text-primary);
	--bs-btn-active-color: #ffffff;
	--bs-btn-active-bg: #000000;
	--bs-btn-active-border-color: #000000;
	--bs-btn-disabled-color: rgba(17, 24, 39, 0.45);
	--bs-btn-disabled-border-color: rgba(17, 24, 39, 0.22);
	background: #ffffff;
	opacity: 1;
}

.assistant-input-row {
	position: relative;
	display: flex;
	align-items: center;
	background: rgba(15, 17, 21, 0.65);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	padding: 0.25rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.assistant-input-row:focus-within {
	border-color: var(--accent-color, #c5ff02);
	box-shadow: 0 0 0 3px rgba(197, 255, 2, 0.2);
}

[data-theme="light"] .assistant-input-row {
	background: rgba(17, 17, 17, 0.04);
	border-color: rgba(17, 17, 17, 0.15);
	box-shadow: none;
}

[data-theme="light"] .assistant-input-row:focus-within {
	border-color: rgba(17, 17, 17, 0.5);
	box-shadow: none;
}

.assistant-input-row textarea {
	flex: 1;
	min-height: 48px;
	resize: none;
	background: transparent;
	border: none;
	box-shadow: none;
	color: var(--text-primary);
	padding: 0.85rem 1rem;
	padding-right: 4rem;
	font-size: 1rem;
	line-height: 1.4;
}

.assistant-input-row textarea:focus {
	box-shadow: none;
	background: transparent;
	outline: none;
}

.assistant-input-row textarea:focus-visible {
	outline: none;
}

.assistant-input-row textarea::placeholder {
	color: var(--text-secondary);
}

.assistant-input-row-hidden {
	display: none !important;
}

.assistant-status {
	margin-top: 1rem;
	padding: 1.1rem 1.25rem;
	border-radius: 1.25rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: linear-gradient(185deg, rgba(255, 255, 255, 0.05), rgba(15, 17, 21, 0.65));
	box-shadow: 0 22px 40px rgba(0, 0, 0, 0.35);
	color: var(--text-primary);
	transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}

.assistant-status.d-none {
	display: none !important;
}

/* Full sidebar planning status */
.assistant-status--full {
	margin-top: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 1.5rem !important;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	background: var(--sidebar-bg) !important;
}

[data-theme="light"] .assistant-status--full {
	background: #ffffff !important;
}

.sidebar-footer.flex-grow-1 {
	padding: 0 !important;
}

.border-top-0 {
	border-top: none !important;
}

.assistant-status-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.assistant-status-headings {
	flex: 1;
	min-width: 0;
}

.assistant-status-title {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--text-primary);
}

.assistant-status-subtitle {
	font-size: 0.85rem;
	color: var(--text-secondary);
	min-height: 1.1em;
	margin-top: 0.15rem;
}

.assistant-status-percent {
	font-size: 1rem;
	font-weight: 700;
	color: #c5ff02;
	min-width: 3rem;
	text-align: right;
}

.assistant-status-progress-bar {
	width: 100%;
	height: 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
	margin-top: 0.9rem;
}

.assistant-status-progress-fill {
	height: 100%;
	width: 0%;
	background: #c5ff02;
	border-radius: inherit;
}

/* For assistant which doesn't have its own animation loop, we can keep the transition if we want */
.assistant-status--animated .assistant-status-progress-fill {
	transition: width 0.35s ease;
}

.assistant-status-steps {
	list-style: none;
	margin: 0.9rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.assistant-status:not(.assistant-status--has-steps) .assistant-status-steps {
	display: none;
}

.assistant-status-step {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	border-radius: 0.9rem;
	padding: 0.3rem 0.2rem;
}

.assistant-status-step-body {
	flex: 1;
	min-width: 0;
}

.assistant-status-step-icon {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.35);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.7rem;
	flex-shrink: 0;
	color: rgba(255, 255, 255, 0.75);
	position: relative;
}

.assistant-status-step-label {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text-primary);
}

.assistant-status-step-hint {
	font-size: 0.78rem;
	color: var(--text-secondary);
	margin-top: 0.08rem;
	line-height: 1.35;
}

.assistant-status-step.is-complete .assistant-status-step-icon {
	background: #c5ff02;
	border-color: #c5ff02;
	color: #0d0f12;
}

.assistant-status-step.is-active .assistant-status-step-icon {
	border-color: #c5ff02;
	color: #c5ff02;
	animation: assistant-step-pulse 1.2s ease-in-out infinite;
}

.assistant-status-step.is-error .assistant-status-step-icon {
	border-color: #ff6b6b;
	color: #ff6b6b;
}

.assistant-status-step.is-error .assistant-status-step-label {
	color: #ff6b6b;
}

.assistant-status-step.is-pending .assistant-status-step-icon {
	border-color: rgba(255, 255, 255, 0.25);
	color: rgba(255, 255, 255, 0.45);
}

.assistant-status--processing {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(197, 255, 2, 0.3);
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
	color: var(--text-primary);
}

.assistant-status--danger {
	background: rgba(220, 53, 69, 0.12);
	border-color: rgba(220, 53, 69, 0.45);
	box-shadow: 0 18px 40px rgba(220, 53, 69, 0.25);
}

.assistant-status--info {
	background: rgba(255, 255, 255, 0.045);
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: none;
}

[data-theme="light"] .assistant-status {
	background: #ffffff;
	border-color: #e5e7eb;
	box-shadow: 0 8px 20px rgba(17, 17, 17, 0.08);
	color: #111;
}

[data-theme="light"] .assistant-status-subtitle,
[data-theme="light"] .assistant-status-step-hint {
	color: rgba(17, 17, 17, 0.55);
}

[data-theme="light"] .assistant-status--processing {
	background: #f8fafc;
	border-color: #d1d5db;
	color: #111;
}

[data-theme="light"] .assistant-status--danger {
	background: #fff6f6;
	border-color: #f5c2c7;
	color: #7c1d24;
}

[data-theme="light"] .assistant-status--info {
	background: #f8fafc;
	border-color: #e5e7eb;
	color: rgba(17, 17, 17, 0.7);
}

[data-theme="light"] .assistant-status-progress-bar {
	background: #f1f5f9;
}

[data-theme="light"] .assistant-status-progress-fill {
	background: linear-gradient(90deg, #111, #555);
}

[data-theme="light"] .assistant-status-percent {
	color: #111;
}

[data-theme="light"] .assistant-status-step-icon {
	border-color: #d1d5db;
	color: #94a3b8;
}

[data-theme="light"] .assistant-status-step.is-active .assistant-status-step-icon {
	border-color: #111;
	color: #111;
}

[data-theme="light"] .assistant-status-step.is-complete .assistant-status-step-icon {
	background: #111;
	border-color: #111;
	color: #ffffff;
}

[data-theme="light"] .assistant-status-step.is-pending .assistant-status-step-icon {
	border-color: #e5e7eb;
	color: #cbd5f5;
}

[data-theme="light"] .assistant-status-step.is-error .assistant-status-step-icon {
	border-color: #7c1d24;
	color: #7c1d24;
}

.assistant-send-btn {
	position: absolute;
	right: 0.35rem;
	width: 46px;
	height: 46px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: #c5ff02;
	color: #ffffff;
	cursor: pointer;
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
	overflow: hidden;
}

[data-theme="light"] .assistant-send-btn {
	background: #111111;
	color: #ffffff;
	box-shadow: none;
}

[data-theme="dark"] .assistant-send-btn {
	color: #111;
}

.assistant-send-btn:hover,
.assistant-send-btn:focus-visible {
	transform: translateY(-1px);
	background: #c5ff02;
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
	color: #111;
}

[data-theme="light"] .assistant-send-btn:hover,
[data-theme="light"] .assistant-send-btn:focus-visible {
	background: #111111;
	color: #ffffff;
}

.assistant-send-btn:active {
	transform: translateY(0);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.assistant-send-btn .assistant-send-icon,
.assistant-send-btn .assistant-send-spinner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.assistant-send-icon {
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.assistant-send-spinner {
	position: absolute;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid rgba(17, 17, 17, 0.25);
	border-top-color: #111;
	animation: assistant-send-spin 0.9s linear infinite;
	opacity: 0;
	transform: scale(0.85);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

[data-theme="dark"] .assistant-send-spinner {
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
}

.assistant-send-btn.is-loading .assistant-send-icon {
	opacity: 0;
	transform: scale(0.6);
}

.assistant-send-btn.is-loading .assistant-send-spinner {
	opacity: 1;
	transform: scale(1);
}

@keyframes assistant-send-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@keyframes assistant-step-pulse {
	0%, 100% {
		transform: scale(0.9);
		opacity: 0.6;
	}
	50% {
		transform: scale(1.1);
		opacity: 1;
	}
}

.assistant-status.d-none {
	display: none !important;
}
[data-theme="dark"] .maps-modal .btn-outline-dark {
	border-color: rgba(255, 255, 255, 0.2);
	color: var(--text-color);
}
[data-theme="dark"] .maps-modal .btn-outline-dark:hover {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.3);
	color: var(--text-color);
}

/* Tooltips - Dark Theme */
[data-theme="dark"] .tooltip {
	--bs-tooltip-bg: var(--panel-bg);
	--bs-tooltip-color: var(--text-primary);
	--bs-tooltip-opacity: 0.96;
}
[data-theme="dark"] .tooltip .tooltip-inner {
	border: 1px solid var(--border-color);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Google Maps InfoWindow - Dark Theme */
[data-theme="dark"] .gm-style .gm-style-iw-c {
	background: var(--panel-bg) !important;
	color: var(--text-primary);
	border: 1px solid var(--border-color);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
	border-radius: 1rem;
}
[data-theme="dark"] .gm-style .gm-style-iw-d {
	color: var(--text-primary);
}
[data-theme="dark"] .gm-style .gm-style-iw-tc::after {
	background: var(--panel-bg);
	border: 1px solid var(--border-color);
	box-shadow: 0 0 0 1px var(--border-color);
}
[data-theme="dark"] .gm-style .gm-ui-hover-effect {
	filter: invert(1);
}
[data-theme="dark"] .gm-style .gm-style-iw,
[data-theme="dark"] .gm-style .gm-style-iw a {
	color: var(--text-primary);
}

/* Modern Tooltip Styling */
.evrp-tooltip {
    padding: 0.5rem;
    min-width: 240px;
    font-family: 'Inter', sans-serif;
}

.evrp-tooltip-header {
    margin-bottom: 0.75rem;
}

.evrp-tooltip-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.evrp-tooltip-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.evrp-tooltip-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.evrp-tooltip-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.evrp-tooltip-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: var(--hover-bg);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.evrp-tooltip-chip i {
    margin-right: 0.35rem;
    font-size: 0.875rem;
}

.evrp-tooltip-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--hover-bg);
    border-radius: 0.75rem;
}

.evrp-tooltip-stat-item {
    display: flex;
    flex-direction: column;
}

.evrp-tooltip-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 700;
}

.evrp-tooltip-stat-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.evrp-tooltip-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.evrp-tooltip-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--hover-bg);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.evrp-tooltip-link:hover {
    background: var(--accent-color);
    color: var(--accent-text-color);
    transform: translateY(-2px);
}

:root[data-theme="dark"] .evrp-tooltip-chip,
:root[data-theme="dark"] .evrp-tooltip-stats,
:root[data-theme="dark"] .evrp-tooltip-link {
    background: rgba(255, 255, 255, 0.08);
}

/* Google Maps InfoWindow - hide scrollbars */
.gm-style .gm-style-iw-d {
	scrollbar-width: none;      /* Firefox */
	-ms-overflow-style: none;   /* IE/Edge */
}
.gm-style .gm-style-iw-d::-webkit-scrollbar {
	width: 0;
	height: 0;
	background: transparent;    /* Safari/Chrome */
}

/* Account Pane Styling */
.auth-wrapper {
    display: flex;
    min-height: calc(var(--viewport-height) - 0px);
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    background: var(--sidebar-bg);
}

.auth-image-side {
    flex: 1.2;
    position: relative;
    overflow: hidden;
    display: flex;
}

.auth-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.auth-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.4) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 4rem;
    color: #ffffff;
}

.auth-quote {
    max-width: 500px;
}

.quote-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quote-label::after {
    content: '';
    height: 1px;
    width: 60px;
    background: #ffffff;
    opacity: 0.5;
}

.quote-text {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.quote-subtext {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    font-weight: 500;
}

.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--sidebar-bg);
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 4rem;
    color: var(--text-primary);
}

.auth-logo i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.auth-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.auth-form-container .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-form-container .form-control {
    background: var(--hover-bg);
    border: 1px solid transparent;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 1rem;
}

.auth-form-container .form-control:focus {
    background: var(--sidebar-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-auth-primary {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-auth-primary:hover {
    background: #222222;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #ffffff;
}

:root[data-theme="dark"] .btn-auth-primary {
    background: #c5ff02;
    color: #0b0f19;
}

:root[data-theme="dark"] .btn-auth-primary:hover {
    background: #b2ea00;
    box-shadow: 0 4px 12px rgba(197, 255, 2, 0.3);
    color: #0b0f19;
}

.btn-auth-google {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-auth-google:hover {
    background: var(--hover-bg);
}

:root[data-theme="dark"] .btn-auth-google {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .btn-auth-google:hover {
    background: rgba(255, 255, 255, 0.1);
}

.auth-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.auth-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.auth-footer-text {
    color: var(--text-secondary);
}

/* Logged in state adjustments */
body.logged-in .auth-wrapper {
    display: none !important;
}

body.logged-in #account-profile-container {
    display: flex !important;
}

body.logged-in #account-pane .planning-section {
    min-height: auto;
    padding: 0;
}

@media (max-width: 992px) {
    .auth-image-side {
        display: none;
    }
    .auth-form-side {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .auth-form-side {
        padding: 1.5rem;
    }
    .quote-text {
        font-size: 3rem;
    }
}

#account-pane .planning-section {
    min-height: calc(var(--viewport-height) - 200px); /* Adjust for header/tabs */
    display: flex;
    flex-direction: column;
    /* Remove justify-content: center so profile pane isn't forced to middle */
    padding-bottom: 2rem; 
}

#account-auth-container {
    width: 100%;
}

/* Account Pane Buttons */
/* Custom Address Autocomplete Dropdown */
.address-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-top: 0.25rem;
    max-height: 350px;
    overflow-y: auto;
}

.address-autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--border-color);
}

.address-autocomplete-item:last-child {
    border-bottom: none;
}

.address-autocomplete-item:hover {
    background-color: var(--input-bg);
}

.address-autocomplete-item i {
    color: var(--text-muted);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.address-autocomplete-item .address-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.address-autocomplete-item .address-main {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.address-autocomplete-item .address-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.address-delete-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.15rem 0.35rem;
    border-radius: 0.4rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.address-delete-btn:hover {
    color: var(--text-primary);
    background: var(--input-bg);
}

.address-autocomplete-header {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background-color: var(--input-bg);
    border-bottom: 1px solid var(--border-color);
}

#account-pane .btn-primary {
    font-weight: 600;
    border-radius: 0.75rem;
    margin-top: 0.5rem;
    
    /* Light Mode: Dark bg, White text */
    background-color: #111111;
    color: #ffffff;
    border: 1px solid #111111;
}

#account-pane .btn-primary:hover {
    background-color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Overrides for Account Pane Buttons */
:root[data-theme="dark"] #account-pane .btn-primary {
    /* Dark Mode: White bg, Dark text */
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

:root[data-theme="dark"] #account-pane .btn-primary:hover {
    background-color: #f0f0f0;
    color: #000000;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Profile Container Styling */
#account-profile-container {
    max-width: 100%;
    margin: 0;
    padding-top: 1rem;
}

/* Dark Mode Helper for Input Group Text */
:root[data-theme="dark"] .input-group-text {
    background-color: #1a1d23;
    border-color: #2a2f36;
    color: #e5e7eb;
}

.btn-xs {
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 0.2rem;
}

/* Smartcar Vehicle Connection */
.smartcar-box {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

:root[data-theme="dark"] .smartcar-box {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.smartcar-box p {
    color: var(--text-secondary);
    line-height: 1.4;
}

#connect-vehicle-btn {
    border-radius: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

/* Use the lime accent for the link icon and button in dark mode */
:root[data-theme="dark"] #connect-vehicle-btn {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

:root[data-theme="dark"] #connect-vehicle-btn:hover {
    background: var(--accent-color);
    color: #000;
}

/* Network List Modernization */
.network-mode-toggle {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.25rem;
    border-radius: 0.75rem;
    background: #f1f5f9;
}

:root[data-theme="dark"] .network-mode-toggle {
    background: rgba(255, 255, 255, 0.05);
}

.network-mode-toggle::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: #0b0f19;
    border-radius: 0.55rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

:root[data-theme="dark"] .network-mode-toggle::before {
    background: #c5ff02;
}

.network-mode-toggle:has(#networks-mode-excluded-btn.active)::before {
    transform: translateX(100%);
}

.network-mode-btn {
    position: relative;
    z-index: 2;
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 0.65rem;
    padding: 0.55rem 0.7rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.network-mode-btn:hover {
    color: var(--text-primary);
}

.network-mode-btn.active {
    color: #ffffff;
}

:root[data-theme="dark"] .network-mode-btn.active {
    color: #0b0f19;
}

.network-mode-btn:focus-visible {
    outline: 2px solid rgba(11, 15, 25, 0.25);
    outline-offset: 2px;
}

:root[data-theme="dark"] .network-mode-btn:focus-visible {
    outline-color: rgba(197, 255, 2, 0.45);
}

.network-list-container {
    max-height: 450px;
    overflow-y: auto;
    background: var(--bs-body-bg);
    scrollbar-width: thin;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (max-width: 768px) {
    .network-list-container {
        max-height: 300px;
    }
}

.network-list-container::-webkit-scrollbar {
    width: 6px;
}

.network-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.network-list-container::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.1);
    border-radius: 10px;
}

[data-bs-theme="dark"] .network-list-container::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.1);
}

.network-list-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 12px;
    background: rgba(0,0,0,0.02);
}

[data-bs-theme="dark"] .network-list-item {
    background: rgba(255,255,255,0.03);
}

.network-list-item:hover {
    background: rgba(0,0,0,0.05);
}

[data-bs-theme="dark"] .network-list-item:hover {
    background: rgba(255,255,255,0.08);
}

.network-list-item .network-name {
    flex-grow: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.network-list-item .status-icon {
    opacity: 0.3;
    transition: all 0.2s;
    font-size: 1.2rem;
}

/* Preferred Selection (Green) */
.network-list-item.preferred-selected {
    background: rgba(192, 255, 0, 0.1);
    border: 1px solid rgba(192, 255, 0, 0.3);
}

[data-bs-theme="dark"] .network-list-item.preferred-selected {
    background: rgba(192, 255, 0, 0.15);
}

.network-list-item.preferred-selected .status-icon {
    opacity: 1;
    color: #c0ff00;
}

.network-list-item.preferred-selected .network-name {
    color: #c0ff00;
    font-weight: 600;
}

/* Light theme contrast boost for preferred selection */
:root[data-theme="light"] .network-list-item.preferred-selected,
[data-bs-theme="light"] .network-list-item.preferred-selected {
    background: rgba(192, 255, 0, 0.2);
    border-color: rgba(132, 173, 0, 0.5);
}

:root[data-theme="light"] .network-list-item.preferred-selected .status-icon,
[data-bs-theme="light"] .network-list-item.preferred-selected .status-icon {
    color: #5f7f00;
}

:root[data-theme="light"] .network-list-item.preferred-selected .network-name,
[data-bs-theme="light"] .network-list-item.preferred-selected .network-name {
    color: #4d6900;
}

/* Excluded Selection (Red) */
.network-list-item.excluded-selected {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

[data-bs-theme="dark"] .network-list-item.excluded-selected {
    background: rgba(220, 53, 69, 0.2);
}

.network-list-item.excluded-selected .status-icon {
    opacity: 1;
    color: #dc3545;
}

.network-list-item.excluded-selected .network-name {
    color: #dc3545;
    font-weight: 600;
}

/* Search input styling */
.networks-search-wrapper {
    position: relative;
}

#networks-search-input {
    border-radius: 12px;
    background: rgba(0,0,0,0.04);
    border: 1px solid transparent;
    padding: 12px 16px 12px 40px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

[data-bs-theme="dark"] #networks-search-input {
    background: rgba(255,255,255,0.06);
}

#networks-search-input:focus {
    background: var(--bs-body-bg);
    border-color: transparent;
    box-shadow: none;
    outline: none;
}

.search-icon-overlay {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary);
    pointer-events: none;
    z-index: 5;
}

/* Support Chat Widget */
.support-chat-widget {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 1300;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    isolation: isolate;
}

.support-chat-widget::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    background: rgba(7, 13, 24, 0.2);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    transition: opacity 0.18s ease;
}

.support-chat-widget.is-open::before {
    opacity: 1;
}

.support-chat-launcher {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: #111111;
    color: #ffffff;
    box-shadow: 0 16px 28px rgba(17, 17, 17, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-chat-launcher:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(17, 17, 17, 0.34);
}

.support-chat-widget.support-chat-widget-no-launcher .support-chat-launcher {
    display: none !important;
}

.support-chat-panel {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: min(360px, calc(100vw - 1.5rem));
    max-height: min(560px, calc(100vh - 120px));
    min-height: 420px;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.support-chat-widget.is-open .support-chat-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.support-chat-widget.support-chat-widget-no-launcher .support-chat-panel {
    bottom: 0;
}

.support-chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.support-chat-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.support-chat-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.support-chat-close {
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.support-chat-close:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.support-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.9rem 0.9rem 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.support-chat-message {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 86%;
}

.support-chat-message-agent {
    align-self: flex-start;
}

.support-chat-message-user {
    align-self: flex-end;
}

.support-chat-bubble {
    padding: 0.55rem 0.7rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.35;
}

.support-chat-message-agent .support-chat-bubble {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.support-chat-message-user .support-chat-bubble {
    background: #111111;
    color: #ffffff;
}

.support-chat-meta {
    font-size: 0.67rem;
    color: var(--text-secondary);
    padding: 0 0.2rem;
}

.support-chat-message-user .support-chat-meta {
    text-align: right;
}

.support-chat-form {
    border-top: 1px solid var(--border-color);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.support-chat-category-label {
    margin: 0;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
}

.support-chat-category {
    border: 1px solid var(--border-color);
    border-radius: 0.65rem;
    padding: 0.5rem 0.65rem;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.8rem;
}

.support-chat-category:focus,
.support-chat-category:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--border-color);
}

.support-chat-compose-row {
    display: flex;
    gap: 0.55rem;
}

.support-chat-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 0.65rem;
    padding: 0.55rem 0.65rem;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.84rem;
}

.support-chat-input:focus,
.support-chat-input:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--border-color);
}

.support-chat-send {
    border: 0;
    border-radius: 0.65rem;
    background: #111111;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.55rem 0.95rem;
}

:root[data-theme="dark"] .support-chat-launcher,
:root[data-theme="dark"] .support-chat-send,
:root[data-theme="dark"] .support-chat-message-user .support-chat-bubble {
    background: #c5ff02;
    color: #0b0f19;
}

:root[data-theme="dark"] .support-chat-launcher {
    box-shadow: 0 16px 32px rgba(197, 255, 2, 0.26);
}

@media (max-width: 768px) {
    .support-chat-widget {
        right: max(0.75rem, env(safe-area-inset-right));
        bottom: max(0.75rem, env(safe-area-inset-bottom));
        z-index: 2600;
    }

    .support-chat-launcher {
        display: none !important;
    }

    .support-chat-panel {
        position: fixed;
        inset: 0;
        right: auto;
        bottom: auto;
        width: 100vw;
        height: 100dvh;
        max-height: none;
        min-height: 0;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        transform: none;
    }
}
