﻿/* Adapted directly from viewcube/panel_lateral.html */

#potree_sidebar_container {
  width: 360px !important;
  background: #353941 !important;
  border-right: 1px solid #555 !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  z-index: 6 !important;
  overflow: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#potree_sidebar_container.is-floating {
  bottom: auto !important;
  z-index: 80 !important;
  border: 1px solid #5a6678 !important;
  border-radius: 2px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

#potree_sidebar_container:not(.is-floating) {
  top: var(--civil-topbar-offset, 38px) !important;
  bottom: auto !important;
  height: calc(100% - var(--civil-topbar-offset, 38px)) !important;
}

#potree_sidebar_container.is-floating #sidebar_root.sidebar-shell {
  height: 100% !important;
  min-height: 100% !important;
}

#potree_sidebar_container::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#potree_sidebar_container,
#sidebar_root.sidebar-shell,
#sidebar_root.sidebar-shell * {
  box-sizing: border-box;
}

#sidebar_root.sidebar-shell {
  height: 100%;
  min-height: 100%;
  display: grid !important;
  grid-template-columns: 0 minmax(0, 1fr) 30px;
  grid-template-rows: 30px minmax(0, 1fr);
  padding: 0 !important;
  margin: 0 !important;
  background: #353941;
  color: #e0e0e0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 12px;
  line-height: 1.25;
  user-select: none;
  position: relative;
  overflow: hidden !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

#sidebar_root.sidebar-shell button,
#sidebar_root.sidebar-shell input,
#sidebar_root.sidebar-shell select,
#sidebar_root.sidebar-shell textarea,
#sidebar_root.sidebar-shell .ui-widget {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
}

#sidebar_root.sidebar-shell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: #2a2e34;
  border-right: 0;
  z-index: 1;
  pointer-events: none;
}

#sidebar_root .sidebar-left-title {
  position: absolute;
  left: 40px;
  right: 34px;
  top: 8px;
  bottom: auto;
  width: auto;
  height: 14px;
  writing-mode: horizontal-tb;
  transform: none;
  white-space: nowrap;
  display: block;
  text-align: center;
  padding: 0;
  color: #9fb0c0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sidebar_root .sidebar-left-dots {
  display: none !important;
}

#sidebar_root .sidebar-left-wrench {
  display: none !important;
}

#sidebar_root .sidebar-left-wrench svg {
  width: 16px;
  height: 16px;
  display: block;
}

#sidebar_drag_handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: auto;
  width: calc(100% - 30px);
  height: 30px;
  z-index: 7;
  cursor: grab;
  touch-action: none;
  background: transparent;
}

#sidebar_drag_handle:active,
body.sidebar-dragging #sidebar_drag_handle {
  cursor: grabbing;
}

body.sidebar-dragging {
  user-select: none;
}

#sidebar_header {
  grid-column: 2;
  grid-row: 1;
  padding: 0 !important;
  margin: 0 !important;
  background: #4a5463 !important;
  border-bottom: 1px solid #26292e !important;
}

#potree_languages {
  display: none !important;
}

.sidebar-brand-block {
  display: block;
}

.pl-topbar {
  height: 30px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #4a5463;
  border-bottom: 1px solid #26292e;
}

.pl-left-icons,
.pl-right-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b0b0b0;
}

.pl-left-icons svg,
.pl-right-icons svg {
  width: 14px;
  height: 14px;
  display: block;
}

.pl-dot-grid {
  width: 12px;
  height: 12px;
  background-image: radial-gradient(circle, #8f99a8 1px, transparent 1px);
  background-size: 4px 4px;
}

#sidebar_global_tabs {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 30px;
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start;
  padding: 0 !important;
  margin: 0 !important;
  background: #353941 !important;
  border-left: 1px solid #555 !important;
  overflow: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 5;
}

#sidebar_global_tabs::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#sidebar_global_tabs .sidebar_global_tab {
  appearance: none;
  flex: 0 0 auto;
  min-height: 0;
  width: 100%;
  padding: 16px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #26292e !important;
  border-radius: 0 !important;
  background: #3b4047 !important;
  color: #aeb4be !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  writing-mode: vertical-rl !important;
  transform: rotate(180deg) !important;
  white-space: nowrap;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#sidebar_global_tabs .sidebar_global_tab:hover {
  background: #434952 !important;
}

#sidebar_global_tabs .sidebar_global_tab.is-active {
  background: #4a5463 !important;
  color: #ffffff !important;
  border-bottom-color: #26292e !important;
  border-left: 0 !important;
  border-top: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#sidebar_global_tabs .sidebar_global_tab:last-child {
  border-bottom: 0 !important;
}

