.admin-ground-header-actions,
.admin-ground-authoring-actions,
.admin-ground-authoring-row-actions,
.admin-ground-authoring-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-ground-header-actions,
.admin-ground-authoring-heading {
  justify-content: space-between;
}

.admin-ground-authoring-section {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(118, 153, 204, 0.14);
}

.admin-ground-authoring-section h5,
.admin-ground-authoring-subsection h6 {
  margin: 0;
}

.admin-ground-authoring-form,
.admin-ground-authoring-rows {
  display: grid;
  gap: 14px;
}

.admin-ground-authoring-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-ground-authoring-grid--lists {
  margin-top: 14px;
}

.admin-ground-authoring-grid textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-ground-authoring-toggle {
  display: flex;
  align-items: center;
  align-self: end;
  gap: 9px;
  min-height: 42px;
  color: var(--text-strong);
}

.admin-ground-authoring-toggle input {
  width: 18px;
  height: 18px;
}

.admin-ground-authoring-subsection {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(118, 153, 204, 0.12);
}

.admin-ground-authoring-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(140px, 1fr) 90px 80px minmax(170px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid rgba(118, 153, 204, 0.1);
}

.admin-ground-authoring-wide {
  min-width: 0;
}

.admin-ground-authoring-remove {
  align-self: end;
}

.admin-ground-map-editor {
  border-bottom: 1px solid rgba(118, 153, 204, 0.12);
}

.admin-ground-map-editor summary {
  padding: 11px 2px;
  color: var(--text-strong);
  font-weight: 650;
  cursor: pointer;
}

.admin-ground-map-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 4px 0 16px;
}

.admin-ground-map-editor-grid .admin-ground-authoring-wide {
  grid-column: span 2;
}

.admin-ground-authoring-validation {
  display: grid;
  gap: 6px;
}

.admin-ground-authoring-validation p {
  margin: 0;
}

.admin-ground-authoring-issue {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  border-left: 3px solid rgba(217, 105, 89, 0.8);
  background: rgba(65, 24, 20, 0.35);
  color: #f5c2bb;
  font-size: 0.8rem;
}

.admin-ground-authoring-issue--warning {
  border-left-color: rgba(213, 155, 71, 0.85);
  background: rgba(67, 43, 13, 0.32);
  color: #f4d29a;
}

.admin-ground-authoring-issue strong {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .admin-ground-authoring-grid,
  .admin-ground-map-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-ground-authoring-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-ground-header-actions,
  .admin-ground-authoring-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-ground-authoring-grid,
  .admin-ground-map-editor-grid,
  .admin-ground-authoring-row,
  .admin-ground-authoring-issue {
    grid-template-columns: 1fr;
  }

  .admin-ground-map-editor-grid .admin-ground-authoring-wide {
    grid-column: auto;
  }
}

.admin-ground-map-first-form {
  gap: 18px;
}

.admin-ground-map-workflow {
  padding-top: 0;
  border-top: 0;
}

.admin-ground-map-workflow-summary {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(118, 153, 204, 0.16);
  background: rgba(13, 18, 22, 0.72);
}

.admin-ground-map-workflow-summary strong {
  color: var(--text-strong);
}

.admin-ground-map-workflow-summary span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.admin-ground-advanced-editor {
  border: 1px solid rgba(118, 153, 204, 0.14);
  background: rgba(13, 18, 22, 0.42);
}

.admin-ground-advanced-editor summary {
  padding: 12px 14px;
  color: var(--text-muted);
  font-weight: 650;
  cursor: pointer;
}

.admin-ground-advanced-editor[open] summary {
  border-bottom: 1px solid rgba(118, 153, 204, 0.12);
  color: var(--text-strong);
}

.admin-ground-advanced-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.admin-ground-map-save-actions {
  position: sticky;
  bottom: 0;
  z-index: 450;
  justify-content: flex-end;
  padding: 12px;
  border: 1px solid rgba(118, 153, 204, 0.18);
  background: rgba(10, 15, 18, 0.96);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.22);
}

.admin-ground-validation-ok {
  color: #9edbb7;
}

@media (max-width: 640px) {
  .admin-ground-map-save-actions {
    position: static;
  }
}