* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #f8f9fa;
}

.app-shell {
  height: 100%;
}

.app-shell > .row {
  height: 100%;
}

.app-shell > .row > [class*="col-"] {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.map-frame {
  overflow: hidden;
  min-height: 680px;
  height: 100%;
  flex: 1 1 auto;
  background: #e9ecef;
  border: 1px solid #dee2e6;
}

.map-canvas {
  width: 100%;
  height: 100%;
  min-height: inherit;
}


.sidebar-stack {
  display: grid;
  gap: 1rem;
  max-height: calc(100dvh - 2rem);
}

.sidebar-stack > .card:first-child {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sidebar-stack > .card:first-child > div:last-child {
  flex: 1 1 auto;
  min-height: 0;
}

[data-role="buildings-list"] {
  overflow-y: auto;
  max-height: 100%;
  min-height: 0;
  padding-right: 0.25rem;
}

.edit-sidebar-card {
  display: none;
}

.edit-sidebar-card.is-visible {
  display: block;
}

.add-level-panel {
  display: none;
}

.add-level-panel.is-visible {
  display: block;
}

.section-title {
  font-size: 0.875rem;
  color: #6c757d;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #e9ecef;
  color: #495057;
  font-size: 0.85rem;
}

.building-list-item {
  cursor: pointer;
  border: 1px solid #dee2e6;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.building-list-item:hover,
.building-list-item.active {
  border-color: #adb5bd;
  background: #f8f9fa;
}

.hint-text {
  color: #6c757d;
  font-size: 0.92rem;
}

@media (max-width: 991px) {
  .map-frame,
  .map-canvas {
    min-height: 520px;
  }
}
