.airspace-page {
  --airspace-blue: #087cf0;
  --airspace-ink: #202733;
  --airspace-muted: #7d8796;
  --airspace-line: #e6eaf0;
  --airspace-surface: #fff;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.airspace-page.prototype-page .management-results {
  flex: 1 1 auto;
  min-height: 0;
}

.airspace-page .prototype-tabs {
  z-index: 2;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 0 8px;
  gap: 42px;
  border-bottom: 1px solid #dfe4eb;
  background: var(--airspace-surface);
}

.airspace-page .prototype-tabs button {
  height: 58px;
  padding: 0 2px;
  color: #303846;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
}

.airspace-page .prototype-tabs button.active {
  color: var(--airspace-blue);
  font-weight: 650;
}

.airspace-page .prototype-tabs button.active::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--airspace-blue);
}

.airspace-page .airspace-workspace {
  position: relative;
  flex: 1;
  min-height: 0;
  height: auto;
  overflow: hidden;
  background: #d6dde2;
}

.airspace-page .airspace-workspace > .map-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.airspace-page .airspace-workspace.is-editing > .map-scene {
  cursor: crosshair;
}

.airspace-page .airspace-tree {
  position: absolute;
  z-index: 505;
  top: 10px;
  bottom: 10px;
  left: 10px;
  width: 250px;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #d9dee6;
  border-radius: 2px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 2px 9px rgba(21, 37, 54, .14);
  color: var(--airspace-ink);
}

.airspace-page .tree-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.airspace-page .airspace-search {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  height: 32px;
  overflow: hidden;
  border: 1px solid #cfd5dd;
  border-radius: 16px;
  background: #f8fafc;
  color: #8b95a2;
}

.airspace-page .airspace-search > span {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 17px;
  transform: rotate(-20deg);
}

.airspace-page .airspace-search input {
  width: 100%;
  min-width: 0;
  height: 30px;
  min-height: 0;
  padding: 0 8px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--airspace-ink);
  font-size: 12px;
}

.airspace-page .airspace-add-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--airspace-blue);
  border-radius: 3px;
  background: var(--airspace-blue);
  color: #fff;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.airspace-page .airspace-tree > select {
  width: 100%;
  height: 32px;
  min-height: 0;
  margin: 0 0 12px;
  padding: 0 29px 0 10px;
  border: 1px solid #d5dae1;
  border-radius: 3px;
  background: #fff;
  color: #4f5968;
  font-size: 12px;
}

.airspace-page .airspace-tree h4 {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  margin: 0;
  padding: 0 4px;
  border-top: 1px solid #edf0f4;
  border-bottom: 1px solid #edf0f4;
  font-size: 13px;
  font-weight: 600;
}

.airspace-page .airspace-tree-list {
  height: calc(100% - 132px);
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.airspace-page .airspace-tree-item {
  position: relative;
  min-height: 48px;
  padding: 13px 58px 10px 6px;
  border-bottom: 1px solid #edf0f4;
  transition: background .16s ease, color .16s ease;
}

.airspace-page .airspace-tree-item:hover,
.airspace-page .airspace-tree-item.active {
  background: #f1f7ff;
}

.airspace-page .airspace-tree-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
}

.airspace-page .airspace-tree-check input {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  accent-color: var(--airspace-blue);
}

.airspace-page .airspace-tree-check span {
  min-width: 0;
  overflow: hidden;
  color: #303846;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.airspace-page .airspace-tree-meta {
  display: block;
  margin: 5px 0 0 23px;
  color: #9aa3af;
  font-size: 10px;
}

.airspace-page .airspace-tree-actions {
  position: absolute;
  top: 8px;
  right: 2px;
  display: flex;
  gap: 2px;
}

.airspace-page .airspace-tree-actions button {
  position: relative;
  width: 25px;
  height: 29px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: transparent;
  font-size: 0;
  cursor: pointer;
}

.airspace-page .airspace-tree-actions button::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #677282;
  font-size: 15px;
}

.airspace-page .airspace-tree-actions button:first-child::before {
  content: "✎";
}

.airspace-page .airspace-tree-actions button:last-child::before {
  content: "⌫";
}