#sidebar_global_tabs .sidebar_global_tab:focus-visible,
#menu_scene + div .scene_toolspace_tab:focus-visible,
#menu_scene + div #scene_workspace_strip:focus-visible,
.sidebar-shell #sidebar_drag_handle:focus-visible,
.accordion > h3:focus-visible {
  outline: 2px solid #9bd9f6 !important;
  outline-offset: -2px;
}

#potree_menu {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #353941 !important;
}

#potree_menu > h3 {
  display: none !important;
}

#potree_menu > h3 + div {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  height: 100%;
}

#menu_scene + div {
  min-height: 0;
  height: 100%;
  background: #353941 !important;
}

#menu_scene.ui-state-active + div {
  display: flex !important;
  flex-direction: column;
}

#menu_scene + div[style*="display: none"] {
  display: none !important;
}

#menu_scene + div #scene_export,
#menu_scene + div #scene_export > a,
#menu_scene + div #scene_search_wrap,
#menu_scene + div #scene_search_input,
#menu_scene + div #scene_search_clear,
#menu_scene + div #scene_tools_row,
#menu_scene + div #scene_tools_row > button,
#menu_scene + div #scene_toolspace_tabs {
  display: none !important;
}

#menu_scene + div #scene_workspace_strip {
  margin: 0 !important;
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 20px 0 8px !important;
  border: 0 !important;
  border-bottom: 1px solid #26292e !important;
  border-radius: 0 !important;
  background: #4a5463 !important;
  color: #e0e0e0 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  position: relative;
  cursor: pointer;
  display: flex !important;
  align-items: center;
}

#menu_scene + div #scene_workspace_strip:hover {
  background: #5a6678 !important;
}

#menu_scene + div #scene_workspace_strip::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #d8e6f2;
}

#menu_scene + div #scene_toolspace_shell {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column;
  overflow: hidden !important;
}

#menu_scene + div #scene_toolspace_views {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  border: 0 !important;
  background: transparent !important;
  overflow: hidden !important;
}

#menu_scene + div .scene-toolspace-view {
  display: none !important;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#menu_scene + div .scene-toolspace-view.is-active {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

#menu_scene + div .scene-toolspace-view > .divider {
  display: none !important;
}

#potree_sidebar_container .divider {
  margin: 0 0 4px !important;
  display: flex !important;
  align-items: center !important;
  color: #dfeaf4 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

#menu_scene + div .scene-toolspace-view > .divider {
  margin: 0 0 4px !important;
  height: 18px;
  padding: 0 6px !important;
  border-top: 1px solid #5f7086 !important;
  border-bottom: 1px solid #2f3947 !important;
  background: #3e4a5f !important;
}

#menu_scene + div .scene-toolspace-view > .divider > span {
  width: auto;
  font-size: 11px !important;
  letter-spacing: 0.02em !important;
}

#menu_scene + div .scene-toolspace-view > .divider > span:before,
#menu_scene + div .scene-toolspace-view > .divider > span:after {
  display: none !important;
}

#potree_sidebar_container .divider > span {
  width: 100%;
  display: flex !important;
  align-items: center !important;
}

#potree_sidebar_container .divider > span:before,
#potree_sidebar_container .divider > span:after {
  content: "" !important;
  flex: 1 1 auto;
  height: 1px;
  background: rgba(187, 206, 222, 0.35) !important;
}

#potree_sidebar_container .divider > span:before {
  margin-right: 6px;
}

#potree_sidebar_container .divider > span:after {
  margin-left: 6px;
}

#menu_scene + div #scene_objects {
  flex: 1 1 auto;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  margin: 0 !important;
  border: 0 !important;
  background: linear-gradient(180deg, #f5f7fa 0%, #edf2f7 100%) !important;
  color: #1d2732 !important;
  padding: 6px 7px !important;
  overflow: auto !important;
  scrollbar-width: thin;
  scrollbar-color: #8ea5bb #e4ebf2;
  box-shadow: inset 0 0 0 1px #c2ceda;
}

#menu_scene + div #scene_objects::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

#menu_scene + div #scene_objects::-webkit-scrollbar-track {
  background: #e4ebf2;
}

#menu_scene + div #scene_objects::-webkit-scrollbar-thumb {
  background: #8ea5bb;
  border: 1px solid #e4ebf2;
  border-radius: 6px;
}

#menu_scene + div #scene_objects::-webkit-scrollbar-thumb:hover {
  background: #7f98b1;
}

#menu_scene + div #jstree_scene {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 11px;
  color: #18212b !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
}

