html, body {
	margin: 0;
	padding: 0;
	background-color: #0d0f12;
	color: #f8fafc;
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	overflow: hidden;
	overscroll-behavior-x: none;
	-webkit-tap-highlight-color: transparent;
}

/* Genel UI ve haritada iOS çift dokunma / basılı tutma metin seçimini engelle */
html, body, #map, .leaflet-container {
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}

/* Yazı yazılan alanlar, notlar ve gezi özeti seçilebilir kalsın */
input,
textarea,
[contenteditable="true"],
#recap-content,
#qr-lb-raw-msg,
.place-card p,
.leaflet-popup-content p,
.select-text {
	-webkit-user-select: text;
	user-select: text;
	-webkit-touch-callout: default;
}

#auth-screen {
	padding-top: max(1rem, env(safe-area-inset-top));
	padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

#app-shell > header {
	padding-top: max(0.5rem, env(safe-area-inset-top));
}

.safe-modal-footer {
	padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

@media (min-width: 640px) {
	.safe-modal-footer {
		padding-bottom: 0.75rem;
	}
}

.custom-scrollbar::-webkit-scrollbar {
	width: 5px;
	height: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
	background: #0d0f12;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
	background: #282e3d;
	border-radius: 9999px;
}

.no-scrollbar::-webkit-scrollbar {
	display: none;
}

.no-scrollbar {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.cat-badge-readable {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 4px rgba(0, 0, 0, 0.45);
}

.checklist-drag-handle {
	touch-action: none;
	cursor: grab;
}

.checklist-dragging {
	opacity: 0.45;
}

.checklist-drop-before {
	box-shadow: inset 0 3px 0 #2dd4bf;
}

.checklist-drop-after {
	box-shadow: inset 0 -3px 0 #2dd4bf;
}

.route-stop-badge {
	background: #0f766e;
	border: 2px solid white;
	border-radius: 50%;
	color: white;
	font-weight: 800;
	font-size: 11px;
	text-align: center;
	line-height: 20px;
}

.route-stop-badge.route-stop-badge-flight {
	background: #0284c7;
}

.leaflet-tooltip.daily-route-leg {
	background: #15181e;
	border: 1px solid #2dd4bf;
	color: #ccfbf1;
	border-radius: 6px;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 5px;
}

.leaflet-tooltip.daily-route-leg-flight {
	background: #15181e;
	border: 1px solid #38bdf8;
	color: #e0f2fe;
	border-radius: 6px;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 5px;
}

.leaflet-interactive:focus {
	outline: none;
}

@media (max-width: 767px) {
	#sidebar-panel {
		--mobile-filters-h: 180px;
	}

	#sidebar-panel.mobile-filters-collapsed #sidebar-filters-panel {
		display: none !important;
	}

	#sidebar-panel.mobile-filters-collapsed:not(.mobile-list-full):not(.mobile-map-full) {
		height: calc(54dvh - (var(--mobile-filters-h, 180px) / 3)) !important;
	}

	#sidebar-panel.mobile-map-full {
		height: auto !important;
	}

	#sidebar-panel.mobile-map-full > :not(#mobile-view-controls) {
		display: none !important;
	}

	#map-container.mobile-list-full {
		display: none;
	}

	#sidebar-panel.mobile-list-full {
		height: 100% !important;
	}
}

/* Haritadan Seçim Modunda Tam Ekran Harita Davranışı */
#app-shell.map-picking-fullscreen #sidebar-panel {
	display: none !important;
}

#app-shell.map-picking-fullscreen #map-container {
	display: block !important;
	height: 100% !important;
	width: 100% !important;
	flex: 1 1 auto !important;
}

/* Harita ve Karanlık Mod Filtresi */
#map {
	background-color: #0d0f12;
	width: 100%;
	height: 100%;
	z-index: 1;
}

#map.map-dark-mode .leaflet-tile-pane {
	filter: invert(100%) hue-rotate(180deg) brightness(93%) contrast(94%) saturate(85%);
	transition: filter 0.3s ease;
}

#map:not(.map-dark-mode) .leaflet-tile-pane {
	filter: none;
	transition: filter 0.3s ease;
}

