/* Modern CSS Reset & Variable Tokens */
:root {
  --bg-app: #080c14;
  --bg-sidebar: rgba(13, 20, 35, 0.88);
  --bg-card: rgba(22, 33, 54, 0.6);
  --bg-card-hover: rgba(30, 45, 75, 0.8);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-focus: rgba(6, 182, 212, 0.5);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-heading: #ffffff;
  --text-inverse: #0b0f19;
  
  --primary: #06b6d4;          /* Electric Cyan */
  --primary-hover: #0891b2;
  --primary-glow: rgba(6, 182, 212, 0.25);
  
  --success: #10b981;          /* Electric Green */
  --success-hover: #059669;
  --success-glow: rgba(16, 185, 129, 0.25);
  
  --accent: #8b5cf6;           /* Electric Violet */
  
  --danger: #ef4444;           /* Coral Red */
  --danger-hover: #dc2626;
  --danger-glow: rgba(239, 68, 68, 0.25);
  
  --warning: #f59e0b;          /* Neon Amber */
  
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 15px rgba(6, 182, 212, 0.15);
  
  --tile-filter: brightness(0.7) invert(1) contrast(1.2) hue-rotate(180deg) saturate(0.3);
  --popup-bg: #0d1425;
}

/* Light Mode Theme Overrides */
body.light-theme {
  --bg-app: #f1f5f9;
  --bg-sidebar: rgba(255, 255, 255, 0.92);
  --bg-card: rgba(241, 245, 249, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 1);
  
  --border-color: rgba(0, 0, 0, 0.1);
  --border-color-focus: rgba(6, 182, 212, 0.6);
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-heading: #0f172a;
  
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 15px rgba(6, 182, 212, 0.2);
  
  --tile-filter: none;
  --popup-bg: #ffffff;
}

body.light-theme .leaflet-popup-content-wrapper {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
}

body.light-theme .leaflet-popup-tip {
  background: #ffffff !important;
}

body.light-theme .leaflet-popup-content h4 {
  color: #0f172a !important;
}

body.light-theme .autocomplete-dropdown {
  background: #ffffff;
  border-color: rgba(6, 182, 212, 0.4);
}