#menu_scene + div #jstree_scene .jstree-children {
  position: relative;
  padding-left: 11px !important;
}

#menu_scene + div #jstree_scene .jstree-children::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  bottom: 6px;
  border-left: 1px dotted #888;
}

#menu_scene + div #jstree_scene .jstree-node {
  margin: 0 !important;
  min-height: 18px !important;
  position: relative;
}

#menu_scene + div #jstree_scene .jstree-anchor {
  color: #1b2530 !important;
  min-height: 18px !important;
  height: 18px !important;
  line-height: 18px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  border: 1px solid transparent !important;
  border-radius: 3px !important;
  padding: 0 3px !important;
  background: transparent !important;
  letter-spacing: 0 !important;
  display: inline-flex !important;
  align-items: center;
  max-width: calc(100% - 2px);
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 100ms ease, border-color 100ms ease, color 100ms ease;
}

#menu_scene + div #jstree_scene .jstree-anchor > b {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

#menu_scene + div #jstree_scene > .jstree-container-ul > .jstree-node > .jstree-anchor {
  font-weight: 650 !important;
  letter-spacing: 0.01em !important;
  color: #0f1822 !important;
}

#menu_scene + div #jstree_scene li.jstree-leaf > .jstree-anchor {
  font-weight: 500 !important;
}

#menu_scene + div #jstree_scene li.c3d-node-profile > .jstree-anchor,
#menu_scene + div #jstree_scene li.c3d-node-measure > .jstree-anchor,
#menu_scene + div #jstree_scene li.c3d-node-volume > .jstree-anchor,
#menu_scene + div #jstree_scene li.c3d-node-pointcloud > .jstree-anchor {
  color: #000 !important;
  text-shadow: none !important;
  font-weight: 560 !important;
}

#menu_scene + div #jstree_scene .jstree-anchor::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 7px;
  width: 7px;
  border-top: 1px dotted #888;
}

#menu_scene + div #jstree_scene .jstree-last > .jstree-anchor::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: -3px;
  width: 2px;
  background: #fff;
}

#menu_scene + div #jstree_scene .jstree-hovered,
#menu_scene + div #jstree_scene .jstree-default .jstree-hovered {
  background: #d7e4ef !important;
  border-color: #c2d2e1 !important;
}

#menu_scene + div #jstree_scene .jstree-clicked,
#menu_scene + div #jstree_scene .jstree-default .jstree-clicked,
#menu_scene + div #jstree_scene li.c3d-active-item > .jstree-anchor {
  background: linear-gradient(180deg, #b5cae2 0%, #a8bed8 100%) !important;
  outline: 1px solid #607f9f !important;
  outline-offset: -1px;
  border-color: transparent !important;
  box-shadow: inset 0 1px 0 #7795b3, inset 0 -1px 0 #5f7c9b;
}

#menu_scene + div #jstree_scene .jstree-icon,
#menu_scene + div #jstree_scene .jstree-themeicon,
#menu_scene + div #jstree_scene .jstree-themeicon-custom {
  margin-right: 1px !important;
  vertical-align: middle !important;
}

#menu_scene + div #jstree_scene .jstree-checkbox,
#menu_scene + div #jstree_scene .jstree-ocl {
  background-image: none !important;
}

/* Clear visibility state in scene tree:
   checked = visible, unchecked = hidden */
#menu_scene + div #jstree_scene .jstree-anchor > .jstree-checkbox {
  position: relative;
  width: 13px !important;
  height: 13px !important;
  margin-top: 1px !important;
  margin-right: 4px !important;
  border: 1px solid #728293;
  border-radius: 2px;
  background: linear-gradient(180deg, #fcfdff 0%, #e8eef4 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

#menu_scene + div #jstree_scene .jstree-anchor.jstree-checked > .jstree-checkbox {
  border-color: #2f6f92;
  background: linear-gradient(180deg, #5fc0ea 0%, #44abd8 100%) !important;
}

#menu_scene + div #jstree_scene .jstree-anchor.jstree-checked > .jstree-checkbox::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 3px;
  height: 7px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg);
}

#menu_scene + div #jstree_scene li.jstree-node.c3d-node-hidden:not(.c3d-active-item) > .jstree-anchor {
  color: #5d6874 !important;
  opacity: 0.72;
}

#menu_scene + div #jstree_scene li.jstree-node.c3d-node-hidden > .jstree-anchor::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 5px;
  flex: 0 0 auto;
  align-self: center;
  border: 1px solid #a86767;
  border-radius: 999px;
  background:
    linear-gradient(
      135deg,
      transparent 42%,
      #a86767 45%,
      #a86767 55%,
      transparent 58%
    );
  opacity: 0.85;
}