.airspace-page .airspace-tree-actions button:hover::before,
.airspace-page .airspace-tree-actions button:focus-visible::before {
  color: var(--airspace-blue);
  background: #e7f2ff;
}

.airspace-page .airspace-tree .scene-preview {
  height: 96px;
  margin: 9px -50px 0 23px;
}

.airspace-page .airspace-tree .feature-empty {
  margin: 0;
  padding: 32px 8px;
  color: #929ba8;
  font-size: 12px;
  text-align: center;
}

.airspace-page .airspace-form-panel {
  position: absolute;
  z-index: 510;
  top: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  width: clamp(338px, 28vw, 390px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid #d9dee6;
  border-radius: 2px;
  background: var(--airspace-surface);
  box-shadow: 0 4px 18px rgba(16, 33, 50, .22);
  color: var(--airspace-ink);
  animation: airspace-panel-enter .18s ease-out both;
}

@keyframes airspace-panel-enter {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}

.airspace-page .airspace-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 52px;
  gap: 12px;
  padding: 7px 12px 7px 18px;
  border-bottom: 1px solid var(--airspace-line);
  background: #fff;
}

.airspace-page .airspace-panel-heading > div {
  flex: 1;
  padding-left: 30px;
  text-align: center;
}

.airspace-page .airspace-panel-heading h2 {
  margin: 0;
  color: #1f2834;
  font-size: 16px;
  font-weight: 650;
  line-height: 20px;
}

.airspace-page .airspace-panel-heading small {
  display: none;
}

.airspace-page .airspace-panel-close {
  width: 30px;
  height: 30px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #3c4654;
  font-size: 22px;
  font-weight: 300;
  cursor: pointer;
}

.airspace-page .airspace-panel-close:hover,
.airspace-page .airspace-panel-close:focus-visible {
  background: #f0f3f6;
}

.airspace-page .airspace-inline-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.airspace-page .airspace-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.airspace-page .airspace-form-section {
  padding: 14px 18px 15px;
  border-bottom: 1px solid var(--airspace-line);
}

.airspace-page .airspace-form-section h3 {
  position: relative;
  margin: 0 0 13px;
  padding-left: 15px;
  color: #303846;
  font-size: 14px;
  font-weight: 650;
}

.airspace-page .airspace-form-section h3::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #242b34;
  transform: translateY(-50%);
}

.airspace-page .airspace-form-basics {
  display: grid;
  gap: 10px;
}

.airspace-page .airspace-form-basics > label,
.airspace-page .airspace-time-grid > label,
.airspace-page .airspace-coordinate > label {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #566171;
  font-size: 12px;
}

.airspace-page .airspace-form-panel input:not([type="checkbox"]),
.airspace-page .airspace-form-panel select,
.airspace-page .airspace-form-panel textarea {
  width: 100%;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 2px;
  outline: 0;
  background: #f4f6f8;
  color: #313a47;
  font-size: 12px;
  line-height: 20px;
}

.airspace-page .airspace-form-panel input:not([type="checkbox"]):hover,
.airspace-page .airspace-form-panel select:hover,
.airspace-page .airspace-form-panel textarea:hover {
  border-color: #c7d0dc;
}

.airspace-page .airspace-form-panel input:not([type="checkbox"]):focus,
.airspace-page .airspace-form-panel select:focus,
.airspace-page .airspace-form-panel textarea:focus {
  border-color: #4096ff;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, .12);
}

.airspace-page .airspace-status-field {
  display: grid;
  grid-template-columns: 78px 32px 1fr;
  align-items: center;
  gap: 8px;
  color: #566171;
  font-size: 12px;
}

.airspace-page .airspace-status-field em {
  color: #7d8795;
  font-style: normal;
}

.airspace-page .airspace-switch {
  position: relative;
  width: 30px;
  height: 16px;
  min-height: 0;
  margin: 0;
  appearance: none;
  border-radius: 10px;
  outline: 0;
  background: #c2c8d0;
  cursor: pointer;
  transition: background .15s ease;
}

.airspace-page .airspace-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .15s ease;
}

.airspace-page .airspace-switch:checked {
  background: #29313c;
}

.airspace-page .airspace-switch:checked::before {
  transform: translateX(14px);
}

