/* Live-Karte der Fahrzeugpositionen (vehicle-map.js) – Lila-Familie, Tokens der kompakten Arbeitsfläche, Dark Mode, 390 px ohne Überlauf. */
.vehicle-live-panel.vm-mounted { min-width: 0; }
.tk-resources .vehicle-live-panel.vm-mounted, .transfer-resources .vehicle-live-panel.vm-mounted { grid-column: 1 / -1; }
.vm-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vm-note { margin: 0; }
.vm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vm-small { padding: 5px 10px; font-size: 12px; min-height: 30px; line-height: 1.2; }
.vm-small.active { background: var(--compact-accent, #643182); color: #fff; border-color: var(--compact-accent, #643182); }
.vm-stream { margin-left: auto; font-size: 12px; color: var(--compact-muted, #657079); display: inline-flex; align-items: center; gap: 6px; }
.vm-stream::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9b9b9b; }
.vm-stream[data-mode="live"]::before { background: #3f7d57; box-shadow: 0 0 0 3px rgba(63,125,87,.2); }
.vm-stream[data-mode="warn"]::before { background: #b8862d; }
.vm-stream[data-mode="error"]::before { background: #9b6560; }
.vm-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 12px; min-width: 0; }
.vm-map { position: relative; min-height: 420px; height: 420px; border-radius: 10px; overflow: hidden; border: 1px solid var(--compact-line, #dce1e4); background: var(--compact-soft, #f4f6f7); z-index: 0; }
.vm-map-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--compact-muted, #657079); font-size: 13px; }
.vm-map.leaflet-container { font-family: inherit; background: var(--compact-soft, #f4f6f7); }
.vm-map .leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.75); }
.vm-map .leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: 0 8px 24px rgba(50,30,60,.18); }
.vm-map .leaflet-popup-content { margin: 12px 14px; font-size: 13px; line-height: 1.35; }
.vm-popup strong { display: block; margin-bottom: 4px; color: var(--compact-accent, #643182); }
.vm-popup small { color: #657079; }
.vm-popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vm-marker-host { background: transparent; border: 0; }
.vm-marker { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 6px; border-radius: 999px; background: #643182; color: #fff; font: 600 11px/1.1 system-ui, "Segoe UI", sans-serif; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.28); white-space: nowrap; }
.vm-marker i { width: 8px; height: 8px; border-radius: 50%; background: #d7f3df; }
.vm-marker.live i { background: #63d08a; box-shadow: 0 0 0 3px rgba(99,208,138,.35); }
.vm-marker.recent { background: #8a6a2a; }
.vm-marker.recent i { background: #f1cc80; }
.vm-marker.stale { background: #6f6f72; }
.vm-marker.stale i { background: #cfcfd1; }
.vm-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-height: 420px; overflow: auto; padding-right: 2px; }
.vm-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 8px 10px; border: 1px solid var(--compact-line, #dce1e4); border-left: 4px solid #9b9b9b; border-radius: 8px; background: var(--compact-surface, #fff); color: var(--compact-text, #292f35); min-width: 0; }
.vm-item.live { border-left-color: #3f7d57; }
.vm-item.recent { border-left-color: #b8862d; }
.vm-item.stale { border-left-color: #9b6560; }
.vm-item.selected { box-shadow: 0 0 0 2px var(--compact-tint, #f2edf6), 0 0 0 3px var(--compact-accent, #643182); }
.vm-item-main { display: flex; gap: 8px; align-items: flex-start; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.vm-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vm-item-text strong { font-size: 13px; overflow-wrap: anywhere; }
.vm-item-text small { font-size: 11.5px; color: var(--compact-muted, #657079); overflow-wrap: anywhere; }
.vm-dot { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: #9b9b9b; }
.vm-item.live .vm-dot { background: #3f7d57; box-shadow: 0 0 0 3px rgba(63,125,87,.18); }
.vm-item.recent .vm-dot { background: #b8862d; }
.vm-item.stale .vm-dot { background: #9b6560; }
.vm-item-actions { display: flex; flex-direction: column; gap: 4px; }
.vm-settings-details { border: 1px dashed var(--compact-line, #dce1e4); border-radius: 8px; padding: 6px 10px; }
.vm-settings-details summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--compact-accent, #643182); }
.vm-settings-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px 0 4px; }
.vm-settings-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--compact-muted, #657079); min-width: 0; }
.vm-settings-form input { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--compact-line, #dce1e4); border-radius: 6px; background: var(--compact-surface, #fff); color: var(--compact-text, #292f35); font: inherit; }
.vm-settings-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.vm-muted { font-size: 12px; color: var(--compact-muted, #657079); }
@media (max-width: 900px) {
  .vm-layout { grid-template-columns: 1fr; }
  .vm-map { height: 300px; min-height: 300px; }
  .vm-list { max-height: none; }
  .vm-settings-form { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .vm-map { height: 240px; min-height: 240px; }
  .vm-stream { margin-left: 0; width: 100%; }
  .vm-item { grid-template-columns: 1fr; }
  .vm-item-actions { flex-direction: row; }
}
html[data-workspace-theme="dark"] .vm-map { border-color: var(--compact-line, #454d50); background: #1c1821; }
html[data-workspace-theme="dark"] .vm-map.leaflet-container { background: #1c1821; }
html[data-workspace-theme="dark"] .vm-map .leaflet-tile-pane { filter: brightness(.78) contrast(1.05) saturate(.8); }
html[data-workspace-theme="dark"] .vm-map .leaflet-control-attribution { background: rgba(28,24,33,.8); color: #bfb1ca; }
html[data-workspace-theme="dark"] .vm-map .leaflet-control-attribution a { color: #d6b1eb; }
html[data-workspace-theme="dark"] .vm-map .leaflet-popup-content-wrapper, html[data-workspace-theme="dark"] .vm-map .leaflet-popup-tip { background: #26212b; color: #eee8f2; }
html[data-workspace-theme="dark"] .vm-popup small { color: #bfb1ca; }
html[data-workspace-theme="dark"] .vm-map .leaflet-bar a { background: #26212b; color: #eee8f2; border-color: #483950; }
html[data-workspace-theme="dark"] .vm-marker { border-color: #26212b; }
html[data-workspace-theme="dark"] .vm-item { background: var(--compact-surface, #26212b); color: var(--compact-text, #eee8f2); border-color: var(--compact-line, #483950); }
/* Leaflet-Ebenen (Spur, Genauigkeitskreis) nicht durch die Symbolgrößen der Arbeitsfläche beschneiden. */
.vm-map .leaflet-pane svg, .vm-map svg.leaflet-zoom-animated { width: auto !important; height: auto !important; max-width: none !important; max-height: none !important; }
.vm-map .leaflet-overlay-pane path { pointer-events: auto; }
.vm-map-form { border-top: 1px dashed var(--compact-line, #dce1e4); margin-top: 6px; padding-top: 10px; }
.vm-map-form select { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--compact-line, #dce1e4); border-radius: 6px; background: var(--compact-surface, #fff); color: var(--compact-text, #292f35); font: inherit; }
.vm-map-form .vm-map-template { grid-column: span 2; }
@media (max-width: 900px) { .vm-map-form .vm-map-template { grid-column: auto; } }

/* ---- Groß, Vollbild, eigenes Fenster (10.10.2026, Paket 1.0.92-A) -------------------------------------------------- */
.vm-toolbar-gap { flex: 1 1 auto; }
.vm-toolbar .vm-stream { margin-left: 0; }
.vm-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(32, 20, 40, .55); display: grid; place-items: center; padding: 2.5vh 2.5vw; }
body.vm-overlay-open { overflow: hidden; }
.vm-overlay-frame { width: 95vw; height: 95vh; max-width: 100%; display: flex; flex-direction: column; min-height: 0; background: var(--compact-surface, #fff); color: var(--compact-text, #292f35); border: 1px solid var(--compact-line, #dce1e4); border-radius: 14px; box-shadow: 0 24px 60px rgba(30, 15, 40, .35); overflow: hidden; }
.vm-overlay-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-bottom: 1px solid var(--compact-line, #dce1e4); background: var(--compact-soft, #f4f6f7); }
.vm-overlay-head h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--compact-accent, #643182); }
.vm-overlay-hint { font-size: 12px; color: var(--compact-muted, #657079); }
.vm-overlay-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.vm-overlay-body { flex: 1 1 auto; min-height: 0; padding: 10px 14px 12px; display: flex; flex-direction: column; }
.vm-overlay-body .vm-body { flex: 1 1 auto; min-height: 0; }
.vm-overlay-body .vm-layout { flex: 1 1 auto; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
.vm-overlay-body .vm-map { height: 100%; min-height: 240px; }
.vm-overlay-body .vm-list { max-height: none; height: 100%; }
.vm-overlay-body .vm-settings { display: none; }
.vm-overlay.vm-list-hidden .vm-layout { grid-template-columns: minmax(0, 1fr); }
.vm-overlay.vm-list-hidden .vm-list { display: none; }
.vm-overlay-frame:fullscreen { width: 100vw; height: 100vh; border-radius: 0; border: 0; }
/* Vollbild direkt auf dem Kartenbereich (ohne Overlay) */
.vm-body:fullscreen, .vm-body.vm-fullscreen { background: var(--compact-surface, #fff); color: var(--compact-text, #292f35); padding: 12px 16px; overflow: auto; display: flex; flex-direction: column; }
.vm-body:fullscreen .vm-layout { flex: 1 1 auto; min-height: 0; }
.vm-body:fullscreen .vm-map { height: 100%; min-height: 300px; }
.vm-body:fullscreen .vm-list { max-height: none; height: 100%; }
.vm-body:fullscreen .vm-settings { display: none; }
@media (max-width: 900px) {
  .vm-overlay { padding: 0; }
  .vm-overlay-frame { width: 100vw; height: 100vh; border-radius: 0; border: 0; }
  .vm-overlay-body { overflow: auto; }
  .vm-overlay-body .vm-layout { grid-template-columns: 1fr; grid-template-rows: minmax(240px, 55vh) auto; }
  .vm-overlay-body .vm-map { height: 100%; }
  .vm-overlay-body .vm-list { height: auto; }
  .vm-body:fullscreen .vm-layout { grid-template-rows: minmax(240px, 55vh) auto; }
}
@media (max-width: 480px) {
  .vm-overlay-head { padding: 8px 10px; }
  .vm-overlay-hint { display: none; }
  .vm-overlay-actions { margin-left: 0; width: 100%; }
}
html[data-workspace-theme="dark"] .vm-overlay { background: rgba(10, 6, 14, .72); }
html[data-workspace-theme="dark"] .vm-overlay-frame, html[data-workspace-theme="dark"] .vm-body:fullscreen { background: var(--compact-surface, #26212b); color: var(--compact-text, #eee8f2); border-color: var(--compact-line, #483950); }
html[data-workspace-theme="dark"] .vm-overlay-head { background: var(--compact-soft, #1c1821); border-color: var(--compact-line, #483950); }
/* Im Overlay und im Vollbild liegen Vergrößern/Vollbild/Neues Fenster in der Kopfzeile – die Knöpfe der inneren Werkzeugleiste entfallen dort. */
.vm-overlay-body [data-vm-enlarge], .vm-overlay-body [data-vm-fullscreen], .vm-overlay-body [data-vm-window] { display: none; }
.vm-body:fullscreen [data-vm-enlarge], .vm-body:fullscreen [data-vm-window] { display: none; }
