.er-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 400px;

  .toolbar {
    padding: 12px;
    background: #fafafa;
    border-bottom: 1px solid #d9d9d9;
    flex-shrink: 0;
  }

  .graph-container {
    flex: 1;
    position: relative;
    min-height: 300px;
    width: 100%;
    border: 1px solid #e8e8e8;
    overflow: hidden;

    :deep(.x6-graph) {
      width: 100% !important;
      height: 100% !important;
    }

    :deep(.x6-graph-svg) {
      width: 100% !important;
      height: 100% !important;
      display: block;
    }

    :deep(.x6-graph-svg-stage) {
      outline: none;
    }
  }

  .table-editor {
    height: 100%;
    overflow-y: auto;
    padding: 0 4px;

    .fields-container {
      max-height: calc(100vh - 400px);
      overflow-y: auto;

      .field-card {
        margin-bottom: 16px;

        .field-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
          font-size: 13px;
          font-weight: 500;
        }

        :deep(.n-card-header) {
          padding: 10px 16px 8px;
        }

        :deep(.n-card__content) {
          padding: 12px 16px 16px;
        }
      }

      :deep(.n-select) {
        min-width: 140px;

        .n-select-menu {
          max-height: 200px;
          z-index: 9999;
        }
      }

      :deep(.n-form-item) {
        margin-bottom: 8px;

        .n-form-item-label {
          font-size: 12px;
          color: #666;
          margin-bottom: 4px;
          white-space: nowrap;
        }
      }

      :deep(.n-input) {
        min-width: 100px;
      }
    }
  }
}