.airspace-page .airspace-time-grid {
  display: grid;
  gap: 9px;
}

.airspace-page .airspace-height-field {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 14px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: #566171;
  font-size: 12px;
}

.airspace-page .airspace-height-field b {
  color: #8993a0;
  font-weight: 400;
  text-align: center;
}

.airspace-page .airspace-region-info dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 12px;
}

.airspace-page .airspace-region-info dl > div {
  padding: 9px 8px;
  border: 1px solid #e7ebf0;
  background: #f8fafc;
}

.airspace-page .airspace-region-info dt {
  margin: 0 0 5px;
  color: #8b95a2;
  font-size: 10px;
}

.airspace-page .airspace-region-info dd {
  margin: 0;
  overflow: hidden;
  color: #303846;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.airspace-page .airspace-drawing-tools {
  display: flex;
  gap: 8px;
}

.airspace-page .airspace-drawing-tools button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #cbd2da;
  border-radius: 3px;
  background: #fff;
  color: #4f5b69;
  font-size: 11px;
  cursor: pointer;
}

.airspace-page .airspace-drawing-tools button:hover {
  border-color: #4096ff;
  color: var(--airspace-blue);
}

.airspace-page .airspace-drawing-hint {
  margin: 9px 0 0;
  color: #8a94a1;
  font-size: 10px;
  line-height: 1.55;
}

.airspace-page .airspace-coordinate-section {
  padding-top: 5px;
}

.airspace-page .airspace-coordinate {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  padding: 10px 0 12px;
  border-bottom: 1px solid #edf0f4;
}

.airspace-page .airspace-coordinate:last-child {
  border-bottom: 0;
}

.airspace-page .airspace-coordinate-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
}

.airspace-page .airspace-coordinate-title strong {
  color: #4a5564;
  font-size: 12px;
  font-weight: 550;
}

.airspace-page .airspace-coordinate-title button {
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7e8894;
  font-size: 18px;
  cursor: pointer;
}

.airspace-page .airspace-coordinate > label {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 5px;
  font-size: 11px;
}

.airspace-page .airspace-coordinate-empty {
  display: grid;
  place-items: center;
  min-height: 106px;
  color: #a0a8b3;
  text-align: center;
}

.airspace-page .airspace-coordinate-empty span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px dashed #b7c0cb;
  border-radius: 50%;
  font-size: 20px;
}

.airspace-page .airspace-coordinate-empty p {
  margin: 8px 0 0;
  font-size: 11px;
}

.airspace-page .airspace-panel-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 0 0 62px;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--airspace-line);
  background: #fff;
}

.airspace-page .airspace-panel-footer button {
  height: 38px;
  min-height: 0;
  border-radius: 19px;
  font-size: 13px;
  cursor: pointer;
}

.airspace-page .airspace-delete-button,
.airspace-page .airspace-cancel-button {
  border: 1px solid #ff4d4f;
  background: #fff;
  color: #e94143;
}

.airspace-page .airspace-cancel-button {
  border-color: #bfc7d1;
  color: #596473;
}

.airspace-page .airspace-submit-button {
  border: 1px solid var(--airspace-blue);
  background: var(--airspace-blue);
  color: #fff;
}

.airspace-page .airspace-panel-footer button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

@media (max-width: 1180px) {
  .airspace-page .prototype-tabs {
    gap: 28px;
  }

  .airspace-page .airspace-tree {
    width: 225px;
  }

  .airspace-page .airspace-form-panel {
    width: 338px;
  }
}

@media (max-width: 760px) {
  .airspace-page.prototype-page {
    height: 680px !important;
    min-height: 680px !important;
  }

  .airspace-page .prototype-tabs {
    gap: 20px;
    overflow-x: auto;
  }

  .airspace-page .prototype-tabs button {
    flex: 0 0 auto;
    font-size: 13px;
  }

  .airspace-page .airspace-tree {
    right: 10px;
    bottom: auto;
    width: auto;
    max-height: 240px;
  }

  .airspace-page .airspace-tree-list {
    max-height: 100px;
  }

  .airspace-page .airspace-form-panel {
    top: 260px;
    left: 10px;
    width: auto;
  }
}