#menu_scene + div #jstree_scene .jstree-ocl {
  width: 9px !important;
  height: 9px !important;
  margin-top: 4px !important;
  margin-right: 3px !important;
  border: 1px solid #7f8b98;
  background: #f8fbff !important;
  border-radius: 1px;
  position: relative;
}

#menu_scene + div #jstree_scene .jstree-ocl::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 3px;
  border-top: 1px solid #2a3a4a;
}

#menu_scene + div #jstree_scene .jstree-closed > .jstree-ocl::after {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 3px;
  border-left: 1px solid #2a3a4a;
}

#menu_scene + div #jstree_scene .jstree-open > .jstree-ocl::after {
  content: none;
}

#menu_scene + div #scene_preview_shell {
  flex: 0 0 120px;
  min-height: 120px;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #3a3f47 !important;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
}

#menu_scene + div #scene_preview_resizer {
  height: 4px;
  margin: 0 !important;
  border-top: 1px solid #1a1c1e;
  border-bottom: 1px solid #4a5463;
  background: #2a2e34;
  cursor: ns-resize;
  flex: 0 0 4px;
}

#menu_scene + div #scene_preview_resizer:hover {
  background: #3b82f6;
}

#menu_scene + div .scene-preview-title {
  height: 20px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  border-bottom: 1px solid #222;
  background: #2a2e34;
  color: #aebfcd;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#menu_scene + div #scene_object_properties {
  margin: 0 !important;
  padding: 10px 8px !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 1 1 auto !important;
  border: none !important;
  display: block !important;
  overflow-x: hidden;
  overflow-y: scroll !important;
  scrollbar-gutter: stable;
  background: transparent !important;
  color: #d7e4f0 !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  text-align: left;
}

#menu_scene + div #scene_object_properties.civil-empty {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#menu_scene + div #scene_object_properties.civil-has-data .scene-preview-default {
  display: none !important;
}

#menu_scene + div #scene_object_properties .scene-preview-default {
  display: block;
  margin-top: 0;
  color: #cbd8e4;
  font-style: italic;
  text-align: center;
  opacity: 0.7;
}

#menu_scene + div #scene_object_properties .scene-preview-default strong {
  color: #ffffff;
  font-style: normal;
}

#menu_scene + div #scene_object_properties .civil-props-block {
  margin: 0;
  color: #dbe7f4;
  text-align: left;
}

#menu_scene + div #scene_object_properties .civil-props-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 4px 0;
}

#menu_scene + div #scene_object_properties .civil-props-line span {
  color: #a6bbcd;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#menu_scene + div #scene_object_properties .civil-props-line strong {
  color: #f2f7ff;
  font-weight: 700;
  text-align: right;
}

#menu_scene + div #scene_object_properties .civil-props-coords {
  margin-top: 6px;
  padding: 5px 6px;
  border: 1px solid #5a6c84;
  background: #2f3a49;
  color: #e6eef8;
  border-radius: 2px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  line-height: 1.3;
}

#menu_scene + div #scene_object_properties .civil-props-coords > div {
  white-space: nowrap;
}

#civil-workspace-dropdown {
  position: fixed;
  display: none;
  min-width: 180px;
  border: 1px solid #888;
  background: #fff;
  color: #000;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 12px;
  z-index: 200000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

#civil-workspace-dropdown .civil-combo-item {
  padding: 4px 8px;
  cursor: default;
}

#civil-workspace-dropdown .civil-combo-item:hover {
  background: #cce8ff;
}

#civil-context-menu {
  position: fixed;
  display: none;
  min-width: 180px;
  border: 1px solid #ccc;
  background: #f2f2f2;
  color: #000;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 12px;
  z-index: 200001;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  padding: 2px 0;
}

#civil-context-menu .civil-context-item {
  padding: 4px 16px 4px 28px;
  cursor: default;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

#civil-context-menu .civil-context-item:hover {
  background: #91c9f7;
}

#civil-context-menu .civil-context-item.civil-disabled {
  color: #8f8f8f;
  pointer-events: none;
}

#civil-context-menu .civil-context-item.civil-disabled:hover {
  background: transparent;
}

#civil-context-menu .civil-context-separator {
  height: 1px;
  background: #e0e0e0;
  margin: 3px 2px;
}

#civil-context-menu .civil-has-submenu .civil-submenu {
  position: absolute;
  top: -3px;
  left: 100%;
  min-width: 150px;
  display: none;
  border: 1px solid #ccc;
  background: #f2f2f2;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