#map.picking-mode,
#map.picking-mode .leaflet-container,
#map.picking-mode .leaflet-grab,
#map.picking-mode .leaflet-interactive {
	cursor: crosshair !important;
}

/* Dinamik Kategori Renkli Harita İğneleri */
.custom-pin-wrapper {
	background: transparent !important;
	border: none !important;
}

.pin-marker {
	position: relative;
	width: 38px;
	height: 38px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	display: flex;
	align-items: center;
	align-content: center;
	justify-content: center;
	border: 2.5px solid #0d0f12;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.65);
	transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
	cursor: pointer;
}

.pin-marker.pin-airport {
	background-color: #0ea5e9;
	border: 2.5px solid #e0f2fe;
	box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.3), 0 6px 18px rgba(0, 0, 0, 0.8);
}

.pin-marker.pin-visited {
	opacity: 0.48;
	filter: grayscale(65%);
}

.pin-marker.pin-double-starred {
	border: 2.5px solid #fbbf24;
	box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.35), 0 6px 18px rgba(0, 0, 0, 0.75);
}

.pin-marker.pin-active-base {
	border: 3px solid #2dd4bf;
	box-shadow: 0 0 0 6px rgba(45, 212, 191, 0.35), 0 8px 22px rgba(0, 0, 0, 0.85);
	transform: rotate(-45deg) scale(1.18);
	z-index: 950 !important;
}

.pin-marker:hover,
.pin-marker.pin-active {
	transform: rotate(-45deg) scale(1.22);
	z-index: 1000 !important;
	border-color: #ffffff;
}

.pin-icon-inner {
	transform: rotate(45deg);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	font-size: 14px;
}

.pin-badge-star {
	position: absolute;
	top: -6px;
	right: -6px;
	transform: rotate(45deg);
	background: #fbbf24;
	color: #0d0f12;
	width: 16px;
	height: 16px;
	border-radius: 9999px;
	font-size: 9px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid #0d0f12;
}

.pin-badge-base {
	position: absolute;
	top: -8px;
	left: -8px;
	transform: rotate(45deg);
	background: #0f766e;
	color: #ffffff;
	padding: 1px 5px;
	border-radius: 6px;
	font-size: 9px;
	font-weight: 800;
	border: 1.5px solid #2dd4bf;
	white-space: nowrap;
}

.pin-badge-iata {
	position: absolute;
	top: -8px;
	right: -10px;
	transform: rotate(45deg);
	background: #0c4a6e;
	color: #e0f2fe;
	padding: 1px 4px;
	border-radius: 5px;
	font-size: 8.5px;
	font-weight: 800;
	border: 1.5px solid #38bdf8;
	white-space: nowrap;
	letter-spacing: 0.02em;
}

/* Leaflet Popup Karanlık Tema ve Okunabilir Buton Renkleri */
.leaflet-popup-content-wrapper {
	background-color: #15181e !important;
	color: #f8fafc !important;
	border: 1px solid #2b3140 !important;
	border-radius: 16px !important;
	box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.9) !important;
	padding: 0 !important;
}

.leaflet-popup-content {
	margin: 0 !important;
	width: 305px !important;
	font-family: 'Inter', system-ui, sans-serif !important;
}

.leaflet-container .leaflet-popup-content a.popup-gmaps-btn {
	color: #ffffff !important;
	text-decoration: none !important;
}

.leaflet-container .leaflet-popup-content a.popup-amaps-btn {
	color: #e2e8f0 !important;
	text-decoration: none !important;
}

.leaflet-container .leaflet-popup-content a.popup-ext-link {
	color: #7dd3fc !important;
	text-decoration: none !important;
}

@media (max-width: 400px) {
	.leaflet-popup-content {
		width: 268px !important;
	}
}

.leaflet-popup-tip {
	background-color: #15181e !important;
	border: 1px solid #2b3140 !important;
}

.leaflet-popup-close-button {
	color: #94a3b8 !important;
	font-size: 20px !important;
	top: 10px !important;
	right: 10px !important;
}

.leaflet-control-zoom {
	border: 1px solid #282e3c !important;
	border-radius: 12px !important;
	overflow: hidden;
}

