.property-import-modal {
  width: min(440px, 100%);
}

.property-import-message {
  margin: 14px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.property-import-message p {
  overflow-wrap: anywhere;
}

.property-external-ids {
  white-space: pre-line;
}

.property-detail-page {
  display: grid;
  gap: 16px;
}

.property-detail-header {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbff, #eef6f2);
}

.property-detail-header h3 {
  margin: 0;
}

.property-detail-statuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.property-activity-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.property-activity-badge.active {
  border: 1px solid #b7dfc6;
  background: #edf9f1;
  color: #19713a;
}

.property-activity-badge.inactive {
  border: 1px solid #d9dee7;
  background: #f1f3f6;
  color: #667085;
}

.property-row-inactive td {
  color: #8a94a3;
  background: #f7f8fa;
}

.property-activity-button {
  margin-left: auto;
}

.property-source-pill {
  padding: 6px 10px;
  border: 1px solid #cfe1d6;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.property-editor-form .editor-actions {
  grid-column: 1 / -1;
}

#screen-properties.screen.active:not(.property-editor-open) {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
}

#screen-properties:not(.property-editor-open) #properties-table {
  min-height: 0;
}

.properties-table-wrap {
  height: 100%;
  overflow: auto;
}

.properties-table {
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}

.properties-table th,
.properties-table td {
  overflow: hidden;
  padding: 8px 7px;
  text-overflow: ellipsis;
}

.properties-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.properties-table th:first-child {
  width: 92px;
}

.properties-table th:last-child {
  width: 46px;
}

.property-editor-tabs,
.property-editor-panel {
  grid-column: 1 / -1;
}

.property-editor-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.property-editor-tabs button {
  background: #fff;
  color: var(--muted);
}

.property-editor-tabs button.active {
  background: #eaf4ff;
  border-color: #b8d9f4;
  color: var(--accent);
}

.property-editor-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.property-avito-panel {
  grid-template-columns: 1fr;
}

.property-avito-list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.property-avito-list div {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.property-avito-list dt {
  color: var(--muted);
  font-size: 12px;
}

.property-avito-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.property-table-settings-modal {
  max-width: 520px;
}

.property-table-settings-fields {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.property-table-settings-fields label {
  display: grid;
  gap: 6px;
}

.property-table-settings-fields span {
  color: var(--muted);
  font-size: 12px;
}

.property-table-settings-fields select {
  width: 100%;
}

@media (max-width: 720px) {
  #screen-properties.screen.active:not(.property-editor-open) {
    height: auto;
    min-height: 100%;
    display: block;
    overflow: visible;
  }

  .properties-table-wrap {
    height: auto;
  }

  .properties-table {
    min-width: 820px;
  }

  .property-detail-header {
    grid-template-columns: 1fr;
  }

  .property-editor-tabs {
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .property-editor-panel,
  .settings-modal .property-editor-form {
    grid-template-columns: 1fr;
  }
}