#civil-context-menu .civil-has-submenu:hover .civil-submenu {
  display: block;
}

#civil-context-menu .civil-submenu-arrow {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 4px solid #000;
}

#menu_appearance + div,
#menu_tools + div,
#menu_filters + div,
#menu_about + div {
  padding: 8px !important;
  border: 1px solid #596a7e !important;
  background: linear-gradient(180deg, #46556a 0%, #3d4a5f 100%) !important;
  border-radius: 3px !important;
  margin: 8px !important;
  height: calc(100% - 16px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #cdcdcd #f0f0f0;
  --civil-tab-scroll-size: 10px;
}

/* Match toolspace scrollbar style across all sidebar tabs */
#menu_appearance + div::-webkit-scrollbar,
#menu_tools + div::-webkit-scrollbar,
#menu_filters + div::-webkit-scrollbar,
#menu_about + div::-webkit-scrollbar {
  width: var(--civil-tab-scroll-size, 16px) !important;
  height: var(--civil-tab-scroll-size, 16px) !important;
}

#menu_appearance + div::-webkit-scrollbar-track,
#menu_tools + div::-webkit-scrollbar-track,
#menu_filters + div::-webkit-scrollbar-track,
#menu_about + div::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-left: 1px solid #dfdfdf;
}

#menu_appearance + div::-webkit-scrollbar-thumb,
#menu_tools + div::-webkit-scrollbar-thumb,
#menu_filters + div::-webkit-scrollbar-thumb,
#menu_about + div::-webkit-scrollbar-thumb {
  background: #cdcdcd;
  border: 1px solid #f0f0f0;
  border-radius: 0;
}

#menu_appearance + div::-webkit-scrollbar-thumb:hover,
#menu_tools + div::-webkit-scrollbar-thumb:hover,
#menu_filters + div::-webkit-scrollbar-thumb:hover,
#menu_about + div::-webkit-scrollbar-thumb:hover {
  background: #a6a6a6;
}

/* Filters tab aligned with Appearance tab visual language */
#menu_filters + div #return_filter_panel,
#menu_filters + div #pointsourceid_filter_panel,
#menu_filters + div #gpstime_filter_panel {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#menu_filters + div #classificationList {
  margin: 8px 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#menu_filters + div #gpstime_multilevel_range_container > li > span {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

/* Scene tree visual copied/adapted from viewcube/panel_lateral.html */
#menu_scene + div #scene_objects {
  background: #ffffff !important;
  color: #000000 !important;
  padding: 8px !important;
  box-shadow: none !important;
}

#menu_scene + div #scene_objects::-webkit-scrollbar {
  width: var(--civil-tab-scroll-size, 10px);
  height: var(--civil-tab-scroll-size, 10px);
}

#menu_scene + div #scene_objects::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-left: 1px solid #dfdfdf;
}

#menu_scene + div #scene_objects::-webkit-scrollbar-thumb {
  background: #cdcdcd;
  border: 1px solid #f0f0f0;
  border-radius: 0;
}

#menu_scene + div #scene_objects::-webkit-scrollbar-thumb:hover {
  background: #a6a6a6;
}

#menu_scene + div #jstree_scene {
  background: transparent !important;
  color: #000 !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  text-rendering: geometricPrecision;
}

#menu_scene + div #jstree_scene .jstree-children {
  position: relative;
  padding-left: 16px !important;
}

#menu_scene + div #jstree_scene .jstree-children::before {
  content: "";
  position: absolute;
  top: -6px;
  bottom: 10px;
  left: 5px;
  border-left: 1px dotted #888888;
}

#menu_scene + div #jstree_scene .jstree-node {
  margin: 0 !important;
  min-height: 20px !important;
  position: relative;
}

#menu_scene + div #jstree_scene .jstree-anchor {
  color: #000 !important;
  min-height: 20px !important;
  height: 20px !important;
  line-height: 20px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  padding: 1px 4px 1px 1px !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

#menu_scene + div #jstree_scene .jstree-anchor::before {
  left: -11px;
  top: 11px;
  width: 28px;
  border-top: 1px dotted #888888;
}

#menu_scene + div #jstree_scene .jstree-last > .jstree-anchor::after {
  left: -11px;
  top: 11px;
  bottom: 0;
  width: 2px;
  background: #ffffff;
}

#menu_scene + div #jstree_scene .jstree-hovered,
#menu_scene + div #jstree_scene .jstree-default .jstree-hovered {
  background: #e5f3fb !important;
  border: 1px solid #d9ebf9 !important;
}

