:root {
  --brand-bar-height: 60px;
  --top-bar-height: 0px;
  --top-offset: calc(var(--brand-bar-height) + var(--top-bar-height));
  --tool-panel-width: clamp(300px, 24vw, 340px);
  --app-font: Arial, Helvetica, sans-serif;
  --ink: rgb(7, 0, 80);
  --muted: rgb(7, 0, 80);
  --widget-bg: #ffffff;
  --widget-bg-hover: #f4f6fb;
  --widget-bg-press: #e8edf7;
  --active-button-bg: #e9fffc;
  --panel: rgba(247, 248, 252, 0.96);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --control: #fde3c7;
  --control-strong: #fbd8b6;
  --line: rgba(7, 0, 80, 0.16);
  --brand: rgb(7, 0, 80);
  --accent: rgb(7, 0, 80);
  --accent-strong: rgb(7, 0, 80);
  --warning: #fde3c7;
  --shadow: 0 18px 44px rgba(7, 0, 80, 0.16);
  --calcite-color-brand: var(--accent);
  --calcite-color-brand-hover: rgb(7, 0, 80);
  --calcite-color-brand-press: rgb(7, 0, 80);
  --calcite-color-background: rgba(255, 255, 255, 0.96);
  --calcite-color-foreground-1: var(--widget-bg);
  --calcite-color-foreground-2: #f4f6fb;
  --calcite-color-foreground-3: #e8edf7;
  --calcite-color-border-1: rgba(7, 0, 80, 0.18);
  --calcite-color-border-2: rgba(7, 0, 80, 0.14);
  --calcite-color-border-3: rgba(7, 0, 80, 0.1);
  --calcite-font-family: var(--app-font);
  --calcite-font-family-base: var(--app-font);
  --calcite-font-family-heading: var(--app-font);
  --calcite-sans-family: var(--app-font);
  --calcite-color-text-1: var(--ink);
  --calcite-color-text-2: var(--ink);
  --calcite-color-text-3: var(--muted);
  --calcite-color-focus: var(--accent-strong);
  --calcite-ui-brand: var(--accent);
  --calcite-ui-brand-hover: rgb(7, 0, 80);
  --calcite-ui-foreground-1: var(--widget-bg);
  --calcite-ui-foreground-2: #f4f6fb;
  --calcite-ui-foreground-3: #e8edf7;
  --calcite-ui-border-1: rgba(7, 0, 80, 0.18);
  --calcite-ui-text-1: var(--ink);
  --calcite-ui-text-2: var(--ink);
  --calcite-action-background-color: var(--widget-bg);
  --calcite-action-background-color-hover: var(--widget-bg-hover);
  --calcite-action-background-color-press: var(--widget-bg-press);
  --calcite-action-text-color: var(--ink);
  --calcite-action-text-color-hover: var(--ink);
  --calcite-action-group-gap: 1px;
  font-family: var(--app-font);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  scrollbar-color: rgba(7, 0, 80, 0.36) rgba(7, 0, 80, 0.08);
  scrollbar-width: thin;
}

html,
body,
#appShell,
#viewDiv {
  width: 100%;
  height: 100%;
  margin: 0;
}

#appShell {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

body {
  overflow: hidden;
  color: var(--ink);
  background: #f4f6fb;
  font-size: 70%;
}

body.isViewTransitioning {
  cursor: progress;
}

[hidden] {
  display: none !important;
}

html,
body,
#appShell,
.toolPanel,
.statusPanel,
.esri-ui,
.esri-widget,
.esri-popup {
  font-family: var(--app-font);
}

