/* GX Tracking Mobile v0.10.64. New mobile presentation, original functional DOM IDs. */
@media (max-width:850px) {
  html body.gx64-mobile { --gx64-top:60px; --gx64-blue:#176fd1; --gx64-navy:#0c1b2c; --gx64-vh:100dvh; }
  html body.gx64-mobile #gxMobileDockV0107, html body.gx64-mobile #gxDesktopDockV0109,
  html body.gx64-mobile #gx63Root, html body.gx64-mobile #gx63Quick,html body.gx64-mobile #gx63DetailQuick,
  html body.gx64-mobile .gx-mobile-dock-v0107 {display:none!important}
  html body.gx64-mobile #appShell {height:100dvh!important;width:100vw!important;display:block!important;overflow:hidden!important}
  html body.gx64-mobile #appShell .main-area {position:fixed!important;inset:var(--gx64-top) 0 0!important;width:100%!important;max-width:none!important;height:calc(100dvh - var(--gx64-top))!important;display:block!important;transform:none!important;padding:0!important;margin:0!important}
  html body.gx64-mobile #appShell .map-topbar {display:none!important}
  html body.gx64-mobile #appShell .map-workspace {position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;overflow:hidden!important}
  html body.gx64-mobile #map {position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;background:#e9ecef!important}
  html body.gx64-mobile #appShell .map-actions {top:14px!important;right:12px!important;left:auto!important;bottom:auto!important;z-index:500!important}
  html body.gx64-mobile .map-geofence-button {display:none!important}
  html body.gx64-mobile #gx64Topbar {position:fixed;top:0;left:0;right:0;z-index:1900;height:var(--gx64-top);padding:env(safe-area-inset-top) 12px 0;box-sizing:border-box;background:var(--gx64-navy);display:flex;align-items:center;justify-content:space-between;color:#fff;box-shadow:0 2px 9px #0002}
  html body.gx64-mobile #gx64Topbar button {height:38px;width:38px;display:grid;place-items:center;border:0;border-radius:11px;background:#1c3046;color:white;box-shadow:none;padding:0}
  html body.gx64-mobile #gx64Topbar svg,html body.gx64-mobile #gx64Drawer svg,html body.gx64-mobile #gx64Actions svg,html body.gx64-mobile #gx64SheetHead svg {height:18px;width:18px;flex:none}
  html body.gx64-mobile .gx64-brand {display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700;letter-spacing:-.2px}
  html body.gx64-mobile .gx64-brand img {height:29px;width:30px;object-fit:contain}
  html body.gx64-mobile #gx64Shade {position:fixed;inset:0;z-index:2199;background:#07131ed0}
  html body.gx64-mobile #gx64Drawer {position:fixed;inset:0 auto 0 0;z-index:2200;width:min(82vw,310px);background:#101f31;color:#f4f8fb;padding:20px 12px;box-sizing:border-box;display:flex;flex-direction:column;gap:5px;overflow-y:auto;box-shadow:4px 0 18px #0004}
  html body.gx64-mobile #gx64Drawer[hidden],html body.gx64-mobile #gx64Shade[hidden] {display:none!important}
  html body.gx64-mobile #gx64Drawer button,html body.gx64-mobile #gx64Drawer a{display:flex;align-items:center;gap:11px;min-height:41px;width:100%;box-sizing:border-box;text-decoration:none;text-align:left;background:transparent;color:inherit;border:0;border-radius:9px;padding:8px 12px;font-size:13px;box-shadow:none}
  html body.gx64-mobile #gx64Drawer button:active,html body.gx64-mobile #gx64Drawer a:active {background:#294563}
  html body.gx64-mobile #gx64Drawer .gx64-drawer-title {display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;padding:0 5px;font-size:16px}
  html body.gx64-mobile #gx64Drawer .gx64-drawer-title button {width:34px}
  html body.gx64-mobile #sidebar.gx64-sheet {--panel:#fff;--panel-soft:#f5f8fb;--text:#152639;--muted:#67778b;--line:#e1e7ed;--accent:#1378df;--bg:#fff;
    display:flex!important;position:fixed!important;top:auto!important;left:0!important;right:0!important;bottom:var(--gx64-keyboard-offset,0px)!important;z-index:1750!important;width:100%!important;max-width:none!important;min-width:0!important;min-height:0!important;height:clamp(210px,28dvh,280px)!important;transform:none!important;margin:0!important;padding:0 0 max(4px,env(safe-area-inset-bottom))!important;
    background:#fff!important;color:#152639!important;border:0!important;border-radius:24px 24px 0 0!important;box-shadow:0 -8px 28px #06162738!important;overflow:hidden!important;transition:height .2s ease!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
  html body.gx64-mobile[data-gx64-size="detail"] #sidebar.gx64-sheet {height:min(44dvh,calc(var(--gx64-vh,100dvh) - 72px),410px)!important}
  html body.gx64-mobile[data-gx64-size="content"] #sidebar.gx64-sheet {height:min(70dvh,calc(var(--gx64-vh,100dvh) - 72px))!important}
  html body.gx64-mobile[data-gx64-size="expanded"] #sidebar.gx64-sheet {height:min(83dvh,calc(var(--gx64-vh,100dvh) - 72px))!important}
  html body.gx64-mobile[data-gx64-size="min"] #sidebar.gx64-sheet {height:55px!important}
  html body.gx64-mobile #sidebar .sidebar-top,html body.gx64-mobile #sidebar .sidebar-footer,
  html body.gx64-mobile #sidebar .sidebar-home-actions,
  html body.gx64-mobile #sidebar .gx-global-sheet-handle-v0107,
  html body.gx64-mobile #sidebar .gx-sheet-handle {display:none!important}
  html body.gx64-mobile #gx64Handle{display:grid;place-items:center;flex:0 0 21px;min-height:21px;height:21px;width:100%;background:#fff;border:0;padding:0;margin:0;cursor:ns-resize;box-shadow:none;touch-action:none}
  html body.gx64-mobile #gx64Handle span {height:4px;width:38px;border-radius:8px;background:#d0d9e3}
  html body.gx64-mobile #gx64SheetHead {display:flex;align-items:center;justify-content:space-between;gap:8px;flex:0 0 29px;padding:0 13px 2px;color:#192c40}
  html body.gx64-mobile #gx64SheetHead strong {font-size:13px;font-weight:700;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;text-align:center}
  html body.gx64-mobile #gx64SheetHead button {width:27px;height:27px;padding:4px;border:0;border-radius:7px;background:transparent;color:#64758a;display:grid;place-items:center;box-shadow:none}
  html body.gx64-mobile[data-gx64-view="fleet"] #gx64Back{visibility:hidden}
  html body.gx64-mobile #gx64Actions {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;flex:0 0 auto;margin:3px 12px 10px;background:transparent}
  html body.gx64-mobile #gx64Actions button {min-width:0;min-height:38px;padding:6px 4px;border:1px solid #e1e8ef;border-radius:10px;background:#f7f9fc;color:#284056;font-size:11px;font-weight:600;box-shadow:none;display:flex;align-items:center;justify-content:center;gap:5px}
  html body.gx64-mobile #gx64Actions button[aria-pressed="true"] {color:#0c68bf;background:#e8f3ff;border-color:#b7d9f8}
  html body.gx64-mobile:not(.gx64-selected) #gx64Actions button[data-gx64-action="detail"] {display:none!important}
  html body.gx64-mobile.gx64-selected #gx64Actions {grid-template-columns:repeat(4,minmax(0,1fr))}
  html body.gx64-mobile.gx64-selected #gx64Actions button{font-size:10px;gap:3px;min-height:39px}
  html body.gx64-mobile.gx64-selected #gx64Actions svg{width:15px;height:15px}
  html body.gx64-mobile[data-gx64-size="min"] #gx64Actions,html body.gx64-mobile[data-gx64-size="min"] #sidebarExpanded {display:none!important}
  html body.gx64-mobile #sidebar .sidebar-expanded {display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;width:100%!important;height:auto!important;margin:0!important;padding:0!important;overflow:hidden!important;background:#fff!important;max-height:none!important;transform:none!important}
  html body.gx64-mobile #sidebar #search {flex:0 0 auto!important;display:block!important;box-sizing:border-box;width:calc(100% - 24px)!important;min-height:39px!important;margin:0 12px 8px!important;padding:9px 12px!important;background:#f0f4f8!important;color:#18314d!important;border:1px solid #e3e9f0!important;border-radius:11px!important;font-size:13px!important;box-shadow:none!important}
  html body.gx64-mobile #sidebar #deviceList {display:block!important;flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain!important;margin:0!important;padding:0 11px max(12px,env(safe-area-inset-bottom))!important}
  html body.gx64-mobile #sidebar #deviceList .device-item {background:#fff!important;color:#152639!important;border:0!important;border-bottom:1px solid #e7ebf0!important;border-radius:0!important;box-shadow:none!important;padding:10px 7px!important;margin:0!important;min-height:57px!important}
  html body.gx64-mobile #sidebar #deviceList .device-item strong {color:#152639!important}
  html body.gx64-mobile:not([data-gx64-view="fleet"]) #sidebar #search,
  html body.gx64-mobile:not([data-gx64-view="fleet"]) #sidebar #deviceList {display:none!important}
  html body.gx64-mobile #sidebar #deviceInspector {position:relative!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;transform:none!important;box-sizing:border-box;display:flex!important;flex-direction:column!important;min-height:0!important;height:auto!important;width:100%!important;max-width:none!important;flex:1 1 auto!important;overflow:hidden!important;border:0!important;border-radius:0!important;background:#fff!important;color:#152639!important;box-shadow:none!important;margin:0!important;padding:0!important}
  html body.gx64-mobile[data-gx64-view="fleet"] #sidebar #deviceInspector,
  html body.gx64-mobile[data-gx64-view="fence"] #sidebar #deviceInspector,
  html body.gx64-mobile[data-gx64-view="map"] #sidebar #deviceInspector {display:none!important}
  html body.gx64-mobile[data-gx64-view="detail"] #deviceInspector.hidden,
  html body.gx64-mobile[data-gx64-view="history"] #deviceInspector.hidden,
  html body.gx64-mobile[data-gx64-view="share"] #deviceInspector.hidden,
  html body.gx64-mobile[data-gx64-view="functions"] #deviceInspector.hidden {display:none!important}
  html body.gx64-mobile #sidebar .device-inspector-head {flex:0 0 auto!important;min-height:36px!important;padding:4px 12px!important;gap:9px!important;background:#fff!important;color:#1a2c40!important}
  html body.gx64-mobile #sidebar .device-inspector-heading strong {font-size:14px!important;color:#152639!important}
  html body.gx64-mobile #sidebar .device-inspector-heading .muted {font-size:11px!important;color:#7d8b99!important}
  html body.gx64-mobile #deviceInspectorBack,html body.gx64-mobile #sidebar .inspector-tabs {display:none!important}
  html body.gx64-mobile #sidebar .device-inspector-content {display:flex!important;min-height:0!important;flex:1 1 auto!important;overflow:hidden!important;background:#fff!important}
  html body.gx64-mobile #sidebar .inspector-panels {display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important;padding:3px 12px max(20px,env(safe-area-inset-bottom))!important;background:#fff!important;color:#152639!important}
  html body.gx64-mobile #sidebar .inspector-panel:not(.hidden) {display:block!important;background:#fff!important;color:#152639!important}
  html body.gx64-mobile #sidebar #deviceInfoPanel .inspector-info-row {border-bottom-color:#e6edf3!important;color:#172839!important}
  html body.gx64-mobile #sidebar #deviceInfoPanel .inspector-info-row span {color:#6a7f92!important}
  html body.gx64-mobile #sidebar #deviceInfoPanel .inspector-info-row strong {color:#20354a!important}
  html body.gx64-mobile #sidebar #geofenceManagerPanel {display:none!important;min-height:0!important;overflow-y:auto!important;flex:1 1 auto!important;color:#172839!important;background:#fff!important;padding:2px 12px 22px!important}
  html body.gx64-mobile[data-gx64-view="fence"] #sidebar #geofenceManagerPanel:not(.hidden){display:block!important}
  html body.gx64-mobile #sidebar #geofenceManagerPanel .geofence-manager-head {background:#fff!important;color:#172839!important}
  html body.gx64-mobile #sidebar #historyPanel,html body.gx64-mobile #sidebar #deviceFunctionsPanel {background:#fff!important;color:#172839!important}
  html body.gx64-mobile #sidebar #historyPanel .history-mobile-controls {background:#fff!important;color:#172839!important}
  html body.gx64-mobile[data-gx64-view="share"] #sidebar #deviceFunctionsPanel > :not(#gx64ShareContent) {display:none!important}
  html body.gx64-mobile[data-gx64-view="share"] #sidebar #gx64ShareContent {display:block!important}
  html body.gx64-mobile #sidebar #gx64ShareContent {padding:8px 0 16px}
  html body.gx64-mobile #sidebar #gx64ShareContent .share-duration-grid {display:grid!important}
  html body.gx64-mobile #sidebar .muted {color:#687c90}
  html body.gx64-mobile #sidebar input,html body.gx64-mobile #sidebar select {color:#1f3042}
  html body.gx64-mobile #sidebar .geofence-list,html body.gx64-mobile #sidebar #activeShareLinks {min-width:0}
  html body.gx64-mobile #sidebar .inspector-section-head strong {color:#172839}
  html body.gx64-mobile #sidebar .history-playback-buttons button {box-shadow:none}
  html body.gx64-mobile #sidebar button:focus-visible,html body.gx64-mobile #gx64Topbar button:focus-visible {outline:2px solid #278dea;outline-offset:2px}
}
@media(min-width:851px) {#gx64Topbar,#gx64Shade,#gx64Drawer,#gx64Handle,#gx64SheetHead,#gx64Actions {display:none!important}}

/* v0.10.65: user-controlled continuous bottom sheet height.
   No snapping at release; changing a functional view returns to 50%. */
@media (max-width:850px) {
  html body.gx64-mobile #sidebar.gx64-sheet,
  html body.gx64-mobile[data-gx64-size] #sidebar.gx64-sheet {
    height:var(--gx65-sheet-height, 25dvh)!important;
    max-height:calc(var(--gx65-available-height, 100dvh) - var(--gx64-top, 60px) - 8px)!important;
    transition:height 160ms ease-out!important;
    will-change:height;
  }
  html body.gx64-mobile.gx65-dragging #sidebar.gx64-sheet,
  html body.gx64-mobile.gx65-dragging[data-gx64-size] #sidebar.gx64-sheet {
    transition:none!important;
  }
  html body.gx64-mobile #gx64Handle {
    touch-action:none!important;
    cursor:ns-resize;
    user-select:none;
    -webkit-user-select:none;
    flex:0 0 30px!important;
    height:30px!important;
    min-height:30px!important;
  }
  html body.gx64-mobile #gx64Handle span {width:44px;height:5px}
  /* Panel content scrolls separately: only drag the visible handle. */
  html body.gx64-mobile #sidebar #deviceList,
  html body.gx64-mobile #sidebar .inspector-panels,
  html body.gx64-mobile #sidebar #geofenceManagerPanel {
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y;
  }
  html body.gx64-mobile #sidebar #historyProgress {touch-action:pan-x}
  html body.gx64-mobile #gx64Actions {margin-bottom:5px!important}
  html body.gx64-mobile #gx64SheetHead{flex-basis:30px!important}
  /* Improve small-screen button layout without affecting desktop */
  html body.gx64-mobile #gx64Actions button {white-space:nowrap;min-height:36px}
  @media(max-width:350px) {
    html body.gx64-mobile #gx64Actions {gap:3px;margin-left:6px;margin-right:6px}
    html body.gx64-mobile #gx64Actions button {font-size:10px;padding-inline:2px}
    html body.gx64-mobile .gx64-brand{font-size:13px}
  }
  /* Theme follows the existing tracking-theme preference; map tiles stay light. */
  html[data-theme="dark"] body.gx64-mobile #sidebar.gx64-sheet {
    --panel:#0f1c2d;--panel-soft:#1b2b3e;--text:#eef5ff;
    --muted:#a8b8c9;--line:#32455c;--bg:#0f1c2d;
    background:#0f1c2d!important;color:#eef5ff!important;
    border-top-color:#35485e!important;
  }
  html[data-theme="dark"] body.gx64-mobile #gx64Handle,
  html[data-theme="dark"] body.gx64-mobile #sidebar .sidebar-expanded,
  html[data-theme="dark"] body.gx64-mobile #sidebar #deviceInspector,
  html[data-theme="dark"] body.gx64-mobile #sidebar .device-inspector-content,
  html[data-theme="dark"] body.gx64-mobile #sidebar .inspector-panels,
  html[data-theme="dark"] body.gx64-mobile #sidebar .inspector-panel:not(.hidden),
  html[data-theme="dark"] body.gx64-mobile #sidebar #historyPanel,
  html[data-theme="dark"] body.gx64-mobile #sidebar #deviceFunctionsPanel,
  html[data-theme="dark"] body.gx64-mobile #sidebar #historyPanel .history-mobile-controls,
  html[data-theme="dark"] body.gx64-mobile #sidebar #geofenceManagerPanel,
  html[data-theme="dark"] body.gx64-mobile #sidebar #geofenceManagerPanel .geofence-manager-head,
  html[data-theme="dark"] body.gx64-mobile #sidebar .device-inspector-head {
    background:#0f1c2d!important;color:#eef5ff!important;
  }
  html[data-theme="dark"] body.gx64-mobile #gx64SheetHead,
  html[data-theme="dark"] body.gx64-mobile #sidebar .device-inspector-heading strong,
  html[data-theme="dark"] body.gx64-mobile #sidebar .inspector-section-head strong,
  html[data-theme="dark"] body.gx64-mobile #sidebar #deviceList .device-item strong,
  html[data-theme="dark"] body.gx64-mobile #sidebar #deviceInfoPanel .inspector-info-row strong {color:#eef5ff!important}
  html[data-theme="dark"] body.gx64-mobile #sidebar .muted,
  html[data-theme="dark"] body.gx64-mobile #sidebar .device-inspector-heading .muted,
  html[data-theme="dark"] body.gx64-mobile #sidebar #deviceInfoPanel .inspector-info-row span {color:#a8b8c9!important}
  html[data-theme="dark"] body.gx64-mobile #sidebar #deviceList .device-item {
    background:#0f1c2d!important;color:#eef5ff!important;border-bottom-color:#30445b!important;
  }
  html[data-theme="dark"] body.gx64-mobile #sidebar #search {
    background:#1b2b3e!important;color:#eef5ff!important;border-color:#35485e!important;
  }
  html[data-theme="dark"] body.gx64-mobile #gx64Actions button,
  html[data-theme="dark"] body.gx64-mobile #gx64SheetHead button {
    color:#dce7f7!important;background:#1b2b3e!important;border-color:#35485e!important;
  }
  html[data-theme="dark"] body.gx64-mobile #gx64Actions button[aria-pressed="true"] {
    background:#16487b!important;color:#ffffff!important;border-color:#367bb9!important;
  }
  html[data-theme="dark"] body.gx64-mobile #sidebar input,
  html[data-theme="dark"] body.gx64-mobile #sidebar select {color:#eef5ff!important}
  html[data-theme="dark"] body.gx64-mobile #sidebar .history-position-list > *,
  html[data-theme="dark"] body.gx64-mobile #sidebar .history-current-info,
  html[data-theme="dark"] body.gx64-mobile #sidebar .history-playback {
    color:#eef5ff;
  }
}