#menu_scene + div #jstree_scene .jstree-clicked,
#menu_scene + div #jstree_scene .jstree-default .jstree-clicked,
#menu_scene + div #jstree_scene li.c3d-active-item > .jstree-anchor {
  background: #cce8ff !important;
  outline: 1px dotted #99ccff !important;
  outline-offset: -1px;
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

#menu_scene + div #jstree_scene > .jstree-container-ul > .jstree-node > .jstree-anchor {
  font-weight: 700 !important;
  color: #000 !important;
}

#menu_scene + div #jstree_scene .jstree-node > .jstree-anchor:not(.jstree-clicked):not(.jstree-hovered) {
  font-weight: 600 !important;
}

#menu_scene + div #jstree_scene .jstree-icon,
#menu_scene + div #jstree_scene .jstree-themeicon,
#menu_scene + div #jstree_scene .jstree-themeicon-custom {
  width: 16px !important;
  height: 16px !important;
  line-height: 16px !important;
  margin-right: 4px !important;
  vertical-align: middle !important;
  flex: 0 0 auto;
}

/* Parents without node icon (keep icons only on leaf nodes) */
#menu_scene + div #jstree_scene .jstree-node:not(.jstree-leaf) > .jstree-anchor > .jstree-themeicon,
#menu_scene + div #jstree_scene .jstree-node:not(.jstree-leaf) > .jstree-anchor > .jstree-themeicon-custom {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  margin-right: 0 !important;
}

#menu_scene + div #jstree_scene .jstree-anchor > .jstree-checkbox {
  width: 12px !important;
  height: 12px !important;
  margin-top: 0 !important;
  margin-right: 5px !important;
  border: 1px solid #888888;
  border-radius: 0;
  background: #ffffff !important;
  box-shadow: none;
}

#menu_scene + div #jstree_scene .jstree-anchor.jstree-checked > .jstree-checkbox {
  border-color: #4c8eb7;
  background: #ffffff !important;
}

#menu_scene + div #jstree_scene .jstree-anchor.jstree-checked > .jstree-checkbox::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0px;
  width: 4px;
  height: 7px;
  border-right: 2px solid #2da4db;
  border-bottom: 2px solid #2da4db;
  transform: rotate(45deg);
}

#menu_scene + div #jstree_scene .jstree-ocl {
  width: 9px !important;
  height: 9px !important;
  margin-top: 6px !important;
  margin-right: 2px !important;
  border: 1px solid #888888;
  border-radius: 0;
  background: #ffffff !important;
}

#menu_scene + div #jstree_scene .jstree-ocl::before {
  left: 1px;
  right: 1px;
  top: 3px;
  border-top: 1px solid #000000;
}

#menu_scene + div #jstree_scene .jstree-closed > .jstree-ocl::after {
  top: 1px;
  bottom: 1px;
  left: 3px;
  border-left: 1px solid #000000;
}

#menu_scene + div #jstree_scene li.jstree-node.c3d-node-hidden:not(.c3d-active-item) > .jstree-anchor {
  color: #5f6b77 !important;
  opacity: 0.68;
}

#menu_scene + div #jstree_scene li.jstree-node.c3d-node-hidden > .jstree-anchor::after {
  content: none;
}

/* Tool icons: neutral default so they do not look pre-selected */
#menu_tools + div #tools .button-icon,
#menu_tools + div #navigation .button-icon,
#menu_tools + div #clipping_tools .button-icon {
  border: 1px solid rgba(126, 138, 150, 0.6) !important;
  border-radius: 4px !important;
  background: linear-gradient(180deg, #434d5b 0%, #36404d 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

#menu_tools + div #tools .button-icon:hover,
#menu_tools + div #navigation .button-icon:hover,
#menu_tools + div #clipping_tools .button-icon:hover {
  border-color: #8fd8ff !important;
  background: linear-gradient(180deg, #4e5c6f 0%, #3d4c5f 100%) !important;
  box-shadow: 0 0 0 1px rgba(139, 220, 255, 0.28) !important;
}

#menu_tools + div #tools .button-icon:active,
#menu_tools + div #navigation .button-icon:active,
#menu_tools + div #clipping_tools .button-icon:active {
  border-color: #aee6ff !important;
  background: linear-gradient(180deg, #2f3946 0%, #29323f 100%) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45) !important;
}

/* Typography tune to match panel_lateral mock */
#potree_sidebar_container,
#potree_sidebar_container .ui-widget,
#potree_sidebar_container input,
#potree_sidebar_container select,
#potree_sidebar_container button,
#potree_sidebar_container label,
#potree_sidebar_container li,
#potree_sidebar_container span {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

#menu_appearance + div,
#menu_tools + div,
#menu_filters + div,
#menu_about + div {
  font-size: 12px !important;
}