.leaflet-control-zoom a {
	background-color: #15181e !important;
	color: #e2e8f0 !important;
	border-bottom: 1px solid #282e3c !important;
}

.leaflet-control-attribution {
	background: rgba(13, 15, 18, 0.85) !important;
	color: #94a3b8 !important;
	font-size: 10px !important;
}

.leaflet-control-attribution a {
	color: #cbd5e1 !important;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
	filter: invert(1);
	opacity: 0.7;
	cursor: pointer;
}

/* Tarih & Saat Taşma ve Yalnızca iOS Safari Boş Görünüm Düzeltmesi */
.ios-dt-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	min-width: 0;
	width: 100%;
}

.ios-dt-wrapper input[type="date"],
.ios-dt-wrapper input[type="time"] {
	min-width: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	min-height: 36px;
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
}

.ios-dt-placeholder {
	display: none;
	position: absolute;
	left: 11px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 11px;
	color: #64748b;
	pointer-events: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: calc(100% - 30px);
}

html.is-ios-safari .ios-dt-wrapper:not(.has-value) .ios-dt-placeholder {
	display: block;
}

html.is-ios-safari .ios-dt-wrapper:not(.has-value) input[type="date"]::-webkit-datetime-edit,
html.is-ios-safari .ios-dt-wrapper:not(.has-value) input[type="time"]::-webkit-datetime-edit {
	color: transparent;
}

/* Canlı GPS Mavi Konum Noktası & Referans Pin */
.gps-user-wrapper {
	background: transparent !important;
	border: none !important;
}

.gps-user-dot {
	position: relative;
	width: 18px;
	height: 18px;
	border-radius: 9999px;
	background: #0ea5e9;
	border: 3px solid #ffffff;
	box-shadow: 0 0 12px rgba(14, 165, 233, 0.9);
}

.gps-pulse-ring {
	position: absolute;
	inset: -10px;
	border-radius: 9999px;
	border: 2px solid rgba(14, 165, 233, 0.7);
	animation: gpsPulse 2s ease-out infinite;
}

.ref-pin-dot {
	position: relative;
	width: 24px;
	height: 24px;
	border-radius: 9999px;
	background: #a855f7;
	border: 3px solid #ffffff;
	box-shadow: 0 0 14px rgba(168, 85, 247, 0.95);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	font-size: 11px;
}

.ref-pulse-ring {
	position: absolute;
	inset: -9px;
	border-radius: 9999px;
	border: 2px solid rgba(168, 85, 247, 0.75);
	animation: gpsPulse 2.2s ease-out infinite;
}

@keyframes gpsPulse {
	0% {
		transform: scale(0.5);
		opacity: 0.95;
	}
	100% {
		transform: scale(1.8);
		opacity: 0;
	}
}

/* Otomatik Doldurma Vurgu Animasyonu */
@keyframes fieldHighlightFlash {
	0% {
		box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.85);
		border-color: #10b981;
	}
	100% {
		box-shadow: none;
	}
}

.field-flash {
	animation: fieldHighlightFlash 1.6s ease-out;
}

/* ==================== TOM SELECT KOYU TEMA & iOS SAFARI DÜZELTMELERİ ==================== /
/ Tom Select orijinal  sınıflarını .ts-wrapper'a kopyaladığı için çift çerçeve oluşmasını engelle */
.ts-wrapper.single {
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	width: 100% !important;
	min-width: 0 !important;
	display: block !important;
}

.ts-wrapper.single .ts-control {
	position: relative !important;
	width: 100% !important;
	background-color: #15181e !important;
	background-image: none !important;
	border: 1px solid #282e3d !important;
	border-radius: 0.75rem !important; /* rounded-xl */
	color: #f8fafc !important;
	font-family: 'Inter', system-ui, sans-serif !important;
	font-size: 12px !important;
	line-height: 1.25 !important;
	padding: 7px 28px 7px 11px !important;
	min-height: 36px !important;
	box-shadow: none !important;
	display: flex !important;
	align-items: center !important;
	flex-wrap: nowrap !important;
	cursor: pointer !important;
	box-sizing: border-box !important;
}