body.light-theme .autocomplete-item {
  color: #1e293b;
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .input-wrapper input {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme input[type="number"] {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .modal-card {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .text-highlight {
  color: #0f172a;
}

body.light-theme h1 {
  background: linear-gradient(135deg, #0f172a 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme h2, body.light-theme h4 {
  color: #0f172a;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 1.4rem;
  background: linear-gradient(135deg, #ffffff 0%, #a5f3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  color: var(--text-heading);
}

h2 i {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* App Layout */
.app-container {
  display: flex;
  position: relative;
  height: 100%;
  width: 100%;
}

/* Sidebar Styling (Floating glassmorphism panel) */
.sidebar-panel {
  width: 420px;
  height: calc(100% - 40px);
  margin: 20px 0 20px 20px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: var(--transition);
}

.sidebar-header {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-logo {
  color: var(--primary);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.5));
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Map Area */
.map-view {
  flex: 1;
  position: relative;
  height: 100%;
  width: 100%;
}

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

.crosshair-cursor, .crosshair-cursor .leaflet-interactive {
  cursor: crosshair !important;
}

/* Leaflet Tile Dynamic Filter */
.leaflet-tile-pane {
  filter: var(--tile-filter);
  transition: filter 0.3s ease;
}

.leaflet-container {
  font-family: var(--font-sans) !important;
  background: var(--bg-app) !important;
}

.leaflet-popup-content-wrapper {
  background: var(--popup-bg) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  padding: 4px !important;
}

.leaflet-popup-tip {
  background: var(--popup-bg) !important;
}

.leaflet-popup-content {
  margin: 12px 14px !important;
  line-height: 1.4 !important;
}

.leaflet-popup-content h4 {
  font-size: 0.95rem;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.leaflet-popup-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Panel Sections and Cards */
.panel-section {
  margin-bottom: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

/* Form & Autocomplete */
.input-group {
  margin-bottom: 16px;
  position: relative;
}

.input-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  background: rgba(10, 15, 26, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 64px 12px 38px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  background: rgba(10, 15, 26, 0.95);
}

.input-action-buttons {
  position: absolute;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.btn-inline-icon {
  position: relative;
  right: auto;
  background: transparent;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
}

.btn-inline-icon:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
}

.btn-inline-icon.active {
  color: var(--primary) !important;
  background: rgba(6, 182, 212, 0.18) !important;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  background: #0d1425;
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
}

.autocomplete-item {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

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

.autocomplete-item:hover, .autocomplete-item.active {
  background: rgba(6, 182, 212, 0.15);
  color: var(--text-heading);
}

.autocomplete-item i {
  color: var(--primary);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.input-row {
  display: flex;
  gap: 12px;
}

.input-group.half {
  flex: 1;
}

.input-group.half input {
  padding-left: 14px;
}

input[type="number"] {
  width: 100%;
  background: rgba(10, 15, 26, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition);
  -moz-appearance: textfield;
}

/* Hide browser default stepper arrows on number inputs */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

/* Switches & Toggles */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  cursor: pointer;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .slider {
  background-color: var(--primary);
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(22px);
}

.toggle-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Connector Tags */
.connector-list-label {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.connector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.checkbox-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  color: var(--text-muted);
}

.checkbox-tag input {
  display: none;
}

.checkbox-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.checkbox-tag:has(input:checked) {
  background: rgba(6, 182, 212, 0.18);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

body.light-theme input[type="checkbox"] {
  accent-color: #0284c7;
}

body.light-theme .slider {
  background-color: #cbd5e1;
  border: 1px solid #94a3b8;
}

body.light-theme .toggle-switch input:checked + .slider {
  background-color: #0284c7;
  border-color: #0369a1;
}

body.light-theme .checkbox-tag {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-weight: 500;
}

body.light-theme .checkbox-tag:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.light-theme .checkbox-tag:has(input:checked) {
  background: #0284c7;
  border-color: #0369a1;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

body.light-theme .checkbox-tag:has(input:checked) span {
  color: #ffffff !important;
}

/* Collapsible Card Header & Body Styles */
.collapsible-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collapse-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}

.collapse-icon-btn:hover {
  color: var(--primary);
  background: rgba(6, 182, 212, 0.12);
}

.card-header.is-collapsed .collapse-icon-btn i {
  transform: rotate(180deg);
}

.card-body {
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin 0.25s ease;
  max-height: 1200px;
  opacity: 1;
  overflow: hidden;
  margin-top: 10px;
}

.card-body.collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Button UI */
button {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-sm {
  padding: 6px 12px !important;
  font-size: 0.78rem !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0891b2 100%);
  color: #0b0f19;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #22d3ee 0%, var(--primary) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.45);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: #0b0f19;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #34d399 0%, var(--success) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--danger);
  color: #fff;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-icon.danger-icon:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
}

.btn-text {
  background: transparent;
  color: var(--primary);
  font-size: 0.82rem;
  padding: 2px 6px;
}

.btn-text:hover {
  color: #22d3ee;
  text-decoration: underline;
}

.btn-text.danger-text {
  color: #fca5a5;
}

.btn-text.danger-text:hover {
  color: var(--danger);
}

.full-width {
  width: 100%;
}

.action-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

/* Route Results & Metrics */
.route-summary-card {
  background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.15) 0%, var(--bg-card) 80%);
  border-color: rgba(6, 182, 212, 0.18);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.summary-actions {
  display: flex;
  gap: 8px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric-box {
  background: rgba(10, 15, 26, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.metric-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
}

.section-title {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* Timeline of Stops */
.stops-timeline {
  position: relative;
  padding-left: 20px;
}

.stops-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-badge {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-sidebar);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

.timeline-badge.origin {
  background: var(--primary);
}

.timeline-badge.charger {
  background: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.timeline-badge.destination {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: var(--transition);
}

.timeline-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-meta .label-type {
  color: var(--success);
  text-transform: uppercase;
}

.timeline-meta .dist-label {
  color: var(--text-muted);
}

.timeline-card h4 {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 2px;
}

.timeline-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-detour {
  font-size: 0.75rem;
  color: var(--warning);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.timeline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
}

.timeline-actions button {
  font-size: 0.72rem;
  padding: 4px 8px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 13, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: var(--transition);
}

.modal-card {
  background: var(--popup-bg);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.15rem;
  margin-bottom: 0;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 70vh;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.1);
}

.info-section h3 {
  font-size: 0.95rem;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.info-section h3 i {
  color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Charger Detail Modal specifics */
.station-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 30px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.detail-section {
  margin-bottom: 16px;
}

.detail-section label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.detail-row {
  display: flex;
  gap: 16px;
}

.detail-section.half {
  flex: 1;
}

.text-highlight {
  color: var(--text-heading);
  font-size: 0.92rem;
}

.plugs-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plug-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 6px;
}

.plug-badge i {
  color: var(--primary);
  width: 14px;
  height: 14px;
}

.plug-power {
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 700;
}

.description-box {
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  max-height: 150px;
  overflow-y: auto;
}

/* Loading & Floating Indicators */
.map-overlay-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 20, 0.75);
  backdrop-filter: blur(5px);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(6, 182, 212, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4));
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.floating-indicator {
  position: absolute;
  top: 20px;
  left: 460px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.8rem;
  color: var(--text-heading);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.floating-indicator i {
  color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Helper Utilities */
.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

/* Custom Marker Pins */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  box-shadow: 0 0 12px rgba(0,0,0,0.5);
  border: 2px solid #ffffff;
}

.pin-origin {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.8);
  font-size: 13px;
}

/* Active Charging Stop Highlight Pin (Bright Amber/Gold Border & Pulsing Halo) */
.pin-active-stop {
  width: 40px !important;
  height: 40px !important;
  border: 3px solid #fbbf24 !important; /* Bright Gold / Amber Border */
  box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.45), 0 0 25px rgba(251, 191, 36, 0.95) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  z-index: 99999 !important;
  animation: pulseActiveGold 1.8s infinite ease-in-out;
}

@keyframes pulseActiveGold {
  0% {
    box-shadow: 0 0 0 3px #fbbf24, 0 0 14px rgba(251, 191, 36, 0.8);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(251, 191, 36, 0.25), 0 0 32px rgba(251, 191, 36, 1);
    transform: scale(1.16);
  }
  100% {
    box-shadow: 0 0 0 3px #fbbf24, 0 0 14px rgba(251, 191, 36, 0.8);
    transform: scale(1);
  }
}

/* Sidebar Timeline Mouseover Map Marker Bounce Highlight */
.pin-hover-highlight {
  width: 48px !important;
  height: 48px !important;
  border: 4px solid #38bdf8 !important; /* Bright Cyan Halo */
  box-shadow: 0 0 0 10px rgba(56, 189, 248, 0.5), 0 0 35px rgba(56, 189, 248, 1) !important;
  z-index: 100000 !important;
  animation: bounceHighlight 0.6s infinite alternate cubic-bezier(0.36, 0, 0.66, -0.56);
}

@keyframes bounceHighlight {
  0% {
    transform: scale(1.2) translateY(0);
  }
  100% {
    transform: scale(1.35) translateY(-10px);
  }
}

.clickable-detour:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* Sidebar Timeline Card Focus Glow Effect */
.timeline-card-highlight {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.4), 0 6px 24px rgba(56, 189, 248, 0.3) !important;
  animation: timelineCardFlash 0.6s ease-in-out 2 alternate;
}

@keyframes timelineCardFlash {
  0% {
    transform: scale(1);
    background-color: var(--card-bg);
  }
  100% {
    transform: scale(1.03);
    background-color: rgba(56, 189, 248, 0.18);
  }
}

.pin-destination {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
  font-size: 13px;
}

.pin-charger {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
}

.pin-candidate {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.pin-cached {
  background: linear-gradient(135deg, #a855f7, #7e22ce);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.8);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-egat {
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.85);
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.pin-backen {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.85);
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.pin-closed {
  background: linear-gradient(135deg, #64748b, #334155);
  border-color: #ef4444 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-nissan {
  background: linear-gradient(135deg, #c026d3, #701a75);
  box-shadow: 0 0 14px rgba(192, 38, 211, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-pea {
  background: linear-gradient(135deg, #8b5cf6, #5b21b6);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-ptt {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-tesla {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-shop {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-mea {
  background: linear-gradient(135deg, #f97316, #c2410c);
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-sharge {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  box-shadow: 0 0 14px rgba(20, 184, 166, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-evolt {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-ea {
  background: linear-gradient(135deg, #84cc16, #4d7c0f);
  box-shadow: 0 0 14px rgba(132, 204, 22, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.brand-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.brand-expand-btn:hover {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
}