#menu_appearance + div .pv-menu-list li,
#menu_tools + div .pv-menu-list li,
#menu_filters + div .pv-menu-list li,
#menu_about + div .pv-menu-list li,
#menu_appearance + div .pv-menu-list label,
#menu_tools + div .pv-menu-list label,
#menu_filters + div .pv-menu-list label,
#menu_about + div .pv-menu-list label {
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}

#menu_scene + div #scene_workspace_strip {
  font-size: 12px !important;
  font-weight: 600 !important;
}

#menu_scene + div #jstree_scene .jstree-anchor {
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #101418 !important;
  letter-spacing: 0 !important;
}

#menu_scene + div #jstree_scene .jstree-node:not(.jstree-leaf) > .jstree-anchor {
  font-weight: 600 !important;
  color: #273240 !important;
}

#menu_scene + div #jstree_scene > .jstree-container-ul > .jstree-node > .jstree-anchor {
  font-weight: 600 !important;
}

#menu_scene + div #jstree_scene .jstree-node.jstree-leaf > .jstree-anchor:not(.jstree-clicked):not(.jstree-hovered) {
  font-weight: 400 !important;
}

#menu_filters + div #classificationList .c3d-class-name {
  font-weight: 400 !important;
}

#menu_filters + div #classificationList .c3d-class-row-toggle .c3d-class-name {
  font-weight: 700 !important;
}

/* Unified scrollbar system for all sidebar tabs and inner panels */
#potree_menu {
  --civil-unified-scroll-size: 10px;
  --civil-unified-scroll-track: #f0f0f0;
  --civil-unified-scroll-track-border: #dfdfdf;
  --civil-unified-scroll-thumb: #cdcdcd;
  --civil-unified-scroll-thumb-hover: #a6a6a6;
}

#potree_menu > h3 + div,
#potree_menu > h3 + div * {
  scrollbar-width: thin !important;
  scrollbar-color: var(--civil-unified-scroll-thumb) var(--civil-unified-scroll-track) !important;
}

#potree_menu > h3 + div::-webkit-scrollbar,
#potree_menu > h3 + div *::-webkit-scrollbar {
  width: var(--civil-unified-scroll-size) !important;
  height: var(--civil-unified-scroll-size) !important;
}

#potree_menu > h3 + div::-webkit-scrollbar-track,
#potree_menu > h3 + div *::-webkit-scrollbar-track {
  background: var(--civil-unified-scroll-track) !important;
  border-left: 1px solid var(--civil-unified-scroll-track-border) !important;
}

#potree_menu > h3 + div::-webkit-scrollbar-thumb,
#potree_menu > h3 + div *::-webkit-scrollbar-thumb {
  background: var(--civil-unified-scroll-thumb) !important;
  border: 1px solid var(--civil-unified-scroll-track) !important;
  border-radius: 0 !important;
}

#potree_menu > h3 + div::-webkit-scrollbar-thumb:hover,
#potree_menu > h3 + div *::-webkit-scrollbar-thumb:hover {
  background: var(--civil-unified-scroll-thumb-hover) !important;
}

/* Hard lock: exactly one scrollbar look/size across all tabs (including Filters) */
#potree_sidebar_container {
  --civil-lock-scroll-size: 10px;
  --civil-lock-scroll-track: #f0f0f0;
  --civil-lock-scroll-track-border: #dfdfdf;
  --civil-lock-scroll-thumb: #cdcdcd;
  --civil-lock-scroll-thumb-hover: #a6a6a6;
}

#menu_appearance + div,
#menu_tools + div,
#menu_scene + div,
#menu_filters + div,
#menu_about + div,
#menu_appearance + div *,
#menu_tools + div *,
#menu_scene + div *,
#menu_filters + div *,
#menu_about + div * {
  scrollbar-width: thin !important;
  scrollbar-color: var(--civil-lock-scroll-thumb) var(--civil-lock-scroll-track) !important;
}

#menu_appearance + div::-webkit-scrollbar,
#menu_tools + div::-webkit-scrollbar,
#menu_scene + div::-webkit-scrollbar,
#menu_filters + div::-webkit-scrollbar,
#menu_about + div::-webkit-scrollbar,
#menu_appearance + div *::-webkit-scrollbar,
#menu_tools + div *::-webkit-scrollbar,
#menu_scene + div *::-webkit-scrollbar,
#menu_filters + div *::-webkit-scrollbar,
#menu_about + div *::-webkit-scrollbar {
  width: var(--civil-lock-scroll-size) !important;
  height: var(--civil-lock-scroll-size) !important;
}