/* Sol filtre barındaki Saat Dilimi seçicisi (Sıralama kutusuyla birebir 34px yükseklik) */
#display-timezone-select + .ts-wrapper.single {
	height: 34px !important;
	min-height: 34px !important;
	max-height: 34px !important;
}

#display-timezone-select + .ts-wrapper.single .ts-control {
	background-color: #0d0f12 !important;
	border-color: #262b38 !important;
	color: #7dd3fc !important; /* text-sky-300 */
	font-size: 11px !important;
	font-weight: 600 !important;
	height: 34px !important;
	min-height: 34px !important;
	max-height: 34px !important;
	padding: 0 24px 0 10px !important;
}

/* Mevcut özel aşağı ok ikonunun çift görünmesini engelle */
#display-timezone-select.tomselected ~ i.fa-chevron-down {
	display: none !important;
}

.ts-wrapper.single.focus .ts-control {
	border-color: #0ea5e9 !important;
	box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.35) !important;
}

/* Sağdaki açılır ok ikonu */
.ts-wrapper.single .ts-control::after {
	content: "" !important;
	position: absolute !important;
	top: 50% !important;
	right: 10px !important;
	width: 0 !important;
	height: 0 !important;
	margin-top: 0 !important;
	transform: translateY(-50%) !important;
	border-style: solid !important;
	border-width: 4px 4px 0 4px !important;
	border-color: #94a3b8 transparent transparent transparent !important;
}

#display-timezone-select + .ts-wrapper.single .ts-control::after {
	border-color: rgba(56, 189, 248, 0.8) transparent transparent transparent !important;
}

.ts-wrapper.single.dropdown-active .ts-control::after {
	border-width: 0 4px 4px 4px !important;
	border-color: transparent transparent #94a3b8 transparent !important;
}

#display-timezone-select + .ts-wrapper.single.dropdown-active .ts-control::after {
	border-color: transparent transparent rgba(56, 189, 248, 0.8) transparent !important;
}

/* Seçili metin tek satırda taşmadan kısalsın */
.ts-wrapper.single .ts-control .item {
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	max-width: 100% !important;
}

/* iOS Safari'de input'a tıklayınca ekranın otomatik zoom yapmasını engeller (min 16px kuralı) */
.ts-control > input {
	color: #f8fafc !important;
	font-size: 16px !important;
	line-height: 1.2 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Kapalıyken 16px input'un satır yüksekliğini bozmasını engelle */
.ts-wrapper:not(.input-active) .ts-control > input {
	width: 0 !important;
	min-width: 0 !important;
	opacity: 0 !important;
	position: absolute !important;
}

.ts-wrapper.input-active .ts-control > input {
	min-width: 60px !important;
	opacity: 1 !important;
	position: relative !important;
}

.ts-wrapper.input-active.has-items .ts-control .item {
	display: none !important;
}

/* Modalların (z-[1350]) üzerinde açılan açılır liste */
.ts-dropdown {
	z-index: 2600 !important;
	background-color: #161a24 !important;
	border: 1px solid #2e3547 !important;
	border-radius: 0.75rem !important;
	color: #e2e8f0 !important;
	font-family: 'Inter', system-ui, sans-serif !important;
	font-size: 12px !important;
	box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.9) !important;
	margin-top: 4px !important;
	overflow: hidden !important;
}

/* iOS klavye açıkken listenin ekrana sığması ve akıcı kayması */
.ts-dropdown .ts-dropdown-content {
	max-height: 215px !important;
	-webkit-overflow-scrolling: touch !important;
	overscroll-behavior: contain !important;
}

.ts-dropdown .option {
	padding: 9px 12px !important;
	color: #cbd5e1 !important;
	border-bottom: 1px solid rgba(37, 43, 56, 0.5) !important;
}

.ts-dropdown .option:last-child {
	border-bottom: none !important;
}

.ts-dropdown .option.active,
.ts-dropdown .option:hover {
	background-color: #232938 !important;
	color: #ffffff !important;
}

.ts-dropdown .option.selected {
	background-color: rgba(14, 165, 233, 0.18) !important;
	color: #7dd3fc !important;
	font-weight: 700 !important;
}

.ts-dropdown .no-results {
	padding: 10px 12px !important;
	color: #94a3b8 !important;
	font-size: 11px !important;
}