#appShell :where(button, input, select, option, textarea, label, span, p, h1, h2, h3, h4, h5, h6, a),
.esri-popup :where(:not(.esri-icon):not([class*="esri-icon"])),
.esri-widget :where(:not(.esri-icon):not([class*="esri-icon"])) {
  font-family: var(--app-font);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--widget-bg);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  padding: 0 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button:hover {
  border-color: rgba(7, 0, 80, 0.32);
  background: var(--widget-bg-hover);
  box-shadow: 0 8px 22px rgba(7, 0, 80, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
select {
  width: 100%;
  min-height: 27px;
  border: 1px solid rgba(7, 0, 80, 0.08);
  border-radius: 6px;
  padding: 5px 7px;
  background: var(--control);
  color: var(--ink);
  font-weight: 700;
  outline: 0;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus {
  background: var(--control);
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(7, 0, 80, 0.15);
}

input::placeholder {
  color: rgba(7, 0, 80, 0.42);
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

input[type="range"] {
  min-height: 22px;
  padding: 0;
  background: transparent;
  accent-color: var(--accent);
}

select option {
  background: #ffffff;
  color: var(--ink);
}

a {
  color: var(--accent-strong);
  font-weight: 700;
}

#viewDiv {
  position: absolute;
  inset: var(--top-offset) 0 0 0;
}

.masterPlanHighlightOverlay {
  position: absolute;
  inset: var(--top-offset) 0 0 0;
  z-index: 3;
  display: none;
  overflow: visible;
  pointer-events: none;
}

body.isMasterPlan2d:not(.isSignedOut):not(.isSams2d) .masterPlanHighlightOverlay {
  display: block;
}

body.isViewTransitioning .masterPlanHighlightOverlay {
  display: none;
}

.masterPlanHighlightFill {
  fill: rgba(255, 42, 42, 0.34);
  fill-rule: evenodd;
  stroke: none;
}

.masterPlanHighlightHalo,
.masterPlanHighlightStroke {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.masterPlanHighlightHalo {
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 9px;
}

.masterPlanHighlightStroke {
  stroke: rgba(255, 42, 42, 1);
  stroke-width: 4px;
}

.masterPlanDmLabel {
  fill: rgb(7, 0, 80);
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 5px;
  paint-order: stroke fill;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.landingPage {
  position: absolute;
  inset: var(--top-offset) 0 0 0;
  z-index: 1;
  display: none;
  overflow: hidden;
  background: rgb(7, 0, 80);
}

.landingPage video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.landingPage::after {
  display: none;
}

.landingPageTitle {
  position: absolute;
  top: 46%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: min(92vw, 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  text-shadow: 0 2px 10px rgba(7, 0, 80, 0.65);
}

.landingPageTitleMain {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

.landingPageTitleSub {
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.landingLoginButton {
  min-width: 160px;
  min-height: 54px;
  margin: 0;
  padding: 0 38px;
  border: 2px solid #06d7bb;
  border-radius: 8px;
  background: #ffffff;
  color: rgb(7, 0, 80);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(7, 0, 80, 0.22);
  text-shadow: none;
}

.landingLoginButton:hover,
.landingLoginButton:focus-visible {
  background: #e9fffc;
  outline: none;
}

.landingPagePerformance {
  width: max-content;
  max-width: 92vw;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 22px 84px;
  justify-items: center;
  align-items: center;
  margin-top: 20px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.landingPagePerformance span:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .landingPageTitle {
    top: 48%;
    width: min(92vw, 420px);
    gap: 18px;
  }

  .landingPageTitleMain {
    font-size: clamp(20px, 6vw, 30px);
  }

  .landingPageTitleSub {
    font-size: clamp(44px, 14vw, 58px);
  }

  .landingLoginButton {
    min-width: 150px;
    min-height: 50px;
    font-size: 24px;
  }

  .landingPagePerformance {
    width: max-content;
    max-width: 92vw;
    grid-template-columns: 1fr;
    gap: 12px;
    font-size: 17px;
    white-space: nowrap;
  }

  .landingPagePerformance span:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (max-width: 980px) {
  .bimViewerHost {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 42%) minmax(0, 34%) minmax(0, 24%);
  }

  .bimMain {
    grid-row: 1;
  }

  .bimSidebar {
    grid-row: 2;
    border-right: 0;
    border-top: 1px solid rgba(7, 0, 80, 0.14);
  }

  .bimProperties {
    grid-row: 3;
    border-left: 0;
    border-top: 1px solid rgba(7, 0, 80, 0.14);
  }

  .bimToolbar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    transform: none;
    justify-content: stretch;
  }

  .bimToolbar button {
    flex: 1 1 0;
  }
}

.sams2dHost {
  position: absolute;
  inset: var(--top-offset) 0 0 0;
  z-index: 1;
  display: none;
  overflow: hidden;
  background: #ffffff;
}

.sams2dHost iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.customAppHost {
  position: absolute;
  inset: var(--top-offset) 0 0 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.customAppToolbar {
  flex: 0 0 34px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(7, 0, 80, 0.16);
  background: var(--panel);
  color: var(--ink);
}

.customAppTitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.customAppHost iframe {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: block;
  border: 0;
}

.bimViewerHost {
  position: absolute;
  inset: var(--top-offset) 0 0 0;
  z-index: 1;
  display: none;
  grid-template-columns: minmax(250px, 18vw) minmax(0, 1fr) minmax(280px, 20vw);
  min-height: 0;
  overflow: hidden;
  background: #f5f7fb;
  color: var(--ink);
}

.bimSidebar,
.bimProperties {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: var(--panel);
  border-right: 1px solid rgba(7, 0, 80, 0.14);
}

.bimProperties {
  border-right: 0;
  border-left: 1px solid rgba(7, 0, 80, 0.14);
}

.bimSection {
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(7, 0, 80, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.bimSectionHeaderRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(7, 0, 80, 0.14);
}

.bimSectionHeaderRow .sectionTitle {
  flex: 1 1 auto;
  min-width: 0;
  margin: 2px 0 0;
  padding-bottom: 7px;
  border: 0;
}

.bimInlineClearButton {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(7, 0, 80, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bimInlineClearButton:hover,
.bimInlineClearButton:focus-visible {
  border-color: #06d7bb;
  background: #e9fffc;
  outline: none;
}

.bimSidebar .bimSection:has(.bimObjectList) {
  padding: 10px 8px;
}

.bimSidebar .bimSection:has(.bimObjectList) .sectionTitle {
  margin-bottom: 8px;
  font-size: 13px;
}

.bimFileInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.bimFileButton,
.bimToolbar button,
.bimBackgroundColorControl {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(7, 0, 80, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bimFileButton {
  width: 100%;
}

.bimFileButton:hover,
.bimToolbar button:hover,
.bimToolbar button[aria-pressed="true"],
.bimBackgroundColorControl:hover,
.bimBackgroundColorControl:focus-within {
  border-color: #06d7bb;
  background: #e9fffc;
}

.bimBackgroundColorControl {
  gap: 8px;
  user-select: none;
}

.bimBackgroundColorControl input {
  width: 28px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(7, 0, 80, 0.18);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.bimModelActions {
  display: block;
  margin-top: 8px;
}

.bimModelLibraryButton {
  width: 100%;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(7, 0, 80, 0.18);
  border-radius: 8px;
  background: #ffe2bd;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bimModelLibraryButton:hover {
  border-color: #06d7bb;
  background: #e9fffc;
}

.bimModelModal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 0, 80, 0.28);
  backdrop-filter: blur(5px);
}

.bimModelModal.hidden {
  display: none;
}

.bimModelModalPanel {
  width: min(760px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(7, 0, 80, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(7, 0, 80, 0.24);
}

.bimImportModalPanel {
  width: min(560px, calc(100vw - 48px));
}

.bimModelModalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(7, 0, 80, 0.14);
}

.bimModelModalActions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bimModelModalHeader h2 {
  margin: 0;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 1.2;
}

.bimModelModalClose,
.bimModelOpenButton,
.bimModelHeaderDelete {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(7, 0, 80, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.bimModelModalClose {
  width: 36px;
  padding: 0;
  font-size: 14px;
}

.bimModelOpenButton:hover,
.bimModelHeaderDelete:hover:not(:disabled),
.bimModelModalClose:hover {
  border-color: #06d7bb;
  background: #e9fffc;
}

.bimModelHeaderDelete:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.bimModelList {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.bimModelEmpty {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(7, 0, 80, 0.14);
  border-radius: 8px;
  color: rgba(7, 0, 80, 0.72);
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.bimModelCard {
  display: grid;
  grid-template-columns: auto 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 10px;
  border: 1px solid rgba(7, 0, 80, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.bimModelCard.isActive {
  border-color: #06d7bb;
  background: #e9fffc;
}

.bimModelCard.isChecked {
  box-shadow: inset 3px 0 0 #06d7bb;
}

.bimModelSelectBox {
  width: 22px;
  min-height: 66px;
  display: grid;
  place-items: center;
}

.bimModelSelectBox input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  accent-color: #06d7bb;
  cursor: pointer;
}

.bimModelThumb {
  width: 92px;
  height: 66px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(7, 0, 80, 0.14);
  border-radius: 7px;
  background: linear-gradient(135deg, #e9fffc 0%, #ffffff 48%, #ffe2bd 100%);
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.bimModelThumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bimModelInfo {
  min-width: 0;
}

.bimModelName {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.bimModelMeta {
  margin: 0;
  color: rgba(7, 0, 80, 0.68);
  font-family: Arial, sans-serif;
  font-size: 11px;
  line-height: 1.35;
}

.bimModelCardActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.bimImportForm {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}

.bimImportField {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.bimImportInput {
  width: 100%;
  min-height: 38px;
  padding: 8px;
  border: 1px solid rgba(7, 0, 80, 0.18);
  border-radius: 8px;
  background: #ffe2bd;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 12px;
}

.bimImportActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bimStatus {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(7, 0, 80, 0.68);
}

.bimProgress {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.bimProgress.isIdle {
  display: none;
}

.bimProgressTrack {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(7, 0, 80, 0.12);
}

.bimProgressFill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #06d7bb;
  transition: width 240ms ease;
}

.bimProgress.isActive .bimProgressFill {
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 0,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
  background-size: 80px 100%;
  animation: bimProgressPulse 1.1s linear infinite;
}

.bimProgress.isFailed .bimProgressFill {
  background: #e40d75;
}

.bimProgressSteps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.bimProgressSteps span {
  min-width: 0;
  box-sizing: border-box;
  padding: 4px 5px;
  border: 1px solid rgba(7, 0, 80, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: rgba(7, 0, 80, 0.52);
  font-size: 10px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.bimProgressSteps span.isDone {
  border-color: rgba(6, 215, 187, 0.6);
  background: #e9fffc;
  color: var(--ink);
}

.bimProgressSteps span.isActive {
  border-color: #06d7bb;
  color: var(--ink);
  font-weight: 700;
}

.bimProgressSteps span.isFailed {
  border-color: rgba(228, 13, 117, 0.35);
  background: rgba(228, 13, 117, 0.08);
  color: #e40d75;
}

@keyframes bimProgressPulse {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 80px 0;
  }
}

.bimSearch {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(7, 0, 80, 0.18);
  border-radius: 8px;
  background: #ffe2bd;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.bimObjectList {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding-left: 8px;
  font-size: 11px;
  line-height: 1.18;
  max-width: 100%;
  overflow-x: hidden;
}

.bimObjectRow {
  width: 100%;
  min-height: 28px;
  padding: 5px 6px;
  border: 1px solid rgba(7, 0, 80, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.bimObjectRow.isBimTreeSelected,
.bimObjectList .isBimTreeSelected > :where(div, span, a, button, label),
.bimObjectList .isBimTreeSelected :where(.xeokit-treeViewPlugin-nodeTitle, .xeokit-treeViewPlugin-nodeLabel) {
  border-radius: 5px;
  background: #e9fffc !important;
  color: var(--ink) !important;
  box-shadow: inset 3px 0 0 #06d7bb;
}

.bimObjectList :where(ul, ol) {
  margin: 0;
  padding-left: 10px !important;
}

.bimObjectList > :where(ul, ol) {
  padding-left: 6px !important;
}

.bimObjectList :where(li) {
  margin: 0 !important;
  padding: 1px 0 1px 2px !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.bimObjectList :where(div, span, label, a, button) {
  font-family: Arial, sans-serif !important;
  font-size: 11px !important;
  line-height: 1.18 !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.bimObjectList :where(.xeokit-treeViewPlugin-node, .xeokit-treeViewPlugin-nodeTitle, .xeokit-treeViewPlugin-nodeLabel) {
  margin-left: 0 !important;
  padding-left: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.bimObjectList :where(.xeokit-treeViewPlugin-nodeTitle, .xeokit-treeViewPlugin-nodeLabel) {
  display: inline !important;
}

.bimObjectList :where(.xeokit-treeViewPlugin-children, .xeokit-treeViewPlugin-childNodes, .children) {
  margin-left: 8px !important;
  padding-left: 8px !important;
}

.bimObjectList :where(.xeokit-treeViewPlugin-expandIcon, .xeokit-treeViewPlugin-collapseIcon, .xeokit-treeViewPlugin-switch, .xeokit-treeViewPlugin-expander) {
  margin-right: 4px !important;
}

.bimObjectList :where(input[type="checkbox"]) {
  width: 11px !important;
  height: 11px !important;
  min-width: 11px !important;
  min-height: 11px !important;
  margin: 0 5px 0 2px !important;
  transform: none !important;
  accent-color: #06d7bb !important;
}

.bimObjectList :where(input[type="checkbox"]:focus-visible) {
  outline: 2px solid rgba(6, 215, 187, 0.45) !important;
  outline-offset: 2px !important;
}

.bimObjectList :where(.xeokit-treeViewPlugin-checkbox) {
  width: 11px !important;
  height: 11px !important;
  min-width: 11px !important;
  min-height: 11px !important;
  margin: 0 5px 0 2px !important;
  accent-color: #06d7bb !important;
}

.bimObjectList :where(.xeokit-treeViewPlugin-checkbox.checked, .xeokit-treeViewPlugin-checkboxSelected, .xeokit-treeViewPlugin-checkbox.checked:hover) {
  border-color: #06d7bb !important;
  background-color: #06d7bb !important;
  color: rgb(7, 0, 80) !important;
}

.bimObjectList.isFiltering li.isBimTreeMatch > :where(span, a, button, label) {
  border-radius: 5px;
  background: #e9fffc !important;
  color: var(--ink) !important;
}

.bimMain {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: var(--bim-bg, #f2f3f5);
  overflow: hidden;
}

.bimCanvas {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.bimNavCubeCanvas {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 120px;
  height: 120px;
  z-index: 2;
}

.sams-bim-mobile-performance .bimNavCubeCanvas {
  display: block !important;
  width: 60px !important;
  height: 60px !important;
  top: 8px;
  right: 8px;
}

.sams-bim-mobile-performance .bimCanvas {
  transform: translateZ(0);
  backface-visibility: hidden;
  touch-action: none;
  overscroll-behavior: contain;
}

.bimToolbar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  flex-wrap: nowrap;
  justify-content: stretch;
  gap: 8px;
  padding: 4px;
  overflow-x: auto;
  overflow-y: visible;
}

.bimToolbar button,
.bimBackgroundColorControl {
  flex: 1 1 0;
  min-width: max-content;
}

.bimSliceList {
  display: grid;
  gap: 5px;
  color: rgba(7, 0, 80, 0.68);
  font-size: 11px;
  line-height: 1.25;
}

.bimSliceRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(7, 0, 80, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.bimSliceRow button {
  min-width: 0;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.bimSliceRow button:hover,
.bimSliceRow button:focus-visible {
  border-color: #06d7bb;
  background: #e9fffc;
}

.bimPropertiesContent {
  display: grid;
  gap: 7px;
}

.bimPropertyRow {
  display: grid;
  grid-template-columns: minmax(90px, 42%) minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(7, 0, 80, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.25;
}

.bimPropertyRow strong {
  font-weight: 700;
  color: rgba(7, 0, 80, 0.66);
  overflow-wrap: anywhere;
}

.bimPropertyRow span {
  font-weight: 400;
  overflow-wrap: anywhere;
}

body.isSignedOut .landingPage {
  display: block;
}

body.isSignedOut #viewDiv,
body.isSignedOut .customAppHost,
body.isSignedOut .bimViewerHost,
body.isSignedOut .toolPanel,
body.isSignedOut .statusPanel,
body.isSignedOut .customPopup {
  display: none !important;
}

body.isSignedOut.isSessionExpired .statusPanel {
  display: block !important;
}

body.isSignedOut .appModeButtons {
  display: none !important;
}

body.isSams2d .sams2dHost {
  display: block;
}

body.isSams2d .landingPage,
body.isSams2d #viewDiv,
body.isSams2d .bimViewerHost,
body.isSams2d .toolPanel,
body.isSams2d .statusPanel,
body.isSams2d .customPopup {
  display: none !important;
}

body.isBimViewer .bimViewerHost {
  display: grid;
}

body.isBimViewer .landingPage,
body.isBimViewer .sams2dHost,
body.isBimViewer #viewDiv,
body.isBimViewer .toolPanel,
body.isBimViewer .sceneWidgetRail,
body.isBimViewer .basemapPanel,
body.isBimViewer #viewDiv .esri-ui,
body.isBimViewer .customPopup,
body.isBimViewer .masterPlanHighlightOverlay {
  display: none !important;
}

body.isCustomApp .customAppHost {
  display: flex;
}

body.isCustomApp .landingPage,
body.isCustomApp .sams2dHost,
body.isCustomApp .bimViewerHost,
body.isCustomApp #viewDiv,
body.isCustomApp .toolPanel,
body.isCustomApp .statusPanel,
body.isCustomApp .customPopup,
body.isCustomApp .masterPlanHighlightOverlay {
  display: none !important;
}

.brandBar {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  right: 0;
  height: var(--brand-bar-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 4px solid #06d7bb;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(7, 0, 80, 0.1);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
}

.brandLogo {
  flex: 0 0 auto;
  display: block;
  width: auto;
  max-width: min(180px, 44vw);
  height: auto;
  max-height: calc(var(--brand-bar-height) - 14px);
  object-fit: contain;
  filter: none;
}

.appTitle {
  min-width: 0;
  flex: 0 1 auto;
  color: rgb(7, 0, 80);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appTitleMobile {
  display: none;
}

.headerControls {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: static;
}

.headerNavControls {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.headerControlsToggle {
  display: none;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.accountMenu {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  margin-left: 0;
  min-width: 0;
}

.customAppsMenu {
  position: relative;
  margin-left: 0;
  min-width: 0;
}

.appModeButtons {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.appModeButton {
  width: auto;
  min-width: 0;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--widget-bg);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.appModeButton:hover,
.appModeButton:focus {
  border-color: rgba(7, 0, 80, 0.32);
  background: var(--widget-bg-hover);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(7, 0, 80, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}

.appModeButton.isActive,
.headerMenuButton.isActive {
  border-color: #06d7bb;
  background-color: var(--active-button-bg);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(7, 0, 80, 0.12), inset 0 -2px 0 #06d7bb;
  transform: none;
}

.appModeButton:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.headerMenuButton {
  min-width: 0;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border-color: var(--line);
  border-radius: 6px;
  background: var(--widget-bg);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
}

.headerMenuButton:hover,
.headerMenuButton:focus {
  border-color: rgba(7, 0, 80, 0.32);
  background: var(--widget-bg-hover);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(7, 0, 80, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}

.headerMenuChevron {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 0.8;
}

.headerMenuDropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 300px;
  max-width: min(430px, calc(100vw - 28px));
  max-height: min(420px, calc(100vh - var(--brand-bar-height) - 24px));
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 34px rgba(7, 0, 80, 0.2);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}

.headerMenuItem {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  text-decoration: none;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.headerMenuItem:hover,
.headerMenuItem:focus {
  background: var(--widget-bg-hover);
  color: var(--ink);
}

.customAppCard {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  padding: 7px;
  border: 1px solid rgba(7, 0, 80, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  box-shadow: none;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
  cursor: pointer;
}

.customAppCard + .customAppCard {
  margin-top: 8px;
}

.customAppCard:hover,
.customAppCard:focus {
  border-color: #06d7bb;
  background: var(--widget-bg-hover);
  box-shadow: 0 10px 22px rgba(7, 0, 80, 0.12);
  transform: none;
}

.customAppCardImage {
  min-width: 0;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(7, 0, 80, 0.12);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.customAppCardImage img {
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  object-position: center;
  display: block;
}

.customAppCardImage.isEmpty {
  background: linear-gradient(135deg, rgba(7, 0, 80, 0.1), rgba(6, 215, 187, 0.16));
}

.customAppCardBody {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.customAppCardTitle {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.customAppCardUrl {
  color: rgba(7, 0, 80, 0.62);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.headerMenuEmpty {
  margin: 4px 6px;
  color: rgba(7, 0, 80, 0.64);
  font-size: 11px;
  font-weight: 400;
}

.accountButton {
  min-width: 0;
  max-width: min(260px, 42vw);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px 0 7px;
  border-color: var(--line);
  border-radius: 6px;
  background: var(--widget-bg);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 400;
}

.accountButton:hover,
.accountButton:focus {
  border-color: rgba(7, 0, 80, 0.32);
  background: var(--widget-bg-hover);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(7, 0, 80, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}

.accountButton:disabled {
  cursor: default;
  opacity: 0.82;
  transform: none;
}

.accountButton.isSignedIn {
  border-color: rgba(7, 0, 80, 0.22);
  background: var(--widget-bg);
  padding: 0 8px 0 6px;
}

.accountAvatar {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #BFBFBF;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.accountButton.isSignedIn .accountAvatar {
  background: #06d7bb;
}

.accountAvatar.hasImage {
  overflow: hidden;
  background: #ffffff;
}

.accountAvatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.accountAvatar svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  color: #ffffff;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.accountButtonLabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accountButton.isSignedIn .accountButtonLabel {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.accountChevron {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 0.8;
}

.accountDropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  padding: 6px;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 34px rgba(7, 0, 80, 0.2);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}

.accountMenuItem {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-size: 11px;
  font-weight: 400;
  text-align: left;
  text-decoration: none;
}

.accountMenuItem:hover,
.accountMenuItem:focus {
  background: var(--widget-bg-hover);
  color: var(--ink);
  box-shadow: none;
  transform: none;
}

.settingsStatus {
  min-height: 14px;
  margin: 0;
  color: rgba(7, 0, 80, 0.72);
  font-size: 11px;
  font-weight: 400;
}

.settingsModal,
.debugLogModal {
  position: fixed;
  z-index: 12;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 0, 80, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.settingsDialog,
.debugLogDialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(7, 0, 80, 0.28);
  overflow: hidden;
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
}

.settingsDialogHeader,
.debugLogHeader {
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 2px solid #06d7bb;
  background: var(--panel-strong);
}

.settingsDialogHeader h2,
.debugLogHeader h2,
.settingsSection h3 {
  margin: 0;
  color: var(--ink);
}

.settingsDialogHeader h2,
.debugLogHeader h2 {
  font-size: 15px;
  font-weight: 800;
}

.settingsCloseButton {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 7px;
  font-size: 20px;
  line-height: 1;
}

.settingsDialogBody {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.debugLogBody {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.debugLogMeta {
  margin: 0;
  color: rgba(7, 0, 80, 0.72);
  font-size: 11px;
  font-weight: 400;
}

.debugLogOutput {
  min-height: 260px;
  max-height: min(520px, calc(100vh - 220px));
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(7, 0, 80, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: 11px/1.45 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  overflow: auto;
}

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

.debugLogActions button {
  min-height: 34px;
}

.settingsSection {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(7, 0, 80, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.settingsSection h3 {
  font-size: 12px;
  font-weight: 800;
}

.settingsSectionTitleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settingsSectionTitleRow button {
  width: auto;
  min-height: 30px;
}

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

.settingsActionGrid button {
  min-height: 34px;
}

.customAppsEditorList {
  display: grid;
  gap: 8px;
}

.customAppEditorRow {
  display: grid;
  grid-template-columns: minmax(105px, 0.8fr) minmax(160px, 1fr) minmax(180px, 0.9fr) 34px;
  align-items: start;
  gap: 8px;
}

.customAppEditorRow input {
  min-width: 0;
}

.customAppImageEditor {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.customAppImagePreview {
  width: 62px;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.84);
  color: rgba(7, 0, 80, 0.56);
  font-size: 11px;
  font-weight: 400;
}

.customAppImagePreview img {
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  display: block;
  object-fit: contain;
  object-position: center;
}

.customAppImagePreview.isEmpty {
  background: rgba(7, 0, 80, 0.04);
}

.customAppImageActions {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.customAppImageUploadButton,
.customAppImageRemoveButton {
  width: auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 7px;
  background: var(--widget-bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
}

.customAppImageUploadButton:hover,
.customAppImageUploadButton:focus-within,
.customAppImageRemoveButton:hover,
.customAppImageRemoveButton:focus {
  border-color: #06d7bb;
  background: var(--widget-bg-hover);
}

.customAppImageRemoveButton:disabled {
  cursor: default;
  opacity: 0.5;
}

.customAppImageInput {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.customAppRemoveButton {
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 16px;
}

.topBar {
  position: absolute;
  z-index: 7;
  top: var(--brand-bar-height);
  left: 0;
  right: 0;
  height: var(--top-bar-height);
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: 0 10px 24px rgba(7, 0, 80, 0.1);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
}

.appModeSelect {
  width: auto;
  min-width: 112px;
  min-height: 20px;
  height: 20px;
  padding: 1px 24px 1px 8px;
  border-color: rgba(7, 0, 80, 0.18);
  border-radius: 5px;
  background: #ffffff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
}

.toolPanel {
  position: absolute;
  z-index: 6;
  top: var(--top-offset);
  right: 0;
  bottom: 0;
  width: min(var(--tool-panel-width), calc(100vw - 24px));
  width: min(var(--tool-panel-width), calc(100dvw - 24px));
  display: flex;
  flex-direction: column;
  container: tool-panel / inline-size;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
}

.toolPanel.isResizing {
  transition: none;
}

.toolPanelResizeHandle {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
  touch-action: none;
  background: transparent;
}

.toolPanelResizeHandle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 3px;
  height: 54px;
  border-radius: 999px;
  background: rgba(7, 0, 80, 0.18);
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease;
}

.toolPanelResizeHandle:hover::before,
.toolPanelResizeHandle:focus-visible::before,
.toolPanel.isResizing .toolPanelResizeHandle::before {
  background: rgba(7, 0, 80, 0.48);
  opacity: 1;
}

.toolPanel.isCollapsed {
  transform: translateX(calc(100% - 52px));
}

.toolPanel.isCollapsed .toolPanelResizeHandle {
  display: none;
}

.toolPanel.isCollapsed .panelTop {
  justify-content: flex-start;
  padding-left: 6px;
}

.toolPanel.isCollapsed .iconButton {
  position: absolute;
  left: 9px;
  top: 12px;
  z-index: 2;
  background: var(--widget-bg);
  color: var(--ink);
  border-color: rgba(7, 0, 80, 0.2);
  box-shadow: 0 8px 22px rgba(7, 0, 80, 0.14);
}

.toolPanel.isCollapsed .panelTop > div,
.toolPanel.isCollapsed .panelClearButton,
.toolPanel.isCollapsed .tabBar,
.toolPanel.isCollapsed .panelPage {
  opacity: 0;
  pointer-events: none;
}

.panelTitleRow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.panelTop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 8px 8px 0 0;
}

.panelTop::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(7, 0, 80, 0.2), transparent);
}

.panelTop h1,
.panelTop p {
  margin: 0;
}

.panelTop h1 {
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0;
}

.panelExportMenu {
  position: relative;
  z-index: 4;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
}

body.isSignedOut .panelExportMenu,
body.isCustomApp .panelExportMenu {
  display: none;
}

.panelExportButton {
  width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
}

.panelClearButton {
  flex: 1 1 0;
  min-width: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
}

.panelTop > .iconButton {
  flex: 0 0 auto;
  margin-left: auto;
  width: 40px;
  min-height: 30px;
  height: 30px;
  border-radius: 6px;
}

.panelExportChevron {
  font-size: 16px;
  line-height: 0.8;
}

.panelExportDropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 170px;
  padding: 7px;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 34px rgba(7, 0, 80, 0.2);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}

.panelExportItem {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  text-align: left;
}

.panelExportItem:hover,
.panelExportItem:focus {
  background: var(--widget-bg-hover);
  box-shadow: none;
  transform: none;
}

body.isMasterPlan2d .exportOption3d,
body:not(.isMasterPlan2d) .exportOption2d {
  display: none;
}

.eyebrow {
  margin-bottom: 0;
  font-size: 13px;
  color: var(--accent-strong);
  text-transform: uppercase;
  font-weight: 700;
}

.textLinkButton {
  width: auto;
  min-height: 24px;
  padding: 0 0 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-size: 11px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.textLinkButton:hover,
.textLinkButton:focus {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--accent-strong);
  transform: none;
}

.textLinkButton.isActive {
  font-weight: 700;
  color: #06d7bb;
  text-decoration-thickness: 2px;
  text-decoration-color: #06d7bb;
}

.titleLinkButton {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}

.titleLinkButton:hover,
.titleLinkButton:focus,
.titleLinkButton.isActive {
  text-decoration: underline;
  text-decoration-color: #06d7bb;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.iconButton {
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.tabBar {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.tabButton {
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  padding-inline: 6px;
  background: var(--widget-bg);
  border-color: rgba(7, 0, 80, 0.14);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabButton.isActive {
  background: var(--active-button-bg);
  color: var(--ink);
  border-color: rgba(7, 0, 80, 0.28);
  box-shadow: inset 0 -2px 0 #06d7bb, 0 8px 18px rgba(7, 0, 80, 0.1);
}

.panelPage {
  display: none;
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 12px;
}

.panelPage::-webkit-scrollbar,
.checkList::-webkit-scrollbar {
  width: 9px;
}

.panelPage::-webkit-scrollbar-track,
.checkList::-webkit-scrollbar-track {
  background: rgba(7, 0, 80, 0.06);
}

.panelPage::-webkit-scrollbar-thumb,
.checkList::-webkit-scrollbar-thumb {
  border: 2px solid rgba(247, 248, 252, 0.96);
  border-radius: 999px;
  background: rgba(7, 0, 80, 0.34);
}

.panelPage.isActive {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

body.isMasterPlan2d .tabBar {
  display: none;
}

.masterPlanPanel {
  min-height: 0;
  overflow-y: auto;
  align-content: start;
}

.sectionBlock {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 12px;
  border: 1px solid rgba(7, 0, 80, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.collapsibleSection {
  position: relative;
  display: block;
  min-width: 0;
  height: auto;
  padding: 0;
  overflow: hidden;
  background: var(--widget-bg);
}

.collapsibleSection.isOpen {
  overflow: hidden;
}

.sectionBlock:last-child {
  border-bottom: 1px solid rgba(7, 0, 80, 0.12);
}

.sectionTitle {
  margin: 2px 0 10px;
  padding: 0 0 7px;
  border: 1px solid rgba(7, 0, 80, 0.14);
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.sectionHeader {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--widget-bg);
  box-shadow: none;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  transform: none;
}

.sectionTitleText {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sectionToggle {
  justify-self: end;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(7, 0, 80, 0.18);
  border-radius: 6px;
  background: var(--widget-bg);
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(7, 0, 80, 0.08);
}

.sectionToggle::before {
  content: "+";
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.collapsibleSection.isOpen > .sectionHeader {
  border-bottom: 1px solid rgba(7, 0, 80, 0.14);
  border-radius: 8px 8px 0 0;
}

.collapsibleSection.isOpen .sectionToggle::before {
  content: "-";
}

.sectionHeader:hover,
.sectionHeader:focus {
  border-color: transparent;
  background: var(--widget-bg-hover);
  box-shadow: none;
  color: var(--ink);
  transform: none;
}

.sectionHeader:focus-visible {
  outline: 2px solid rgba(7, 0, 80, 0.26);
  outline-offset: -2px;
}

.sectionHeader:hover .sectionToggle,
.sectionHeader:focus-visible .sectionToggle {
  border-color: rgba(7, 0, 80, 0.34);
  background: var(--widget-bg-hover);
}

.sectionBody {
  position: relative;
  min-width: 0;
  height: auto;
  padding: 10px 12px 12px;
}

.collapsibleSection:not(.isOpen) > .sectionBody,
.sectionBody[hidden] {
  display: none !important;
}

.collapsibleSection.isOpen > .sectionBody {
  display: block;
}

.fieldStack {
  min-width: 0;
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.fieldStack label,
.toggleRow span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
}

.coordinatePickerBlock {
  display: grid;
  gap: 10px;
}

.coordinatePickerHeader {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(7, 0, 80, 0.14);
}

.coordinatePickerHeader .sectionTitle {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
  border: 0;
}

.coordinateCopyButton,
.coordinatePickToggle {
  width: 34px;
  min-width: 34px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(7, 0, 80, 0.18);
  border-radius: 8px;
  background: var(--widget-bg);
  color: var(--ink);
  font-size: 0;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.coordinatePickIcon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  font-size: 18px;
  line-height: 1;
  transform: none;
}

.coordinateCopyButton {
  position: relative;
}

.coordinateCopyIcon,
.coordinateCopyIcon::before {
  display: block;
  width: 12px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
  box-sizing: border-box;
}

.coordinateCopyIcon {
  position: relative;
  transform: translate(2px, 1px);
}

.coordinateCopyIcon::before {
  content: "";
  position: absolute;
  left: -6px;
  top: -5px;
  background: var(--widget-bg);
}

.coordinateCopyButton:hover .coordinateCopyIcon::before,
.coordinateCopyButton:focus-visible .coordinateCopyIcon::before,
.coordinateCopyButton.isCopied .coordinateCopyIcon::before {
  background: #e9fffc;
}

.coordinateCopyButton:hover,
.coordinateCopyButton:focus-visible,
.coordinateCopyButton.isCopied,
.coordinatePickToggle:hover,
.coordinatePickToggle:focus-visible,
.coordinatePickToggle.isActive {
  border-color: #06d7bb;
  background: #e9fffc;
  color: var(--ink);
  outline: none;
}

.coordinateReadout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.coordinateReadout div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(7, 0, 80, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.coordinateReadout span {
  color: rgba(7, 0, 80, 0.62);
  font-size: 11px;
  font-weight: 400;
}

.coordinateReadout strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.toggleRow {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}

.buttonRow {
  width: 100%;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px;
  align-items: center;
  justify-content: stretch;
}

.buttonRow > button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  padding-inline: 4px;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.15;
}

.primaryButton {
  background: var(--widget-bg);
  color: var(--ink);
  border-color: rgba(7, 0, 80, 0.24);
  box-shadow: 0 8px 24px rgba(7, 0, 80, 0.14);
}

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

.linkRow a {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 6px;
  background: var(--widget-bg);
  text-align: center;
}

.classificationLegend {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(7, 0, 80, 0.12);
}

.legendTitle {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.legendList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 6px;
}

.legendItem {
  min-width: 0;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 7px;
  border: 1px solid rgba(7, 0, 80, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
}

.legendItem span:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.legendCount,
.checkItem .count {
  min-width: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border: 1px solid rgba(7, 0, 80, 0.12);
  border-radius: 999px;
  background: rgba(7, 0, 80, 0.07);
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
  justify-self: end;
}

.legendSwatch {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(7, 0, 80, 0.22);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

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

#statusFilters {
  grid-template-columns: 1fr;
}

.checkGrid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkItem {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
}

.checkItem span:not(.count) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.checkList {
  max-height: 150px;
  overflow: auto;
  display: grid;
  gap: 6px;
}

.layerVisibilityList {
  max-height: 220px;
}

.layerToggleItem {
  grid-template-columns: 20px minmax(0, 1fr);
}

.layerToggleItem span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.layerToggleItem.isDisabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.layerToggleItem.isDisabled input {
  cursor: not-allowed;
}

.rangeBlock {
  display: grid;
  gap: 6px;
}

.rangeInputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 6px;
}

.rangeInputs input {
  min-width: 0;
}

.resultList {
  display: grid;
  gap: 8px;
}

.resultItem {
  width: 100%;
  min-height: 40px;
  padding: 10px;
  border: 1px solid rgba(7, 0, 80, 0.14);
  border-radius: 6px;
  background: var(--widget-bg);
  color: var(--ink);
  text-align: left;
  font-weight: 700;
}

.resultItem:hover {
  border-color: var(--accent-strong);
  background: var(--widget-bg-hover);
}

.resultItem.isSelected {
  border-color: var(--accent-strong);
  background: var(--active-button-bg);
  box-shadow: inset 3px 0 0 var(--accent-strong);
}

.resultItemTitle {
  display: block;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.resultItemMeta {
  display: block;
  color: rgba(7, 0, 80, 0.68);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.masterPlanSearchResults {
  margin-top: 10px;
}

.mutedText {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.widgetMount {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

#scenePanel {
  min-height: 0;
  overflow-y: auto;
  align-content: start;
}

#scenePanel .symbologySection {
  display: block;
  min-height: 0;
  height: auto;
  overflow: visible;
  contain: none;
}

#scenePanel #legendNode {
  display: block;
  margin-top: 0;
  min-height: 0;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#scenePanel #legendNode.esri-legend,
#scenePanel #legendNode.esri-widget,
#scenePanel #legendNode.esri-widget--panel,
#scenePanel #legendNode .esri-legend,
#scenePanel #legendNode .esri-widget--panel,
#scenePanel #legendNode .esri-legend__content,
#scenePanel #legendNode .esri-legend__service,
#scenePanel #legendNode .esri-legend__service-children,
#scenePanel #legendNode .esri-legend__layer,
#scenePanel #legendNode .esri-legend__layer-body,
#scenePanel #legendNode .esri-legend__layer-table,
#scenePanel #legendNode .esri-legend__layer-row,
#scenePanel #legendNode .esri-legend__layer-cell,
#scenePanel #legendNode .esri-widget {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.masterPlanLegendSection,
.masterPlanLegendSection .widgetMount,
#masterPlanLegendNode,
#masterPlanLegendNode.esri-legend,
#masterPlanLegendNode.esri-widget,
#masterPlanLegendNode.esri-widget--panel,
#masterPlanLegendNode .esri-legend,
#masterPlanLegendNode .esri-widget--panel,
#masterPlanLegendNode .esri-legend__content,
#masterPlanLegendNode .esri-legend__service,
#masterPlanLegendNode .esri-legend__service-children,
#masterPlanLegendNode .esri-legend__layer,
#masterPlanLegendNode .esri-legend__layer-body,
#masterPlanLegendNode .esri-legend__layer-table,
#masterPlanLegendNode .esri-legend__layer-row,
#masterPlanLegendNode .esri-legend__layer-cell,
#masterPlanLegendNode .esri-widget {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.statusPanel {
  position: absolute;
  z-index: 30;
  left: 50%;
  top: 50%;
  width: min(420px, calc(100vw - 28px));
  transform: translate(-50%, -50%);
  padding: 20px;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(110%);
}

.statusPanel.isHidden {
  display: none;
}

.statusPanel p {
  margin: 0 0 8px;
}

#statusTitle {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.customPopup {
  position: fixed;
  z-index: 9;
  top: calc(var(--top-offset) + 10vh);
  left: 16px;
  right: auto;
  bottom: auto;
  width: min(var(--tool-panel-width), calc(100vw - 24px));
  width: min(var(--tool-panel-width), calc(100dvw - 24px));
  height: min(80vh, calc(100vh - var(--top-offset) - 24px));
  height: min(80dvh, calc(100dvh - var(--top-offset) - 24px));
  max-height: min(80vh, calc(100vh - var(--top-offset) - 24px));
  max-height: min(80dvh, calc(100dvh - var(--top-offset) - 24px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(7, 0, 80, 0.22);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
}

.customPopupHeader {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(7, 0, 80, 0.12);
  cursor: move;
  user-select: none;
  touch-action: none;
}

.customPopupHeading {
  min-width: 0;
}

#customPopupEyebrow {
  margin: 0 0 2px;
  color: rgba(7, 0, 80, 0.68);
  font-size: 11px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customPopupTitle {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.customPopupClose {
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 7px;
  color: #0645ad;
  font-size: 18px;
  line-height: 1;
}

.customPopup :where(a, button) {
  color: #0645ad;
}

.customPopupContent {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.customPopupLinks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-bottom: 10px;
}

.customPopupLink {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 7px;
  background: var(--widget-bg);
  color: #0645ad;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.customPopupLink:hover,
.customPopupLink:focus {
  background: var(--widget-bg-hover);
  color: #043d8f;
}

.customPopupFields {
  display: grid;
  gap: 6px;
}

.customPopupField {
  display: grid;
  grid-template-columns: minmax(88px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(7, 0, 80, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.74);
}

.customPopup .customPopupFieldName,
.customPopup .parcelPopupFieldName {
  min-width: 0;
  color: rgba(7, 0, 80, 0.68);
  font-size: 11px;
  font-weight: 700 !important;
  overflow-wrap: anywhere;
}

.customPopup .customPopupFieldValue,
.customPopup .parcelPopupFieldValue {
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400 !important;
  overflow-wrap: anywhere;
}

.customPopupEmpty {
  margin: 0;
  color: rgba(7, 0, 80, 0.68);
  font-size: 11px;
  font-weight: 400;
}

.parcelPopupAttachments {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.parcelPopupAttachmentsTitle {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.parcelPopupAttachments .customPopupLink {
  justify-content: flex-start;
  text-align: left;
}

.parcelPopupAttachments .customPopupLink:hover,
.parcelPopupAttachments .customPopupLink:focus {
  background: var(--widget-bg-hover);
}

.customPopup.isPopupDragging,
.customPopup.isPopupDragging * {
  cursor: move !important;
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .toolPanel {
    width: min(var(--tool-panel-width), calc(100vw - 20px));
    width: min(var(--tool-panel-width), calc(100dvw - 20px));
  }
}

@container tool-panel (max-width: 310px) {
  .panelTop {
    gap: 8px;
    padding: 12px;
  }

  .panelTitleRow {
    gap: 6px;
    flex-wrap: wrap;
  }

  .sectionHeader {
    padding-inline: 10px;
  }

  .checkGrid,
  .checkGrid.compact,
  .linkRow {
    grid-template-columns: 1fr;
  }

  .rangeInputs {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #areaUnitLabel {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

body.isPopupDragging {
  user-select: none;
}

body.isPanelResizing,
body.isPanelResizing * {
  cursor: ew-resize !important;
  user-select: none;
}

.esri-popup {
  display: none !important;
}

.esri-attribution,
.esri-attribution__sources,
.esri-attribution__powered-by,
.esri-ui .esri-attribution {
  display: none !important;
}

.esri-ui {
  --calcite-color-brand: var(--accent);
  --calcite-color-brand-hover: var(--ink);
  --calcite-color-border-1: rgba(7, 0, 80, 0.18);
  --calcite-font-family: var(--app-font);
  --calcite-font-family-base: var(--app-font);
  --calcite-font-family-heading: var(--app-font);
  --calcite-sans-family: var(--app-font);
  --calcite-color-foreground-1: var(--widget-bg);
  --calcite-color-foreground-2: #f4f6fb;
  --calcite-color-foreground-3: #e8edf7;
  --calcite-color-text-1: var(--ink);
  --calcite-color-text-2: var(--ink);
  --calcite-ui-brand: var(--accent);
  --calcite-ui-foreground-1: var(--widget-bg);
  --calcite-ui-foreground-2: #f4f6fb;
  --calcite-ui-text-1: var(--ink);
}

.esri-ui,
.esri-ui-corner,
.esri-ui-inner-container,
.esri-ui-top-left,
.esri-ui-bottom-left {
  overflow: visible !important;
}

.sceneWidgetRail {
  position: fixed;
  z-index: 10;
  left: 12px;
  right: auto;
  bottom: 12px;
  max-width: calc(100vw - 24px);
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  overflow: visible;
  pointer-events: auto;
}

.sceneWidgetRail[hidden],
body.isSignedOut .sceneWidgetRail,
body.isSams2d .sceneWidgetRail,
body.isCustomApp .sceneWidgetRail {
  display: none !important;
}

.sceneWidgetRail > * {
  position: static !important;
  margin: 0 !important;
}

#viewDiv .esri-ui-top-left.esri-ui-corner,
.esri-ui .esri-ui-top-left.esri-ui-corner,
.esri-ui-top-left.esri-ui-corner {
  position: fixed !important;
  top: calc(var(--brand-bar-height) + 4px) !important;
  left: 4px !important;
  z-index: 9 !important;
}

.esri-ui-bottom-left {
  left: 4px !important;
}

.esri-ui .esri-component.esri-widget,
.sceneWidgetRail .esri-component.esri-widget,
.esri-ui .esri-widget--button,
.sceneWidgetRail .esri-widget--button,
.esri-ui .esri-button,
.sceneWidgetRail .esri-button,
.esri-ui button,
.sceneWidgetRail button,
.esri-ui [role="button"],
.sceneWidgetRail [role="button"],
.esri-ui calcite-action,
.sceneWidgetRail calcite-action,
.esri-ui calcite-button {
  font-family: var(--app-font) !important;
  border: 1px solid rgba(7, 0, 80, 0.16);
  background-color: var(--widget-bg) !important;
  color: var(--ink) !important;
  box-shadow: 0 10px 24px rgba(7, 0, 80, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}

.esri-ui .esri-component.esri-widget:not(.esri-expand) {
  overflow: hidden;
  border-radius: 8px;
}

.sceneWidgetRail .esri-component.esri-widget:not(.esri-expand) {
  overflow: hidden;
  border-radius: 8px;
}

.basemapControl {
  position: relative;
  overflow: visible !important;
}

.basemapToggle {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
}

.undergroundSceneToggle {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.undergroundSceneToggle.isActive {
  border-color: #06d7bb !important;
  background-color: var(--active-button-bg) !important;
  box-shadow: 0 10px 24px rgba(7, 0, 80, 0.14), inset 0 -2px 0 #06d7bb;
}

.undergroundSceneIcon {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
}

.undergroundSceneIcon::before,
.undergroundSceneIcon::after {
  content: "";
  position: absolute;
  display: block;
}

.undergroundSceneIcon::before {
  left: 2px;
  right: 2px;
  bottom: 4px;
  height: 0;
  border-top: 2px solid currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.undergroundSceneIcon::after {
  left: 7px;
  top: 2px;
  width: 5px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.basemapPanel {
  position: fixed;
  top: auto;
  left: 12px;
  bottom: 58px;
  width: min(360px, calc(100vw - 58px));
  max-height: min(520px, calc(100vh - var(--top-offset) - 78px));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 8px;
  background: var(--widget-bg);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(7, 0, 80, 0.2);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}

.basemapGalleryMount,
.basemapGalleryMount .esri-basemap-gallery,
.basemapGalleryMount .esri-basemap-gallery.esri-widget,
.basemapGalleryMount .esri-basemap-gallery.esri-widget--panel {
  width: 100% !important;
  min-width: 0;
  max-height: none;
}

.esri-ui .esri-expand,
.esri-ui .esri-expand__container,
.esri-ui .esri-expand__panel,
.esri-ui .esri-expand__panel-container {
  overflow: visible !important;
}

.esri-ui .esri-expand.esri-expand--expanded,
.esri-ui .esri-expand--expanded .esri-expand__container,
.esri-ui .esri-expand--expanded .esri-expand__panel,
.esri-ui .esri-expand--expanded .esri-expand__panel-container {
  width: min(360px, calc(100vw - 48px)) !important;
  min-width: min(320px, calc(100vw - 48px)) !important;
  max-width: min(360px, calc(100vw - 48px)) !important;
}

.esri-ui .esri-expand__content {
  width: min(360px, calc(100vw - 48px)) !important;
  min-width: min(320px, calc(100vw - 48px)) !important;
  inline-size: min(360px, calc(100vw - 48px)) !important;
  max-height: min(520px, calc(100vh - var(--top-offset) - 48px));
  overflow: auto;
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 8px;
  background: var(--widget-bg);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(7, 0, 80, 0.2);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}

.esri-ui .esri-expand__content.esri-widget,
.esri-ui .esri-expand__content--expanded,
.esri-ui .esri-basemap-gallery,
.esri-ui .esri-basemap-gallery.esri-widget,
.esri-ui .esri-basemap-gallery.esri-widget--panel {
  width: 100% !important;
  min-width: 0;
  max-height: inherit;
  background: transparent;
}

.esri-ui .esri-basemap-gallery__item-container,
.esri-ui .esri-basemap-gallery__item {
  width: 100%;
  min-width: 0;
}

.esri-ui .esri-widget--button {
  min-width: 32px;
  min-height: 32px;
  border-radius: 6px;
}

.esri-ui .esri-zoom .esri-widget--button,
.sceneWidgetRail .esri-zoom .esri-widget--button,
.esri-ui .esri-navigation-toggle .esri-widget--button,
.sceneWidgetRail .esri-navigation-toggle .esri-widget--button,
.esri-ui .esri-navigation-toggle__button,
.sceneWidgetRail .esri-navigation-toggle__button {
  border: 0;
  border-radius: 0;
  background-color: var(--widget-bg) !important;
  box-shadow: none;
}

.sceneWidgetRail .esri-zoom,
.sceneWidgetRail .esri-navigation-toggle {
  display: flex;
  flex-direction: row;
}

.esri-ui .esri-zoom .esri-widget--button + .esri-widget--button,
.esri-ui .esri-navigation-toggle .esri-widget--button + .esri-widget--button {
  border-top: 1px solid rgba(7, 0, 80, 0.12);
}

.sceneWidgetRail .esri-zoom .esri-widget--button + .esri-widget--button,
.sceneWidgetRail .esri-navigation-toggle .esri-widget--button + .esri-widget--button,
.sceneWidgetRail .esri-navigation-toggle__button + .esri-navigation-toggle__button {
  border-top: 0;
  border-left: 1px solid rgba(7, 0, 80, 0.12);
}

.esri-ui .esri-widget--button:hover,
.sceneWidgetRail .esri-widget--button:hover,
.esri-ui .esri-widget--button:focus,
.sceneWidgetRail .esri-widget--button:focus,
.esri-ui .esri-button:hover,
.sceneWidgetRail .esri-button:hover,
.esri-ui .esri-button:focus,
.sceneWidgetRail .esri-button:focus,
.esri-ui button:hover,
.sceneWidgetRail button:hover,
.esri-ui button:focus,
.sceneWidgetRail button:focus,
.esri-ui [role="button"]:hover,
.sceneWidgetRail [role="button"]:hover,
.esri-ui [role="button"]:focus,
.sceneWidgetRail [role="button"]:focus,
.esri-ui .esri-navigation-toggle__button--active,
.sceneWidgetRail .esri-navigation-toggle__button--active,
.esri-ui calcite-action:hover,
.sceneWidgetRail calcite-action:hover,
.esri-ui calcite-button:hover {
  background-color: var(--widget-bg-hover) !important;
  color: var(--ink) !important;
}

.esri-ui .esri-navigation-toggle__button--active,
.sceneWidgetRail .esri-navigation-toggle__button--active {
  background-color: var(--active-button-bg) !important;
  color: var(--ink) !important;
}

.esri-ui calcite-action::part(button),
.sceneWidgetRail calcite-action::part(button),
.esri-ui calcite-action::part(container),
.sceneWidgetRail calcite-action::part(container),
.esri-ui calcite-button::part(button) {
  font-family: var(--app-font);
  background-color: var(--widget-bg) !important;
  color: var(--ink) !important;
  border-color: rgba(7, 0, 80, 0.16);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}

arcgis-zoom,
arcgis-navigation-toggle,
arcgis-compass,
arcgis-home,
arcgis-locate,
arcgis-fullscreen,
arcgis-expand,
calcite-action,
calcite-action-pad,
calcite-action-bar,
calcite-button {
  --calcite-font-family: var(--app-font);
  --calcite-font-family-base: var(--app-font);
  --calcite-font-family-heading: var(--app-font);
  --calcite-sans-family: var(--app-font);
  --calcite-color-foreground-1: var(--widget-bg);
  --calcite-color-foreground-2: #f4f6fb;
  --calcite-color-foreground-3: #e8edf7;
  --calcite-color-border-1: rgba(7, 0, 80, 0.16);
  --calcite-color-text-1: var(--ink);
  --calcite-color-text-2: var(--ink);
  --calcite-action-background-color: var(--widget-bg);
  --calcite-action-background-color-hover: var(--widget-bg-hover);
  --calcite-action-background-color-press: var(--widget-bg-press);
  --calcite-action-text-color: var(--ink);
  --calcite-action-text-color-hover: var(--ink);
  font-family: var(--app-font);
  color: var(--ink);
}

arcgis-zoom::part(container),
arcgis-navigation-toggle::part(container),
arcgis-compass::part(container),
arcgis-home::part(container),
arcgis-locate::part(container),
arcgis-fullscreen::part(container),
arcgis-expand::part(container),
calcite-action-pad::part(container),
calcite-action-bar::part(container) {
  border: 1px solid rgba(7, 0, 80, 0.16);
  border-radius: 8px;
  background-color: var(--widget-bg);
  box-shadow: 0 10px 24px rgba(7, 0, 80, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}

.esri-icon,
.esri-collapse__icon,
.esri-widget__heading,
.esri-widget--button .esri-icon,
.esri-navigation-toggle__button .esri-icon {
  color: var(--ink) !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}

@media (max-width: 720px) {
  .brandBar {
    gap: 8px;
    padding: 0 10px;
  }

  .brandLogo {
    max-width: min(130px, 36vw);
  }

  .accountButton {
    max-width: calc(100vw - 164px);
    padding-right: 9px;
  }

  .customAppsMenu {
    margin-left: 0;
  }

  .appModeButtons {
    gap: 4px;
  }

  .appModeButton {
    padding: 0 8px;
    font-size: 11px;
  }

  .headerMenuButton span:first-child {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settingsActionGrid,
  .customAppEditorRow {
    grid-template-columns: 1fr;
  }

  .customAppRemoveButton {
    width: 100%;
  }

  .toolPanel {
    top: var(--top-offset);
    left: auto;
    right: 0;
    bottom: 0;
    width: min(var(--tool-panel-width), calc(100vw - 12px));
    width: min(var(--tool-panel-width), calc(100dvw - 12px));
    max-height: none;
    border-radius: 0;
  }

  .toolPanel.isCollapsed {
    transform: translateX(calc(100% - 52px));
  }

  .toolPanel.isCollapsed .iconButton {
    left: 9px;
    right: auto;
    top: 12px;
  }

  .panelTop {
    padding: 12px 14px;
  }

  .tabBar {
    padding: 8px 10px;
  }

  .panelPage {
    padding: 10px;
  }

  .checkGrid {
    grid-template-columns: 1fr;
  }

  .linkRow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .brandBar {
    overflow: visible;
  }

  .brandLogo {
    max-width: min(150px, 34vw);
  }

  .appTitle {
    flex: 1 1 auto;
    font-size: 14px;
  }

  .headerControlsToggle {
    flex: 0 0 auto;
    display: inline-flex;
    margin-left: auto;
  }

  .headerControls {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    width: min(370px, calc(100vw - 24px));
    max-height: min(540px, calc(100vh - var(--brand-bar-height) - 18px));
    max-height: min(540px, calc(100dvh - var(--brand-bar-height) - 18px));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(7, 0, 80, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(7, 0, 80, 0.2);
    overflow: auto;
    -webkit-backdrop-filter: blur(16px) saturate(115%);
    backdrop-filter: blur(16px) saturate(115%);
  }

  .headerNavControls {
    order: 1;
    position: static;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .brandBar.isHeaderMenuOpen .headerControls {
    display: flex;
  }

  .headerControls .customAppsMenu {
    order: 2;
    width: 100%;
    margin-left: 0;
  }

  .headerControls .appModeButtons {
    order: 1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .headerControls .accountMenu {
    order: 99;
    position: static;
    transform: none;
    width: 100%;
    margin: 4px 0 0;
    padding-top: 10px;
    border-top: 1px solid rgba(7, 0, 80, 0.14);
  }

  .headerControls .headerMenuButton,
  .headerControls .appModeButton,
  .headerControls .accountButton {
    width: 100%;
    max-width: none;
  }

  .headerControls .headerMenuButton,
  .headerControls .appModeButton {
    justify-content: center;
  }

  .headerControls .accountButton {
    justify-content: flex-start;
  }

  .headerControls .headerMenuButton span:first-child,
  .headerControls .accountButtonLabel {
    max-width: none;
  }

  .headerControls .headerMenuDropdown,
  .headerControls .accountDropdown {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: none;
    margin-top: 8px;
    box-shadow: none;
  }

  .toolPanel {
    top: 40vh;
    top: 40dvh;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    width: 100dvw;
    height: auto;
    max-height: 60vh;
    max-height: 60dvh;
    border-radius: 12px 12px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    transform: translateY(0);
  }

  .toolPanelResizeHandle {
    display: none;
  }

  .toolPanel.isCollapsed {
    transform: translateY(0);
  }

  .toolPanel .panelTop,
  .toolPanel.isCollapsed .panelTop {
    display: none;
  }

  .toolPanel.isCollapsed .iconButton,
  .toolPanel .iconButton {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    margin: 0 auto;
  }

  .toolPanel.isCollapsed .tabBar,
  .toolPanel.isCollapsed .panelPage {
    opacity: 1;
    pointer-events: auto;
  }

  .tabBar {
    padding: 8px 10px;
  }

  .panelPage {
    padding: 10px;
  }

  body:not(.isSignedOut):not(.isSams2d):not(.isCustomApp) #viewDiv,
  body:not(.isSignedOut):not(.isSams2d):not(.isCustomApp) .masterPlanHighlightOverlay {
    top: var(--top-offset);
    bottom: 60vh;
    bottom: 60dvh;
    height: auto;
  }

  .sceneWidgetRail {
    top: calc(var(--top-offset) + 10px);
    left: 10px;
    right: auto;
    bottom: auto;
    max-width: none;
    max-height: calc(100vh - var(--top-offset) - 20px);
    max-height: calc(100dvh - var(--top-offset) - 20px);
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  body:not(.isSignedOut):not(.isSams2d):not(.isCustomApp) .sceneWidgetRail,
  body:not(.isSignedOut):not(.isSams2d):not(.isCustomApp) #viewDiv .esri-ui-top-left,
  body:not(.isSignedOut):not(.isSams2d):not(.isCustomApp) #viewDiv .esri-ui-top-right,
  body:not(.isSignedOut):not(.isSams2d):not(.isCustomApp) #viewDiv .esri-ui-bottom-left,
  body:not(.isSignedOut):not(.isSams2d):not(.isCustomApp) #viewDiv .esri-ui-bottom-right {
    display: none !important;
  }

  .sceneWidgetRail .esri-zoom,
  .sceneWidgetRail .esri-navigation-toggle {
    flex-direction: column;
  }

  .sceneWidgetRail .esri-zoom .esri-widget--button + .esri-widget--button,
  .sceneWidgetRail .esri-navigation-toggle .esri-widget--button + .esri-widget--button,
  .sceneWidgetRail .esri-navigation-toggle__button + .esri-navigation-toggle__button {
    border-left: 0;
    border-top: 1px solid rgba(7, 0, 80, 0.12);
  }

  .basemapPanel {
    top: calc(var(--top-offset) + 10px);
    left: 56px;
    bottom: auto;
    width: min(330px, calc(100vw - 68px));
    max-height: min(420px, calc(100vh - var(--top-offset) - 24px));
    max-height: min(420px, calc(100dvh - var(--top-offset) - 24px));
  }

  .customPopup {
    top: 40vh;
    top: 40dvh;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    width: 100dvw;
    height: 60vh;
    height: 60dvh;
    max-height: 60vh;
    max-height: 60dvh;
    border-radius: 12px 12px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .customPopupHeader {
    min-height: auto;
    height: auto;
    align-items: start;
    padding: 12px 14px;
    cursor: default;
    touch-action: auto;
  }

  .customPopupHeading {
    min-width: 0;
    overflow: visible;
  }

  #customPopupEyebrow,
  #customPopupTitle {
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .customPopupClose {
    align-self: start;
  }
}

@media (max-width: 980px) {
  :root {
    --brand-bar-height: 70px;
  }

  body {
    font-size: 105%;
  }

  #appShell :where(div, button, input, select, option, textarea, label, span, p, h1, h2, h3, h4, h5, h6, a, li, td, th, strong, small),
  .statusPanel :where(div, button, span, p, h1, h2, h3, h4, h5, h6, a, strong, small),
  .customPopup :where(div, button, span, p, h1, h2, h3, h4, h5, h6, a, strong, small),
  .esri-popup :where(:not(.esri-icon):not([class*="esri-icon"])),
  .esri-widget :where(:not(.esri-icon):not([class*="esri-icon"])) {
    font-size: 17px !important;
    line-height: 1.2;
  }

  #appShell :where(button, input, select, textarea) {
    min-height: 44px;
  }

  #appShell :where(input, select, textarea) {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  #appShell .landingPageTitleMain {
    font-size: clamp(20px, 6vw, 30px) !important;
  }

  #appShell .landingPageTitleSub {
    font-size: clamp(44px, 14vw, 58px) !important;
  }

  .landingPagePerformance {
    font-size: clamp(15px, 4.5vw, 18px) !important;
  }

  .masterPlanDmLabel {
    font-size: 27px !important;
  }

  .appTitle {
    font-size: 24px !important;
  }

  .settingsDialogHeader h2,
  .panelTop h1 {
    font-size: 23px !important;
  }

  .eyebrow,
  .titleLinkButton,
  #statusTitle,
  #customPopupTitle,
  .accountButton.isSignedIn .accountButtonLabel {
    font-size: 20px !important;
  }

  .customAppTitle,
  .settingsSection h3,
  .legendTitle,
  .sectionToggle::before {
    font-size: 18px !important;
  }

  .headerMenuChevron,
  .accountChevron,
  .iconButton,
  .customPopupClose {
    font-size: 27px !important;
  }

  .customAppCardImage,
  .settingsCloseButton {
    font-size: 30px !important;
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .landingPageTitle {
    width: min(94vw, 760px);
  }

  #appShell .landingPageTitleMain {
    font-size: clamp(26px, 3.4vw, 30px) !important;
  }
}

@media (min-width: 650px) and (max-width: 950px) {
  #appShell .landingPageTitleMain {
    font-size: clamp(26px, 3.4vw, 30px) !important;
  }
}

@media (max-width: 720px) {
  .landingPagePerformance {
    font-size: clamp(15px, 4.5vw, 18px) !important;
  }
}

@media (max-width: 980px) {
  .toolPanel .panelTop,
  .toolPanel.isCollapsed .panelTop {
    order: 99;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid rgba(7, 0, 80, 0.14);
    border-bottom: 0;
    border-radius: 0;
    background: var(--panel-strong);
  }

  .toolPanel .panelTop::after {
    display: none;
  }

  .toolPanel.isCollapsed .panelTop > div,
  .toolPanel.isCollapsed .panelClearButton {
    opacity: 1;
    pointer-events: auto;
  }

  .toolPanel .panelTop > .iconButton,
  .toolPanel.isCollapsed .panelTop > .iconButton {
    display: none;
  }

  .panelExportMenu {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .panelExportButton {
    width: 100%;
    justify-content: center;
  }

  .panelClearButton {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .panelExportDropdown {
    top: auto;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 980px) {
  .bimModelModal {
    padding: 12px;
    place-items: center;
  }

  .bimModelModalPanel {
    width: min(460px, calc(100vw - 24px));
    width: min(460px, calc(100dvw - 24px));
    max-height: min(680px, calc(100vh - 24px));
    max-height: min(680px, calc(100dvh - 24px));
  }

  .bimModelModalHeader {
    gap: 8px;
    padding: 10px 12px;
  }

  .bimModelModalHeader h2 {
    font-size: 13px !important;
  }

  .bimModelModalActions {
    gap: 6px;
  }

  .bimModelModalClose,
  .bimModelHeaderDelete {
    min-height: 30px !important;
    font-size: 11px !important;
  }

  .bimModelList {
    gap: 8px;
    padding: 10px;
  }

  .bimModelCard {
    grid-template-columns: 18px 66px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 8px;
    align-items: center;
    min-height: 0;
    padding: 8px;
  }

  .bimModelSelectBox {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 18px;
    min-height: 0;
  }

  .bimModelSelectBox input[type="checkbox"] {
    width: 11px;
    height: 11px;
    min-width: 11px;
    min-height: 11px;
  }

  .bimModelThumb {
    grid-column: 2;
    grid-row: 1;
    width: 66px;
    height: 48px;
    font-size: 11px;
  }

  .bimModelInfo {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
  }

  .bimModelName {
    margin-bottom: 3px;
    font-size: 11px !important;
    line-height: 1.15;
  }

  .bimModelMeta {
    font-size: 10px !important;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .bimModelCardActions {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-content: flex-end;
    gap: 6px;
  }

  .bimModelOpenButton {
    min-height: 30px !important;
    padding: 0 12px;
    font-size: 11px !important;
  }

  .statusPanel {
    left: 50%;
    top: max(calc(var(--top-offset) + 16px), 25dvh);
    width: min(360px, calc(100vw - 24px));
    width: min(360px, calc(100dvw - 24px));
    max-height: calc(40dvh - var(--top-offset) - 20px);
    overflow: auto;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 980px) {
  .appTitle {
    flex: 0 0 auto;
    overflow: visible;
    text-overflow: clip;
  }

  #appShell .appTitleFull {
    display: none !important;
  }

  #appShell .appTitleMobile {
    display: inline-block;
    color: rgb(7, 0, 80);
    font-size: 24px !important;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
  }
}

@media (max-width: 980px) {
  html.isBimViewerRoot,
  html.isBimViewerRoot body,
  html.isSams2dRoot,
  html.isSams2dRoot body {
    position: fixed;
    inset: 0;
    width: var(--sams-viewport-width, 100vw);
    max-width: var(--sams-viewport-width, 100vw);
    height: 100vh;
    height: 100dvh;
    height: 100svh;
    height: var(--sams-viewport-height, 100dvh);
    min-height: 100vh;
    min-height: 100dvh;
    min-height: 100svh;
    min-height: var(--sams-viewport-height, 100dvh);
    max-height: 100vh;
    max-height: 100dvh;
    max-height: 100svh;
    max-height: var(--sams-viewport-height, 100dvh);
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  body.isBimViewer #appShell,
  body.isSams2d #appShell {
    position: fixed;
    inset: 0;
    width: 100vw;
    width: 100dvw;
    width: var(--sams-viewport-width, 100dvw);
    max-width: 100vw;
    max-width: 100dvw;
    max-width: var(--sams-viewport-width, 100dvw);
    height: 100vh;
    height: 100dvh;
    height: 100svh;
    height: var(--sams-viewport-height, 100dvh);
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
    max-height: 100svh;
    max-height: var(--sams-viewport-height, 100dvh);
    overflow: hidden !important;
  }

  body.isSams2d .sams2dHost {
    position: fixed;
    top: var(--top-offset);
    left: 0;
    right: 0;
    bottom: 0;
    inset: var(--top-offset) 0 0 0;
    width: 100vw;
    width: 100dvw;
    width: var(--sams-viewport-width, 100dvw);
    max-width: 100vw;
    max-width: 100dvw;
    max-width: var(--sams-viewport-width, 100dvw);
    height: calc(100vh - var(--top-offset));
    height: calc(100dvh - var(--top-offset));
    height: calc(100svh - var(--top-offset));
    height: calc(var(--sams-viewport-height, 100dvh) - var(--top-offset));
    max-height: calc(100vh - var(--top-offset));
    max-height: calc(100dvh - var(--top-offset));
    max-height: calc(100svh - var(--top-offset));
    max-height: calc(var(--sams-viewport-height, 100dvh) - var(--top-offset));
    overflow: hidden !important;
    overflow-clip-margin: 0;
    contain: size layout paint;
  }

  body.isSams2d .sams2dHost iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    border: 0;
    overflow: hidden;
  }

  body.isBimViewer .bimViewerHost {
    position: fixed;
    top: var(--top-offset);
    left: 0;
    right: 0;
    bottom: 0;
    inset: var(--top-offset) 0 0 0;
    width: 100vw;
    width: 100dvw;
    width: var(--sams-viewport-width, 100dvw);
    max-width: 100vw;
    max-width: 100dvw;
    max-width: var(--sams-viewport-width, 100dvw);
    height: calc(100vh - var(--top-offset));
    height: calc(100dvh - var(--top-offset));
    height: calc(100svh - var(--top-offset));
    height: calc(var(--sams-viewport-height, 100dvh) - var(--top-offset));
    max-height: calc(100vh - var(--top-offset));
    max-height: calc(100dvh - var(--top-offset));
    max-height: calc(100svh - var(--top-offset));
    max-height: calc(var(--sams-viewport-height, 100dvh) - var(--top-offset));
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 40%) minmax(0, 36%) minmax(0, 24%);
    overflow: hidden !important;
    contain: size layout paint;
  }

  body.isBimViewer .bimMain,
  body.isBimViewer .bimSidebar,
  body.isBimViewer .bimProperties {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.isBimViewer .bimMain {
    grid-row: 1;
  }

  body.isBimViewer .bimSidebar {
    grid-row: 2;
  }

  body.isBimViewer .bimProperties {
    grid-row: 3;
  }
}