#menu_appearance + div::-webkit-scrollbar-track,
#menu_tools + div::-webkit-scrollbar-track,
#menu_scene + div::-webkit-scrollbar-track,
#menu_filters + div::-webkit-scrollbar-track,
#menu_about + div::-webkit-scrollbar-track,
#menu_appearance + div *::-webkit-scrollbar-track,
#menu_tools + div *::-webkit-scrollbar-track,
#menu_scene + div *::-webkit-scrollbar-track,
#menu_filters + div *::-webkit-scrollbar-track,
#menu_about + div *::-webkit-scrollbar-track {
  background: var(--civil-lock-scroll-track) !important;
  border-left: 1px solid var(--civil-lock-scroll-track-border) !important;
}

#menu_appearance + div::-webkit-scrollbar-thumb,
#menu_tools + div::-webkit-scrollbar-thumb,
#menu_scene + div::-webkit-scrollbar-thumb,
#menu_filters + div::-webkit-scrollbar-thumb,
#menu_about + div::-webkit-scrollbar-thumb,
#menu_appearance + div *::-webkit-scrollbar-thumb,
#menu_tools + div *::-webkit-scrollbar-thumb,
#menu_scene + div *::-webkit-scrollbar-thumb,
#menu_filters + div *::-webkit-scrollbar-thumb,
#menu_about + div *::-webkit-scrollbar-thumb {
  background: var(--civil-lock-scroll-thumb) !important;
  border: 1px solid var(--civil-lock-scroll-track) !important;
  border-radius: 0 !important;
}

#menu_appearance + div::-webkit-scrollbar-thumb:hover,
#menu_tools + div::-webkit-scrollbar-thumb:hover,
#menu_scene + div::-webkit-scrollbar-thumb:hover,
#menu_filters + div::-webkit-scrollbar-thumb:hover,
#menu_about + div::-webkit-scrollbar-thumb:hover,
#menu_appearance + div *::-webkit-scrollbar-thumb:hover,
#menu_tools + div *::-webkit-scrollbar-thumb:hover,
#menu_scene + div *::-webkit-scrollbar-thumb:hover,
#menu_filters + div *::-webkit-scrollbar-thumb:hover,
#menu_about + div *::-webkit-scrollbar-thumb:hover {
  background: var(--civil-lock-scroll-thumb-hover) !important;
}

/* Final global lock: one scrollbar system for every pane in the sidebar */
#potree_sidebar_container,
#potree_sidebar_container * {
  scrollbar-width: thin !important;
  scrollbar-color: #cdcdcd #f0f0f0 !important;
}

#potree_sidebar_container *::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
}

#potree_sidebar_container *::-webkit-scrollbar-track {
  background: #f0f0f0 !important;
  border-left: 1px solid #dfdfdf !important;
}

#potree_sidebar_container *::-webkit-scrollbar-thumb {
  background: #cdcdcd !important;
  border: 1px solid #f0f0f0 !important;
  border-radius: 0 !important;
}

#potree_sidebar_container *::-webkit-scrollbar-thumb:hover {
  background: #a6a6a6 !important;
}

/* Hide top header icons to avoid overlap with the title text */
#sidebar_root .pl-topbar .pl-left-icons,
#sidebar_root .pl-topbar .pl-right-icons {
  display: none !important;
}

/* Inline rename input in tree: match sidebar look, avoid native white box */
#menu_scene + div #jstree_scene input.jstree-rename-input,
#menu_scene + div #jstree_scene .jstree-rename-input {
  margin: 0 0 0 1px !important;
  padding: 0 6px !important;
  height: 18px !important;
  line-height: 18px !important;
  min-width: 140px !important;
  max-width: calc(100% - 52px) !important;
  border: 1px solid #4f789f !important;
  border-radius: 3px !important;
  background: linear-gradient(180deg, #f8fbff 0%, #e7eef7 100%) !important;
  color: #132131 !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(140, 187, 224, 0.25) !important;
  outline: none !important;
}

#menu_scene + div #jstree_scene input.jstree-rename-input:focus,
#menu_scene + div #jstree_scene .jstree-rename-input:focus {
  border-color: #2f6f99 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 0 2px rgba(107, 180, 234, 0.28) !important;
}

#menu_scene + div #jstree_scene input.jstree-rename-input::selection,
#menu_scene + div #jstree_scene .jstree-rename-input::selection {
  background: #2d80be;
  color: #ffffff;
}


